summaryrefslogtreecommitdiff
path: root/src/elements/lava.cpp
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-01-17 20:46:06 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-01-17 20:46:06 (GMT)
commit4a60b97c700c2f1843b7e99313554cb89fb5da4e (patch)
tree3b33ef6f74a4e8a4ff5968a81b9c4c429ccaa7c6 /src/elements/lava.cpp
parent6273089bf486bf46ad325d72c7290ebb272bd3d8 (diff)
downloadpowder-4a60b97c700c2f1843b7e99313554cb89fb5da4e.zip
powder-4a60b97c700c2f1843b7e99313554cb89fb5da4e.tar.gz
Some minor changes
Diffstat (limited to 'src/elements/lava.cpp')
-rw-r--r--src/elements/lava.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/elements/lava.cpp b/src/elements/lava.cpp
new file mode 100644
index 0000000..3d7827b
--- /dev/null
+++ b/src/elements/lava.cpp
@@ -0,0 +1,19 @@
+#include "element.h"
+
+int graphics_LAVA(GRAPHICS_FUNC_ARGS)
+{
+ *colr = cpart->life * 2 + 0xE0;
+ *colg = cpart->life * 1 + 0x50;
+ *colb = cpart->life / 2 + 0x10;
+ if (*colr>255) *colr = 255;
+ if (*colg>192) *colg = 192;
+ if (*colb>128) *colb = 128;
+ *firea = 40;
+ *firer = *colr;
+ *fireg = *colg;
+ *fireb = *colb;
+ *pixel_mode |= FIRE_ADD;
+ *pixel_mode |= PMODE_BLUR;
+ //Returning 0 means dynamic, do not cache
+ return 0;
+}