TPT: Give menu color to elements without one (stickmen, TRON, and WARP)

This commit is contained in:
Simon Robertshaw 2012-08-11 11:57:21 +01:00
parent ca7b02dbfd
commit 2f76c2374d
6 changed files with 10 additions and 63 deletions

View File

@ -2373,7 +2373,7 @@ void Renderer::CompileRenderMode()
void Renderer::ClearAccumulation()
{
//Fire
emp_decor = 0;
std::fill(fire_r[0]+0, fire_r[(YRES/CELL)-1]+((XRES/CELL)-1), 0);
std::fill(fire_g[0]+0, fire_g[(YRES/CELL)-1]+((XRES/CELL)-1), 0);
std::fill(fire_b[0]+0, fire_b[(YRES/CELL)-1]+((XRES/CELL)-1), 0);

View File

@ -4,7 +4,7 @@ Element_FIGH::Element_FIGH()
{
Identifier = "DEFAULT_PT_FIGH";
Name = "FIGH";
Colour = PIXPACK(0x000000);
Colour = PIXPACK(0xFFE0A0);
MenuVisible = 1;
MenuSection = SC_SPECIAL;
Enabled = 1;
@ -43,7 +43,7 @@ Element_FIGH::Element_FIGH()
HighTemperatureTransition = PT_FIRE;
Update = &Element_FIGH::update;
Graphics = &Element_FIGH::graphics;
Graphics = &Element_STKM::graphics;
}
//#TPT-Directive ElementHeader Element_FIGH static int update(UPDATE_FUNC_ARGS)
@ -137,26 +137,4 @@ int Element_FIGH::update(UPDATE_FUNC_ARGS)
return 0;
}
//#TPT-Directive ElementHeader Element_FIGH static int graphics(GRAPHICS_FUNC_ARGS)
int Element_FIGH::graphics(GRAPHICS_FUNC_ARGS)
{
playerst * cplayer;// = &sim->fighters[(unsigned char)cpart->tmp];
*pixel_mode = PSPEC_STICKMAN;
/*if (cplayer->elem<PT_NUM)
{
*colr = PIXR(sim->elements[cplayer->elem].pcolors);
*colg = PIXG(sim->elements[cplayer->elem].pcolors);
*colb = PIXB(sim->elements[cplayer->elem].pcolors);
}
else*/
{
*colr = *colg = *colb = 255;
}
return 1;
}
Element_FIGH::~Element_FIGH() {}

View File

@ -4,7 +4,7 @@ Element_STKM::Element_STKM()
{
Identifier = "DEFAULT_PT_STKM";
Name = "STKM";
Colour = PIXPACK(0x000000);
Colour = PIXPACK(0xFFE0A0);
MenuVisible = 1;
MenuSection = SC_SPECIAL;
Enabled = 1;
@ -58,19 +58,9 @@ int Element_STKM::update(UPDATE_FUNC_ARGS)
//#TPT-Directive ElementHeader Element_STKM static int graphics(GRAPHICS_FUNC_ARGS)
int Element_STKM::graphics(GRAPHICS_FUNC_ARGS)
{
*colr = *colg = *colb = *cola = 0;
*pixel_mode = PSPEC_STICKMAN;
/*if ((int)sim->player.elem<PT_NUM)
{
*colr = PIXR(elements[sim->player.elem].pcolors);
*colg = PIXG(elements[sim->player.elem].pcolors);
*colb = PIXB(elements[sim->player.elem].pcolors);
}
else*/
{
*colr = *colg = *colb = 255;
}
return 1;
}

View File

@ -4,7 +4,7 @@ Element_STKM2::Element_STKM2()
{
Identifier = "DEFAULT_PT_STKM2";
Name = "STK2";
Colour = PIXPACK(0x000000);
Colour = PIXPACK(0x6464FF);
MenuVisible = 1;
MenuSection = SC_SPECIAL;
Enabled = 1;
@ -43,7 +43,7 @@ Element_STKM2::Element_STKM2()
HighTemperatureTransition = PT_FIRE;
Update = &Element_STKM2::update;
Graphics = &Element_STKM2::graphics;
Graphics = &Element_STKM::graphics;
}
//#TPT-Directive ElementHeader Element_STKM2 static int update(UPDATE_FUNC_ARGS)
@ -53,25 +53,4 @@ int Element_STKM2::update(UPDATE_FUNC_ARGS)
return 0;
}
//#TPT-Directive ElementHeader Element_STKM2 static int graphics(GRAPHICS_FUNC_ARGS)
int Element_STKM2::graphics(GRAPHICS_FUNC_ARGS)
{
*pixel_mode = PSPEC_STICKMAN;
/*if ((int)sim->player2.elem<PT_NUM)
{
*colr = PIXR(elements[sim->player2.elem].pcolors);
*colg = PIXG(elements[sim->player2.elem].pcolors);
*colb = PIXB(elements[sim->player2.elem].pcolors);
}
else*/
{
*colr = *colg = *colb = 255;
}
return 1;
}
Element_STKM2::~Element_STKM2() {}

View File

@ -4,7 +4,7 @@ Element_TRON::Element_TRON()
{
Identifier = "DEFAULT_PT_TRON";
Name = "TRON";
Colour = PIXPACK(0x000000);
Colour = PIXPACK(0xA9FF00);
MenuVisible = 1;
MenuSection = SC_SPECIAL;
Enabled = 1;

View File

@ -4,7 +4,7 @@ Element_WARP::Element_WARP()
{
Identifier = "DEFAULT_PT_WARP";
Name = "WARP";
Colour = PIXPACK(0x000000);
Colour = PIXPACK(0x101010);
MenuVisible = 1;
MenuSection = SC_NUCLEAR;
Enabled = 1;
@ -87,7 +87,7 @@ int Element_WARP::update(UPDATE_FUNC_ARGS)
//#TPT-Directive ElementHeader Element_WARP static int graphics(GRAPHICS_FUNC_ARGS)
int Element_WARP::graphics(GRAPHICS_FUNC_ARGS)
{
*cola = 0;
*colr = *colg = *colb = *cola = 0;
*pixel_mode &= ~PMODE;
return 0;
}