mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-28 06:53:40 +00:00
- Added Skulltag's REDMAP and GREENMAP.
- Fixed: The PlayerSpeedTrail must copy the player's scaling information (from Skulltag) - Added r_maxparticles CVAR from Skulltag. - Changed PCX loader so that it always loads the last 768 bytes of 8 bit graphics as a palette SVN r447 (trunk)
This commit is contained in:
parent
82ba0fb189
commit
1cd8370327
10 changed files with 115 additions and 9 deletions
|
@ -1,3 +1,11 @@
|
|||
January 9, 2007 (Changes by Graf Zahl)
|
||||
- Added Skulltag's REDMAP and GREENMAP.
|
||||
- Fixed: The PlayerSpeedTrail must copy the player's scaling information
|
||||
(from Skulltag)
|
||||
- Added r_maxparticles CVAR from Skulltag.
|
||||
- Changed PCX loader so that it always loads the last 768 bytes of 8 bit graphics
|
||||
as a palette
|
||||
|
||||
January 8, 2007
|
||||
- Added escape code support to the echo CCMD, so you can use colors with it.
|
||||
- Changed the color scheme for the startup log to light text on a dark
|
||||
|
|
|
@ -99,11 +99,27 @@ void APowerup::Tick ()
|
|||
|
||||
if (EffectTics > BLINKTHRESHOLD || (EffectTics & 8))
|
||||
{
|
||||
if (BlendColor == INVERSECOLOR) Owner->player->fixedcolormap = INVERSECOLORMAP;
|
||||
else if (BlendColor == GOLDCOLOR) Owner->player->fixedcolormap = GOLDCOLORMAP;
|
||||
if (BlendColor == INVERSECOLOR)
|
||||
{
|
||||
Owner->player->fixedcolormap = INVERSECOLORMAP;
|
||||
}
|
||||
else if (BlendColor == GOLDCOLOR)
|
||||
{
|
||||
Owner->player->fixedcolormap = GOLDCOLORMAP;
|
||||
}
|
||||
else if (BlendColor == REDCOLOR)
|
||||
{
|
||||
Owner->player->fixedcolormap = REDCOLORMAP;
|
||||
}
|
||||
else if (BlendColor == GREENCOLOR)
|
||||
{
|
||||
Owner->player->fixedcolormap = GREENCOLORMAP;
|
||||
}
|
||||
}
|
||||
else if ((BlendColor == INVERSECOLOR && Owner->player->fixedcolormap == INVERSECOLORMAP) ||
|
||||
(BlendColor == GOLDCOLOR && Owner->player->fixedcolormap == GOLDCOLORMAP))
|
||||
(BlendColor == GOLDCOLOR && Owner->player->fixedcolormap == GOLDCOLORMAP) ||
|
||||
(BlendColor == REDCOLOR && Owner->player->fixedcolormap == REDCOLORMAP) ||
|
||||
(BlendColor == GREENCOLOR && Owner->player->fixedcolormap == GREENCOLORMAP))
|
||||
{
|
||||
Owner->player->fixedcolormap = 0;
|
||||
}
|
||||
|
@ -138,7 +154,11 @@ PalEntry APowerup::GetBlend ()
|
|||
if (EffectTics <= BLINKTHRESHOLD && !(EffectTics & 8))
|
||||
return 0;
|
||||
|
||||
if (BlendColor == INVERSECOLOR || BlendColor == GOLDCOLOR)
|
||||
if (BlendColor == INVERSECOLOR ||
|
||||
BlendColor == GOLDCOLOR ||
|
||||
// [BC] HAX!
|
||||
BlendColor == REDCOLOR ||
|
||||
BlendColor == GREENCOLOR)
|
||||
return 0;
|
||||
|
||||
return BlendColor;
|
||||
|
@ -1024,6 +1044,11 @@ void APowerSpeed::DoEffect ()
|
|||
speedMo->sprite = Owner->sprite;
|
||||
speedMo->frame = Owner->frame;
|
||||
speedMo->floorclip = Owner->floorclip;
|
||||
|
||||
// [BC] Also get the scale from the owner.
|
||||
speedMo->scaleX = Owner->scaleX;
|
||||
speedMo->scaleY = Owner->scaleY;
|
||||
|
||||
if (Owner == players[consoleplayer].camera &&
|
||||
!(Owner->player->cheats & CF_CHASECAM))
|
||||
{
|
||||
|
|
|
@ -7,6 +7,10 @@
|
|||
#define INVERSECOLOR 0x00345678
|
||||
#define GOLDCOLOR 0x009abcde
|
||||
|
||||
// [BC] More hacks!
|
||||
#define REDCOLOR 0x00beefee
|
||||
#define GREENCOLOR 0x00beefad
|
||||
|
||||
#define STREAM_ENUM(e) \
|
||||
inline FArchive &operator<< (FArchive &arc, e &i) \
|
||||
{ \
|
||||
|
|
|
@ -1160,6 +1160,14 @@ void R_SetupFrame (AActor *actor)
|
|||
fixedcolormap = InverseColormap;
|
||||
break;
|
||||
|
||||
case REDCOLORMAP:
|
||||
fixedcolormap = RedColormap;
|
||||
break;
|
||||
|
||||
case GREENCOLORMAP:
|
||||
fixedcolormap = GreenColormap;
|
||||
break;
|
||||
|
||||
case GOLDCOLORMAP:
|
||||
fixedcolormap = GoldColormap;
|
||||
break;
|
||||
|
|
|
@ -91,6 +91,8 @@ extern bool r_dontmaplines;
|
|||
|
||||
#define INVERSECOLORMAP 32
|
||||
#define GOLDCOLORMAP 33
|
||||
#define REDCOLORMAP 34
|
||||
#define GREENCOLORMAP 35
|
||||
|
||||
// The size of a single colormap, in bits
|
||||
#define COLORMAPSHIFT 8
|
||||
|
|
|
@ -2119,15 +2119,34 @@ void R_DrawMasked (void)
|
|||
// [RH] Particle functions
|
||||
//
|
||||
|
||||
// [BC] Allow the maximum number of particles to be specified by a cvar (so people
|
||||
// with lots of nice hardware can have lots of particles!).
|
||||
CUSTOM_CVAR( Int, r_maxparticles, 4000, CVAR_ARCHIVE )
|
||||
{
|
||||
if ( self == 0 )
|
||||
self = 4000;
|
||||
else if ( self < 100 )
|
||||
self = 100;
|
||||
|
||||
if ( gamestate != GS_STARTUP )
|
||||
{
|
||||
R_DeinitParticles( );
|
||||
R_InitParticles( );
|
||||
}
|
||||
}
|
||||
|
||||
void R_InitParticles ()
|
||||
{
|
||||
char *i;
|
||||
|
||||
if ((i = Args.CheckValue ("-numparticles")))
|
||||
NumParticles = atoi (i);
|
||||
if (NumParticles == 0)
|
||||
NumParticles = 4000;
|
||||
else if (NumParticles < 100)
|
||||
// [BC] Use r_maxparticles now.
|
||||
else
|
||||
NumParticles = r_maxparticles;
|
||||
|
||||
// This should be good, but eh...
|
||||
if ( NumParticles < 100 )
|
||||
NumParticles = 100;
|
||||
|
||||
Particles = new particle_t[NumParticles];
|
||||
|
|
|
@ -360,8 +360,9 @@ void FPCXTexture::MakeTexture()
|
|||
BYTE c;
|
||||
lump.Seek(-769, SEEK_END);
|
||||
lump >> c;
|
||||
if (c !=0x0c) memcpy(PaletteMap, GrayMap, 256); // Fallback for files without palette
|
||||
else for(int i=0;i<256;i++)
|
||||
//if (c !=0x0c) memcpy(PaletteMap, GrayMap, 256); // Fallback for files without palette
|
||||
//else
|
||||
for(int i=0;i<256;i++)
|
||||
{
|
||||
BYTE r,g,b;
|
||||
lump >> r >> g >> b;
|
||||
|
|
|
@ -3716,6 +3716,17 @@ static void PowerupColor (APowerupGiver *defaults, Baggage &bag)
|
|||
defaults->BlendColor = GOLDCOLOR;
|
||||
return;
|
||||
}
|
||||
// [BC] Yay, more hacks.
|
||||
else if ( SC_Compare( "REDMAP" ))
|
||||
{
|
||||
defaults->BlendColor = REDCOLOR;
|
||||
return;
|
||||
}
|
||||
else if ( SC_Compare( "GREENMAP" ))
|
||||
{
|
||||
defaults->BlendColor = GREENCOLOR;
|
||||
return;
|
||||
}
|
||||
|
||||
int c = V_GetColor(NULL, sc_String);
|
||||
r=RPART(c);
|
||||
|
|
|
@ -61,6 +61,9 @@ FDynamicColormap NormalLight;
|
|||
FPalette GPalette;
|
||||
BYTE InverseColormap[NUMCOLORMAPS*256];
|
||||
BYTE GoldColormap[NUMCOLORMAPS*256];
|
||||
// [BC] New Skulltag colormaps.
|
||||
BYTE RedColormap[NUMCOLORMAPS*256];
|
||||
BYTE GreenColormap[NUMCOLORMAPS*256];
|
||||
int Near255;
|
||||
|
||||
static void FreeSpecialLights();;
|
||||
|
@ -410,6 +413,28 @@ void InitPalette ()
|
|||
*shade++ = ColorMatcher.Pick (
|
||||
MIN (255, (intensity+intensity/2)>>8), intensity>>8, 0);
|
||||
}
|
||||
|
||||
// [BC] Build the Doomsphere colormap. It is red!
|
||||
shade = RedColormap;
|
||||
for (c = 0; c < 256; c++)
|
||||
{
|
||||
intensity = ((GPalette.BaseColors[c].r * 77 +
|
||||
GPalette.BaseColors[c].g * 143 +
|
||||
GPalette.BaseColors[c].b * 37));
|
||||
*shade++ = ColorMatcher.Pick (
|
||||
MIN( 255, ( intensity + ( intensity / 2 )) >> 8 ), 0, 0 );
|
||||
}
|
||||
|
||||
// [BC] Build the Guardsphere colormap. It's a greenish-white kind of thing.
|
||||
shade = GreenColormap;
|
||||
for (c = 0; c < 256; c++)
|
||||
{
|
||||
intensity = GPalette.BaseColors[c].r * 77 +
|
||||
GPalette.BaseColors[c].g * 143 +
|
||||
GPalette.BaseColors[c].b * 37;
|
||||
*shade++ = ColorMatcher.Pick (
|
||||
MIN( 255, ( intensity + ( intensity / 2 )) >> 8 ), MIN( 255, ( intensity + ( intensity / 2 )) >> 8 ), intensity>>8 );
|
||||
}
|
||||
}
|
||||
|
||||
extern "C"
|
||||
|
|
|
@ -81,6 +81,9 @@ struct FDynamicColormap
|
|||
|
||||
extern BYTE InverseColormap[NUMCOLORMAPS*256];
|
||||
extern BYTE GoldColormap[NUMCOLORMAPS*256];
|
||||
// [BC] New Skulltag colormaps.
|
||||
extern BYTE RedColormap[NUMCOLORMAPS*256];
|
||||
extern BYTE GreenColormap[NUMCOLORMAPS*256];
|
||||
extern FPalette GPalette;
|
||||
extern "C" {
|
||||
extern FDynamicColormap NormalLight;
|
||||
|
|
Loading…
Reference in a new issue