- 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)
This commit is contained in:
Randy Heit 2008-01-27 04:53:55 +00:00
parent 1b28557341
commit 4c9d633a94
5 changed files with 11 additions and 7 deletions

View file

@ -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) January 26, 2008 (Changes by Graf Zahl)
- Got rid of most TexMan.AddPatch calls because they are no longer needed. - 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 - Got rid of R_InitPatches because the new texture init code needs to preload

View file

@ -170,7 +170,6 @@ static void M_StartMessage (const char *string, void(*routine)(int), bool input)
void M_PlayerSetup (); void M_PlayerSetup ();
static void M_PlayerSetupTicker (); static void M_PlayerSetupTicker ();
static void M_PlayerSetupDrawer (); static void M_PlayerSetupDrawer ();
static void M_RenderPlayerBackdrop ();
static void M_EditPlayerName (int choice); static void M_EditPlayerName (int choice);
static void M_ChangePlayerTeam (int choice); static void M_ChangePlayerTeam (int choice);
static void M_PlayerNameChanged (FSaveGameNode *dummy); static void M_PlayerNameChanged (FSaveGameNode *dummy);
@ -2118,7 +2117,7 @@ static void M_PlayerSetupDrawer ()
DTA_DestWidth, 72 * CleanXfac, DTA_DestWidth, 72 * CleanXfac,
DTA_DestHeight, 80 * CleanYfac, DTA_DestHeight, 80 * CleanYfac,
DTA_Translation, &FireRemap, DTA_Translation, &FireRemap,
DTA_Masked, true, DTA_Masked, false,
TAG_DONE); TAG_DONE);
} }

View file

@ -3204,7 +3204,7 @@ void P_RailAttack (AActor *source, int damage, int offset, int color1, int color
unsigned int i; unsigned int i;
const PClass *puffclass = PClass::FindClass(puff); const PClass *puffclass = PClass::FindClass(puff);
AActor *puffDefaults = puffclass == NULL? NULL : GetDefaultByType (puffclass); 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++) for (i = 0; i < RailHits.Size (); i++)
{ {

View file

@ -2046,13 +2046,13 @@ bool D3DPal::Update()
for (i = 0; i < skipat; ++i) 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) 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); Tex->UnlockRect(0);
return true; return true;

View file

@ -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" #line 1 "scanner.re"
#include <string.h> #include <string.h>
#include <malloc.h> #include <malloc.h>