From 4c9d633a94cb1d28bb53f356ac7ba5a32b757826 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Sun, 27 Jan 2008 04:53:55 +0000 Subject: [PATCH] - Fixed: P_RailAttack() crashed if you didn't specify a puff for a rail. - Decided that allowing arbitrary alpha values for color remaps isn't so hot. Changed it back the way it was. SVN r716 (trunk) --- docs/rh-log.txt | 5 +++++ src/m_menu.cpp | 3 +-- src/p_map.cpp | 2 +- src/win32/fb_d3d9.cpp | 6 +++--- tools/dehsupp/scanner.c | 2 +- 5 files changed, 11 insertions(+), 7 deletions(-) diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 16e0d9607..559c5be2b 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,3 +1,8 @@ +January 26, 2008 +- Fixed: P_RailAttack() crashed if you didn't specify a puff for a rail. +- Decided that allowing arbitrary alpha values for color remaps isn't so hot. + Changed it back the way it was. + January 26, 2008 (Changes by Graf Zahl) - Got rid of most TexMan.AddPatch calls because they are no longer needed. - Got rid of R_InitPatches because the new texture init code needs to preload diff --git a/src/m_menu.cpp b/src/m_menu.cpp index 5ac7209da..a3af8ecb2 100644 --- a/src/m_menu.cpp +++ b/src/m_menu.cpp @@ -170,7 +170,6 @@ static void M_StartMessage (const char *string, void(*routine)(int), bool input) void M_PlayerSetup (); static void M_PlayerSetupTicker (); static void M_PlayerSetupDrawer (); -static void M_RenderPlayerBackdrop (); static void M_EditPlayerName (int choice); static void M_ChangePlayerTeam (int choice); static void M_PlayerNameChanged (FSaveGameNode *dummy); @@ -2118,7 +2117,7 @@ static void M_PlayerSetupDrawer () DTA_DestWidth, 72 * CleanXfac, DTA_DestHeight, 80 * CleanYfac, DTA_Translation, &FireRemap, - DTA_Masked, true, + DTA_Masked, false, TAG_DONE); } diff --git a/src/p_map.cpp b/src/p_map.cpp index 767b22e01..f99659e1e 100644 --- a/src/p_map.cpp +++ b/src/p_map.cpp @@ -3204,7 +3204,7 @@ void P_RailAttack (AActor *source, int damage, int offset, int color1, int color unsigned int i; const PClass *puffclass = PClass::FindClass(puff); AActor *puffDefaults = puffclass == NULL? NULL : GetDefaultByType (puffclass); - FName damagetype = puffDefaults != NULL && puffDefaults->DamageType == NAME_None? FName(NAME_Railgun) : puffDefaults->DamageType; + FName damagetype = (puffDefaults == NULL || puffDefaults->DamageType == NAME_None) ? FName(NAME_Railgun) : puffDefaults->DamageType; for (i = 0; i < RailHits.Size (); i++) { diff --git a/src/win32/fb_d3d9.cpp b/src/win32/fb_d3d9.cpp index e6aa1f6b5..cdd3ee192 100644 --- a/src/win32/fb_d3d9.cpp +++ b/src/win32/fb_d3d9.cpp @@ -2046,13 +2046,13 @@ bool D3DPal::Update() for (i = 0; i < skipat; ++i) { - buff[i] = D3DCOLOR_ARGB(pal[i].a, pal[i].r, pal[i].g, pal[i].b); + buff[i] = D3DCOLOR_ARGB(i == 0 ? 0 : 255, pal[i].r, pal[i].g, pal[i].b); } for (++i; i < Remap->NumEntries; ++i) { - buff[i] = D3DCOLOR_ARGB(pal[i-1].a, pal[i-1].r, pal[i-1].g, pal[i-1].b); + buff[i] = D3DCOLOR_ARGB(255, pal[i-1].r, pal[i-1].g, pal[i-1].b); } - BorderColor = D3DCOLOR_ARGB(pal[i-1].a, pal[i-1].r, pal[i-1].g, pal[i-1].b); + BorderColor = D3DCOLOR_ARGB(255, pal[i-1].r, pal[i-1].g, pal[i-1].b); Tex->UnlockRect(0); return true; diff --git a/tools/dehsupp/scanner.c b/tools/dehsupp/scanner.c index 25a1fbfa3..a12abe34d 100644 --- a/tools/dehsupp/scanner.c +++ b/tools/dehsupp/scanner.c @@ -1,4 +1,4 @@ -/* Generated by re2c 0.12.3 on Fri Jan 25 22:26:58 2008 */ +/* Generated by re2c 0.12.3 */ #line 1 "scanner.re" #include #include