summaryrefslogtreecommitdiff
path: root/src/simulation
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-08-03 00:40:13 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-08-03 00:40:13 (GMT)
commit24006ee44a52d0a216e8ba20690bb702d19abe55 (patch)
tree8adad847ff432b141c32800f813aa45976a0ddf1 /src/simulation
parent4233bc743c272b9c60a16928ed49bbddaf635a98 (diff)
downloadpowder-24006ee44a52d0a216e8ba20690bb702d19abe55.zip
powder-24006ee44a52d0a216e8ba20690bb702d19abe55.tar.gz
Grav colour, addresses rest of #41, colour will vary from original TPT
Diffstat (limited to 'src/simulation')
-rw-r--r--src/simulation/elements/GRAV.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/simulation/elements/GRAV.cpp b/src/simulation/elements/GRAV.cpp
index ea8ff4d..b913a28 100644
--- a/src/simulation/elements/GRAV.cpp
+++ b/src/simulation/elements/GRAV.cpp
@@ -59,12 +59,22 @@ int Element_GRAV::update(UPDATE_FUNC_ARGS)
return 0;
}
+int lastIndex;
//#TPT-Directive ElementHeader Element_GRAV static int graphics(GRAPHICS_FUNC_ARGS)
int Element_GRAV::graphics(GRAPHICS_FUNC_ARGS)
{
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;
*colg = 20;
*colb = 20;