diff options
| author | jacob1 <jfu614@gmail.com> | 2012-10-04 03:44:59 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-10-05 15:52:53 (GMT) |
| commit | 774bc08c2cad7919573543d711eee826e26f670d (patch) | |
| tree | 795545ca3f1b933002984fe49b943f2598a1f1b1 /src/simulation/Simulation.cpp | |
| parent | d159467b63b930958930f252b208ecb7e959ad97 (diff) | |
| download | powder-774bc08c2cad7919573543d711eee826e26f670d.zip powder-774bc08c2cad7919573543d711eee826e26f670d.tar.gz | |
Move LOLZ/LOVE Rule tables into more appropriate location (element file)
Diffstat (limited to 'src/simulation/Simulation.cpp')
| -rw-r--r-- | src/simulation/Simulation.cpp | 33 |
1 files changed, 4 insertions, 29 deletions
diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index b054cda..61b0944 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -3311,11 +3311,11 @@ void Simulation::update_particles_i(int start, int inc) if (ny+nny>0&&ny+nny<YRES&&nx+nnx>=0&&nx+nnx<XRES) { rt=pmap[ny+nny][nx+nnx]; - if (!rt&&loverule[nnx][nny]==1) + if (!rt&&Element_LOVE::RuleTable[nnx][nny]==1) create_part(-1,nx+nnx,ny+nny,PT_LOVE); else if (!rt) continue; - else if (parts[rt>>8].type==PT_LOVE&&loverule[nnx][nny]==0) + else if (parts[rt>>8].type==PT_LOVE&&Element_LOVE::RuleTable[nnx][nny]==0) kill_part(rt>>8); } } @@ -3329,11 +3329,11 @@ void Simulation::update_particles_i(int start, int inc) if (ny+nny>0&&ny+nny<YRES&&nx+nnx>=0&&nx+nnx<XRES) { rt=pmap[ny+nny][nx+nnx]; - if (!rt&&lolzrule[nny][nnx]==1) + if (!rt&&Element_LOLZ::RuleTable[nny][nnx]==1) create_part(-1,nx+nnx,ny+nny,PT_LOLZ); else if (!rt) continue; - else if (parts[rt>>8].type==PT_LOLZ&&lolzrule[nny][nnx]==0) + else if (parts[rt>>8].type==PT_LOLZ&&Element_LOLZ::RuleTable[nny][nnx]==0) kill_part(rt>>8); } @@ -4747,29 +4747,4 @@ Simulation::Simulation(): clear_sim(); grav->gravity_mask(); - - int loverule[9][9] = - { - {0,0,1,1,0,0,0,0,0}, - {0,1,0,0,1,1,0,0,0}, - {1,0,0,0,0,0,1,0,0}, - {1,0,0,0,0,0,0,1,0}, - {0,1,0,0,0,0,0,0,1}, - {1,0,0,0,0,0,0,1,0}, - {1,0,0,0,0,0,1,0,0}, - {0,1,0,0,1,1,0,0,0}, - {0,0,1,1,0,0,0,0,0}, - }; - int lolzrule[9][9] = - { - {0,0,0,0,0,0,0,0,0}, - {1,0,0,0,0,0,1,0,0}, - {1,0,0,0,0,0,1,0,0}, - {1,0,0,1,1,0,0,1,0}, - {1,0,1,0,0,1,0,1,0}, - {1,0,1,0,0,1,0,1,0}, - {0,1,0,1,1,0,0,1,0}, - {0,1,0,0,0,0,0,1,0}, - {0,1,0,0,0,0,0,1,0}, - }; } |
