- Added a "BlueMap" for powerup colors.

- Add the missing CF_WEAPONREADYALT and CF_WEAPONSWITCHOK flags.

SVN r1723 (trunk)
This commit is contained in:
Randy Heit 2009-07-17 01:17:06 +00:00
parent aaf19b9127
commit 720747baef
10 changed files with 42 additions and 9 deletions

View file

@ -1,4 +1,5 @@
July 16, 2009
- Added a "BlueMap" for powerup colors.
- Added a NULL screen check when detaching HUD messages.
- Added HotWax's A_SetArg.
- Gez's patch for more A_WeaponReady flags:

View file

@ -184,7 +184,7 @@ typedef enum
CF_INSTANTWEAPSWITCH= 1 << 11, // [RH] Switch weapons instantly
CF_TOTALLYFROZEN = 1 << 12, // [RH] All players can do is press +use
CF_PREDICTING = 1 << 13, // [RH] Player movement is being predicted
CF_WEAPONREADY = 1 << 14, // [RH] Weapon is in the ready state, so bob it when walking
CF_WEAPONREADY = 1 << 14, // [RH] Weapon is in the ready state and can fire its primary attack
CF_TIMEFREEZE = 1 << 15, // Player has an active time freezer
CF_DRAIN = 1 << 16, // Player owns a drain powerup
CF_REGENERATION = 1 << 17, // Player owns a regeneration artifact
@ -195,6 +195,8 @@ typedef enum
CF_EXTREMELYDEAD = 1 << 22, // [RH] Reliably let the status bar know about extreme deaths.
CF_INFINITEAMMO = 1 << 23, // Player owns an infinite ammo artifact
CF_WEAPONBOBBING = 1 << 24, // [HW] Bob weapon while the player is moving
CF_WEAPONREADYALT = 1 << 25, // Weapon can fire its secondary attack
CF_WEAPONSWITCHOK = 1 << 26, // It is okay to switch away from this weapon
} cheat_t;
#define WPIECE1 1

View file

@ -149,7 +149,8 @@ PalEntry APowerup::GetBlend ()
BlendColor == GOLDCOLOR ||
// [BC] HAX!
BlendColor == REDCOLOR ||
BlendColor == GREENCOLOR)
BlendColor == GREENCOLOR ||
BlendColor == BLUECOLOR)
return 0;
return BlendColor;
@ -199,11 +200,16 @@ void APowerup::DoEffect ()
{
Owner->player->fixedcolormap = GREENCOLORMAP;
}
else if (BlendColor == BLUECOLOR)
{
Owner->player->fixedcolormap = BLUECOLORMAP;
}
}
else if ((BlendColor == INVERSECOLOR && Owner->player->fixedcolormap == INVERSECOLORMAP) ||
(BlendColor == GOLDCOLOR && Owner->player->fixedcolormap == GOLDCOLORMAP) ||
(BlendColor == REDCOLOR && Owner->player->fixedcolormap == REDCOLORMAP) ||
(BlendColor == GREENCOLOR && Owner->player->fixedcolormap == GREENCOLORMAP))
(BlendColor == GREENCOLOR && Owner->player->fixedcolormap == GREENCOLORMAP) ||
(BlendColor == BLUECOLOR && Owner->player->fixedcolormap == BLUECOLORMAP))
{
Owner->player->fixedcolormap = 0;
}

View file

@ -3,12 +3,13 @@
#include "a_pickups.h"
#define INVERSECOLOR 0x00345678
#define GOLDCOLOR 0x009abcde
#define INVERSECOLOR 0x00345678
#define GOLDCOLOR 0x009abcde
// [BC] More hacks!
#define REDCOLOR 0x00beefee
#define GREENCOLOR 0x00beefad
#define REDCOLOR 0x00beefee
#define GREENCOLOR 0x00beefad
#define BLUECOLOR 0x00befeed
class player_t;

View file

@ -1170,6 +1170,10 @@ void R_SetupFrame (AActor *actor)
fixedcolormap = GreenColormap;
break;
case BLUECOLORMAP:
fixedcolormap = BlueColormap;
break;
case GOLDCOLORMAP:
fixedcolormap = GoldColormap;
break;

View file

@ -92,6 +92,7 @@ extern bool r_dontmaplines;
#define GOLDCOLORMAP 33
#define REDCOLORMAP 34
#define GREENCOLORMAP 35
#define BLUECOLORMAP 36
// The size of a single colormap, in bits
#define COLORMAPSHIFT 8

View file

@ -416,11 +416,11 @@ const BYTE *FMultiPatchTexture::GetColumn (unsigned int column, const Span **spa
//==========================================================================
//
// FMultiPatchTexture :: GetColumn
// GetBlendMap
//
//==========================================================================
BYTE * GetBlendMap(PalEntry blend, BYTE *blendwork)
BYTE *GetBlendMap(PalEntry blend, BYTE *blendwork)
{
switch (blend.a==0 ? blend.r : -1)

View file

@ -1570,6 +1570,11 @@ DEFINE_CLASS_PROPERTY_PREFIX(powerup, color, C_f, Inventory)
*pBlendColor = GREENCOLOR;
return;
}
else if (!stricmp(name, "BLUEMAP"))
{
*pBlendColor = BLUECOLOR;
return;
}
color = V_GetColor(NULL, name);
}

View file

@ -66,6 +66,7 @@ BYTE GoldColormap[256];
// [BC] New Skulltag colormaps.
BYTE RedColormap[256];
BYTE GreenColormap[256];
BYTE BlueColormap[256];
BYTE DesaturateColormap[31][256];
static void FreeSpecialLights();;
@ -435,6 +436,17 @@ void InitPalette ()
intensity>>8 );
}
// Build a blue colormap.
shade = BlueColormap;
for (c = 0; c < 256; c++)
{
intensity = ((GPalette.BaseColors[c].r * 77 +
GPalette.BaseColors[c].g * 143 +
GPalette.BaseColors[c].b * 37));
shade[c] = ColorMatcher.Pick (
MIN( 255, ( intensity + ( intensity / 2 )) >> 8 ), 0, 0 );
}
// desaturated colormaps
for(int m = 0; m < 31; m++)
{

View file

@ -84,6 +84,7 @@ extern BYTE GoldColormap[256];
// [BC] New Skulltag colormaps.
extern BYTE RedColormap[256];
extern BYTE GreenColormap[256];
extern BYTE BlueColormap[256];
extern BYTE DesaturateColormap[31][256];
extern FPalette GPalette;
extern "C" {