mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-12 11:24:04 +02:00
Grav colour, addresses rest of #41, colour will vary from original TPT
This commit is contained in:
@@ -59,12 +59,22 @@ int Element_GRAV::update(UPDATE_FUNC_ARGS)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int lastIndex;
|
||||||
|
|
||||||
//#TPT-Directive ElementHeader Element_GRAV static int graphics(GRAPHICS_FUNC_ARGS)
|
//#TPT-Directive ElementHeader Element_GRAV static int graphics(GRAPHICS_FUNC_ARGS)
|
||||||
int Element_GRAV::graphics(GRAPHICS_FUNC_ARGS)
|
int Element_GRAV::graphics(GRAPHICS_FUNC_ARGS)
|
||||||
|
|
||||||
{
|
{
|
||||||
int GRAV_R, GRAV_B, GRAV_G, GRAV_R2, GRAV_B2, GRAV_G2;
|
int GRAV_R, GRAV_B, GRAV_G, GRAV_R2, GRAV_B2, GRAV_G2;
|
||||||
|
|
||||||
|
GRAV_R = std::abs((ren->sim->currentTick%120)-60);
|
||||||
|
GRAV_G = std::abs(((ren->sim->currentTick+60)%120)-60);
|
||||||
|
GRAV_B = std::abs(((ren->sim->currentTick+120)%120)-60);
|
||||||
|
GRAV_R2 = std::abs((ren->sim->currentTick%60)-30);
|
||||||
|
GRAV_G2 = std::abs(((ren->sim->currentTick+30)%60)-30);
|
||||||
|
GRAV_B2 = std::abs(((ren->sim->currentTick+60)%60)-30);
|
||||||
|
|
||||||
|
|
||||||
*colr = 20;
|
*colr = 20;
|
||||||
*colg = 20;
|
*colg = 20;
|
||||||
*colb = 20;
|
*colb = 20;
|
||||||
|
Reference in New Issue
Block a user