From 2f76c2374d9d8da0b3ed512113a611c9af5653b5 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Sat, 11 Aug 2012 11:57:21 +0100 Subject: TPT: Give menu color to elements without one (stickmen, TRON, and WARP) diff --git a/src/graphics/Renderer.cpp b/src/graphics/Renderer.cpp index aed78b2..11cf9c3 100644 --- a/src/graphics/Renderer.cpp +++ b/src/graphics/Renderer.cpp @@ -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); diff --git a/src/simulation/elements/FIGH.cpp b/src/simulation/elements/FIGH.cpp index 7ff1156..66be5bd 100644 --- a/src/simulation/elements/FIGH.cpp +++ b/src/simulation/elements/FIGH.cpp @@ -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->elemelements[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() {} \ No newline at end of file diff --git a/src/simulation/elements/STKM.cpp b/src/simulation/elements/STKM.cpp index 7f7476b..9024e08 100644 --- a/src/simulation/elements/STKM.cpp +++ b/src/simulation/elements/STKM.cpp @@ -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.elemplayer.elem].pcolors); - *colg = PIXG(elements[sim->player.elem].pcolors); - *colb = PIXB(elements[sim->player.elem].pcolors); - } - else*/ - { - *colr = *colg = *colb = 255; - } return 1; } diff --git a/src/simulation/elements/STKM2.cpp b/src/simulation/elements/STKM2.cpp index edcef18..a2c0073 100644 --- a/src/simulation/elements/STKM2.cpp +++ b/src/simulation/elements/STKM2.cpp @@ -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.elemplayer2.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() {} \ No newline at end of file diff --git a/src/simulation/elements/TRON.cpp b/src/simulation/elements/TRON.cpp index 6d54125..36493a7 100644 --- a/src/simulation/elements/TRON.cpp +++ b/src/simulation/elements/TRON.cpp @@ -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; diff --git a/src/simulation/elements/WARP.cpp b/src/simulation/elements/WARP.cpp index bcd71a3..bb8f8e1 100644 --- a/src/simulation/elements/WARP.cpp +++ b/src/simulation/elements/WARP.cpp @@ -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; } -- cgit v0.9.2-21-gd62e