From f203219d24418583f27cd6b2fe0d0ab2908b81e4 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 26 Jul 2006 09:50:17 +0000 Subject: [PATCH] - Changed player sprite translation for the menu so that it uses a regular translation table instead of a local custom buffer. - Fixed: ResetBaggage must set MeleeDamage to 0. SVN r271 (trunk) --- docs/rh-log.txt | 5 +++++ src/m_menu.cpp | 11 +++++------ src/r_draw.cpp | 4 ++-- src/thingdef.cpp | 1 + 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/docs/rh-log.txt b/docs/rh-log.txt index d34fb861d2..6148b72f15 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,3 +1,8 @@ +July 26, 2006 (Changes by Graf Zahl) +- Changed player sprite translation for the menu so that it uses a regular + translation table instead of a local custom buffer. +- Fixed: ResetBaggage must set MeleeDamage to 0. + July 21, 2006 - Made SafeReadMemory() in i_crash.cpp more readable. - Here's something MinGW users will probably like: i_crash.cpp no longer needs diff --git a/src/m_menu.cpp b/src/m_menu.cpp index 9ba8c53110..f77f992cc0 100644 --- a/src/m_menu.cpp +++ b/src/m_menu.cpp @@ -228,7 +228,6 @@ static int PlayerSkin; static FState *PlayerState; static int PlayerTics; static int PlayerRotation; -static BYTE PlayerTranslation[256]; static DCanvas *SavePic; static brokenlines_t *SaveComment; @@ -2001,7 +2000,7 @@ void M_PlayerSetup (void) PlayerClass = &PlayerClasses[players[consoleplayer].CurrentPlayerClass]; } PlayerSkin = players[consoleplayer].userinfo.skin; - R_GetPlayerTranslation (players[consoleplayer].userinfo.color, &skins[PlayerSkin], PlayerTranslation); + R_GetPlayerTranslation (players[consoleplayer].userinfo.color, &skins[PlayerSkin], translationtables[TRANSLATION_Players] + 256 * MAXPLAYERS); PlayerState = GetDefaultByType (PlayerClass->Type)->SeeState; PlayerTics = PlayerState->GetTics(); if (FireScreen == NULL) @@ -2036,7 +2035,7 @@ static void M_PlayerSetupTicker (void) PlayerSkin = R_FindSkin (skins[PlayerSkin].name, PlayerClass - &PlayerClasses[0]); R_GetPlayerTranslation (players[consoleplayer].userinfo.color, - &skins[PlayerSkin], PlayerTranslation); + &skins[PlayerSkin], translationtables[TRANSLATION_Players] + 256 * MAXPLAYERS); } if (PlayerState->GetTics () != -1 && PlayerState->GetNextState () != NULL) @@ -2149,7 +2148,7 @@ static void M_PlayerSetupDrawer () (PSetupDef.y + LINEHEIGHT*3 + 57 - 104)*CleanYfac + (SCREENHEIGHT/2), DTA_DestWidth, MulScale6 (tex->GetWidth() * CleanXfac, scale), DTA_DestHeight, MulScale6 (tex->GetHeight() * CleanYfac, scale), - DTA_Translation, PlayerTranslation, + DTA_Translation, translationtables[TRANSLATION_Players] + 256 * MAXPLAYERS, TAG_DONE); } } @@ -2466,7 +2465,7 @@ static void M_ChangeSkin (int choice) PlayerSkin = (PlayerSkin < (int)numskins - 1) ? PlayerSkin + 1 : 0; } while (!PlayerClass->CheckSkin (PlayerSkin)); - R_GetPlayerTranslation (players[consoleplayer].userinfo.color, &skins[PlayerSkin], PlayerTranslation); + R_GetPlayerTranslation (players[consoleplayer].userinfo.color, &skins[PlayerSkin], translationtables[TRANSLATION_Players] + 256 * MAXPLAYERS); cvar_set ("skin", skins[PlayerSkin].name); } @@ -2578,7 +2577,7 @@ static void SendNewColor (int red, int green, int blue) sprintf (command, "color \"%02x %02x %02x\"", red, green, blue); C_DoCommand (command); - R_GetPlayerTranslation (MAKERGB (red, green, blue), &skins[PlayerSkin], PlayerTranslation); + R_GetPlayerTranslation (MAKERGB (red, green, blue), &skins[PlayerSkin], translationtables[TRANSLATION_Players] + 256 * MAXPLAYERS); } static void M_SlidePlayerRed (int choice) diff --git a/src/r_draw.cpp b/src/r_draw.cpp index 9936b0eb70..2372901ddf 100644 --- a/src/r_draw.cpp +++ b/src/r_draw.cpp @@ -1418,7 +1418,7 @@ void R_InitTranslationTables () { static BYTE MainTranslationTables[256* (NUMCOLORMAPS*16 // Shaded - +MAXPLAYERS*2 // Players + PlayersExtra + +MAXPLAYERS*2+1 // Players + PlayersExtra +8 // Standard (7 for Strife, 3 for the rest) +MAX_ACS_TRANSLATIONS // LevelScripted +BODYQUESIZE // PlayerCorpses @@ -1436,7 +1436,7 @@ void R_InitTranslationTables () // Extra player translations, one for each player, unused by Doom translationtables[TRANSLATION_PlayersExtra] = - translationtables[TRANSLATION_Players] + MAXPLAYERS*256; + translationtables[TRANSLATION_Players] + (MAXPLAYERS+1)*256; // The three standard translations from Doom or Heretic (seven for Strife), // plus the generic ice translation. diff --git a/src/thingdef.cpp b/src/thingdef.cpp index 5aac7935dd..10fabe0b98 100644 --- a/src/thingdef.cpp +++ b/src/thingdef.cpp @@ -1141,6 +1141,7 @@ static void ResetBaggage (Baggage *bag) bag->EParms.ExplosionDamage = bag->EParms.ExplosionRadius = 128; bag->EParms.HurtShooter = true; bag->DropItemList = NULL; + bag->BAttack.MeleeDamage = 0; bag->BAttack.MissileHeight = 32*FRACUNIT; bag->BAttack.MeleeSound = 0; bag->BAttack.MissileName = NAME_None;