diff options
author | James Haley | 2010-09-01 02:25:31 +0000 |
---|---|---|
committer | James Haley | 2010-09-01 02:25:31 +0000 |
commit | b10d4acc24278460fc357aa974d7e3e56f0d5953 (patch) | |
tree | e87d1c13f0fc501bf1149065270a6be88b85296c /src/strife/st_stuff.c | |
parent | 71e330f910d9e803c08fe38c02c6828e71dda38f (diff) | |
download | chocolate-doom-b10d4acc24278460fc357aa974d7e3e56f0d5953.tar.gz chocolate-doom-b10d4acc24278460fc357aa974d7e3e56f0d5953.tar.bz2 chocolate-doom-b10d4acc24278460fc357aa974d7e3e56f0d5953.zip |
Handle green palette flash powered by player->nukagecount, and added
Strife mapnames.
Subversion-branch: /branches/strife-branch
Subversion-revision: 1991
Diffstat (limited to 'src/strife/st_stuff.c')
-rw-r--r-- | src/strife/st_stuff.c | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/src/strife/st_stuff.c b/src/strife/st_stuff.c index fcaeabeb..50585196 100644 --- a/src/strife/st_stuff.c +++ b/src/strife/st_stuff.c @@ -934,6 +934,13 @@ void ST_Ticker (void) static int st_palette = 0; +// +// ST_doPaletteStuff +// +// haleyjd 08/31/10: [STRIFE] +// * Changed radsuit palette handling for Strife nukagecount. +// * All other logic verified to be unmodified. +// void ST_doPaletteStuff(void) { @@ -946,55 +953,48 @@ void ST_doPaletteStuff(void) if (plyr->powers[pw_strength]) { - // slowly fade the berzerk out - bzc = 12 - (plyr->powers[pw_strength]>>6); + // slowly fade the berzerk out + bzc = 12 - (plyr->powers[pw_strength]>>6); - if (bzc > cnt) - cnt = bzc; + if (bzc > cnt) + cnt = bzc; } - + if (cnt) { - palette = (cnt+7)>>3; - - if (palette >= NUMREDPALS) - palette = NUMREDPALS-1; + palette = (cnt+7)>>3; + + if (palette >= NUMREDPALS) + palette = NUMREDPALS-1; - palette += STARTREDPALS; + palette += STARTREDPALS; } else if (plyr->bonuscount) { - palette = (plyr->bonuscount+7)>>3; + palette = (plyr->bonuscount+7)>>3; - if (palette >= NUMBONUSPALS) - palette = NUMBONUSPALS-1; + if (palette >= NUMBONUSPALS) + palette = NUMBONUSPALS-1; - palette += STARTBONUSPALS; + palette += STARTBONUSPALS; } - - else if ( plyr->powers[pw_ironfeet] > 4*32 - || plyr->powers[pw_ironfeet]&8) - palette = RADIATIONPAL; + // haleyjd 08/31/10: [STRIFE] Flash green when in nukage, not when has + // an environment suit (a breathing sound is played to indicate that + // instead). + else if ( plyr->nukagecount > 16*TICRATE || + (plyr->nukagecount & 8)) + palette = RADIATIONPAL; else - palette = 0; - - // In Chex Quest, the player never sees red. Instead, the - // radiation suit palette is used to tint the screen green, - // as though the player is being covered in goo by an - // attacking flemoid. + palette = 0; - if (gameversion == exe_chex - && palette >= STARTREDPALS && palette < STARTREDPALS + NUMREDPALS) - { - palette = RADIATIONPAL; - } + // haleyjd 08/31/10: Removed Chex Quest if (palette != st_palette) { - st_palette = palette; - pal = (byte *) W_CacheLumpNum (lu_palette, PU_CACHE)+palette*768; - I_SetPalette (pal); + st_palette = palette; + pal = (byte *) W_CacheLumpNum (lu_palette, PU_CACHE)+palette*768; + I_SetPalette (pal); } } |