summaryrefslogtreecommitdiff
path: root/src/main.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/main.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/main.c')
-rw-r--r--src/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index 9d988df..f1dfa0c 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1896,7 +1896,7 @@ int main(int argc, char *argv[])
sprintf(nametext, "Molten %s", lowername);
}
- else if ((cr&0xFF)==PT_PIPE && (parts[cr>>8].tmp&0xFF) > 0 && (parts[cr>>8].tmp&0xFF) < PT_NUM )
+ else if (((cr&0xFF)==PT_PIPE || (cr&0xFF) == PT_PPIP) && (parts[cr>>8].tmp&0xFF) > 0 && (parts[cr>>8].tmp&0xFF) < PT_NUM )
{
char lowername[6];
int ix;
@@ -1909,7 +1909,7 @@ int main(int argc, char *argv[])
else if (DEBUG_MODE)
{
int tctype = parts[cr>>8].ctype;
- if ((cr&0xFF)==PT_PIPE)
+ if ((cr&0xFF)==PT_PIPE || (cr&0xFF) == PT_PPIP)
{
tctype = parts[cr>>8].tmp&0xFF;
}