summaryrefslogtreecommitdiff
path: root/src/elements/newgraphics.c
diff options
context:
space:
mode:
authorjacksonmj <mj-pt@jacksonmj.co.uk>2012-08-11 08:53:02 (GMT)
committer jacksonmj <mj-pt@jacksonmj.co.uk>2012-08-13 22:48:55 (GMT)
commit8ec0f41fb143a6bda08d078232f3d70b36328dc4 (patch)
tree93b52bfef3bd66f04c62fa944728bb152079e56c /src/elements/newgraphics.c
parenta4c15746b8b3f6c187fbc7403fe5082883a8d9b7 (diff)
downloadpowder-8ec0f41fb143a6bda08d078232f3d70b36328dc4.zip
powder-8ec0f41fb143a6bda08d078232f3d70b36328dc4.tar.gz
Powered pipe, based on jacob1's commits
PSCN to turn on, NSCN to turn off, INST to reverse. Differences from jacob1's commit include: flood fill function that includes 1px diagonal pipes, powered/reversed state stored in tmp instead of flags, sparks from PSCN/NSCN/INST always take effect the following frame, single pixel pipe directions are a number from 0 to 7 so "if(coords)" does not check whether one is set (store another "transfers according to 1px pipe direction" bit for reverse flow).
Diffstat (limited to 'src/elements/newgraphics.c')
-rw-r--r--src/elements/newgraphics.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/elements/newgraphics.c b/src/elements/newgraphics.c
index c8581f6..06bc74e 100644
--- a/src/elements/newgraphics.c
+++ b/src/elements/newgraphics.c
@@ -514,3 +514,12 @@ int graphics_COAL(GRAPHICS_FUNC_ARGS) //Both COAL and Broken Coal
return 0;
}
+int graphics_BRCK(GRAPHICS_FUNC_ARGS)
+{
+ if (cpart->tmp == 1)
+ {
+ *pixel_mode |= PMODE_GLOW;
+ *colb += 100;
+ }
+ return 0;
+}