summaryrefslogtreecommitdiff
path: root/src/elements/amtr.cpp
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-05-07 16:59:50 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-05-07 16:59:50 (GMT)
commit51b17badf4c72270bb762ea795d05d51c8b355e3 (patch)
treeb66671e0496b68114c6e91eedb58bf783d5343c0 /src/elements/amtr.cpp
parentfb111f42d00dd8a2041bae970c0913e096ac5101 (diff)
downloadpowder-51b17badf4c72270bb762ea795d05d51c8b355e3.zip
powder-51b17badf4c72270bb762ea795d05d51c8b355e3.tar.gz
A bit of refactoring (elements)
Diffstat (limited to 'src/elements/amtr.cpp')
-rw-r--r--src/elements/amtr.cpp28
1 files changed, 0 insertions, 28 deletions
diff --git a/src/elements/amtr.cpp b/src/elements/amtr.cpp
deleted file mode 100644
index 5ff4529..0000000
--- a/src/elements/amtr.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-#include "simulation/Element.h"
-
-int update_AMTR(UPDATE_FUNC_ARGS) {
- int r, rx, ry;
- for (rx=-1; rx<2; rx++)
- for (ry=-1; ry<2; ry++)
- if (x+rx>=0 && y+ry>0 && x+rx<XRES && y+ry<YRES && (rx || ry))
- {
- r = pmap[y+ry][x+rx];
- if (!r)
- continue;
- if ((r&0xFF)!=PT_AMTR && (r&0xFF)!=PT_DMND && (r&0xFF)!=PT_CLNE && (r&0xFF)!=PT_PCLN && (r&0xFF)!=PT_NONE && (r&0xFF)!=PT_PHOT && (r&0xFF)!=PT_VOID && (r&0xFF)!=PT_BHOL && (r&0xFF)!=PT_NBHL && (r&0xFF)!=PT_PRTI && (r&0xFF)!=PT_PRTO)
- {
- parts[i].life++;
- if (parts[i].life==4)
- {
- sim->kill_part(i);
- return 1;
- }
- if (10>(rand()/(RAND_MAX/100)))
- sim->create_part(r>>8, x+rx, y+ry, PT_PHOT);
- else
- sim->kill_part(r>>8);
- sim->pv[y/CELL][x/CELL] -= 2.0f;
- }
- }
- return 0;
-}