summaryrefslogtreecommitdiff
path: root/src/elements/graphics_default.c
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2011-10-23 16:37:24 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2011-10-23 16:37:24 (GMT)
commit66fd41673b5e1c3a2d86af1a6f0c7f565639a482 (patch)
treed19a1ac103d55002b019fd150780f38aa3b22277 /src/elements/graphics_default.c
parent2d25d944ad7e206cbdbd4d405704eaeb368ae4bf (diff)
downloadpowder-66fd41673b5e1c3a2d86af1a6f0c7f565639a482.zip
powder-66fd41673b5e1c3a2d86af1a6f0c7f565639a482.tar.gz
Fix compilation for Non-OpenGL builds
Diffstat (limited to 'src/elements/graphics_default.c')
-rw-r--r--src/elements/graphics_default.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/elements/graphics_default.c b/src/elements/graphics_default.c
new file mode 100644
index 0000000..d64c0e1
--- /dev/null
+++ b/src/elements/graphics_default.c
@@ -0,0 +1,22 @@
+#include <element.h>
+
+int graphics_DEFAULT(GRAPHICS_FUNC_ARGS)
+{
+ int t = cpart->type;
+ //Property based defaults
+ if(ptypes[t].properties & PROP_RADIOACTIVE) *pixel_mode |= PMODE_GLOW;
+ if(ptypes[t].properties & TYPE_LIQUID)
+ {
+ *pixel_mode |= PMODE_BLUR;
+ }
+ if(ptypes[t].properties & TYPE_GAS)
+ {
+ *pixel_mode &= ~PMODE;
+ *pixel_mode |= FIRE_BLEND;
+ *firer = *colr/2;
+ *fireg = *colg/2;
+ *fireb = *colb/2;
+ *firea = 125;
+ }
+ return 1;
+}