diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2012-05-13 19:00:22 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-05-13 19:00:22 (GMT) |
| commit | 7758fe52cb9ef78b562bc2587b17b6344d8829fe (patch) | |
| tree | 92f45320d240148f6e518ed07aec480e329d4a25 /src/simulation | |
| parent | 4032a0469b1f40f7197468f34986e365bd6e7314 (diff) | |
| download | powder-7758fe52cb9ef78b562bc2587b17b6344d8829fe.zip powder-7758fe52cb9ef78b562bc2587b17b6344d8829fe.tar.gz | |
DropDown UI component
Diffstat (limited to 'src/simulation')
| -rw-r--r-- | src/simulation/SaveLoader.cpp | 7 | ||||
| -rw-r--r-- | src/simulation/Simulation.h | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/simulation/SaveLoader.cpp b/src/simulation/SaveLoader.cpp index b07ba08..7db6895 100644 --- a/src/simulation/SaveLoader.cpp +++ b/src/simulation/SaveLoader.cpp @@ -7,6 +7,7 @@ #include <bzlib.h> #include <cmath> +#include "Air.h" #include "SaveLoader.h" //!TODO: enum for LoadSave return @@ -118,7 +119,7 @@ int SaveLoader::PSVLoad(unsigned char * data, int dataLength, Simulation * sim, } if (ver>=46 && replace) { sim->gravityMode = ((c[3]>>2)&0x03);// | ((c[3]>>2)&0x01); - sim->airMode = ((c[3]>>4)&0x07);// | ((c[3]>>4)&0x02) | ((c[3]>>4)&0x01); + sim->air->airMode = ((c[3]>>4)&0x07);// | ((c[3]>>4)&0x02) | ((c[3]>>4)&0x01); } if (ver>=49 && replace) { tempGrav = ((c[3]>>7)&0x01); @@ -170,7 +171,7 @@ int SaveLoader::PSVLoad(unsigned char * data, int dataLength, Simulation * sim, { if (ver<46) { sim->gravityMode = 0; - sim->airMode = 0; + sim->air->airMode = 0; } sim->clear_sim(); } @@ -904,7 +905,7 @@ unsigned char * SaveLoader::PSVBuild(int & dataLength, Simulation * sim, int ori c[0] = 0x50; //0x66; c[1] = 0x53; //0x75; c[2] = 0x76; //0x43; - c[3] = sim->legacy_enable|((sim->sys_pause<<1)&0x02)|((sim->gravityMode<<2)&0x0C)|((sim->airMode<<4)&0x70)|((sim->ngrav_enable<<7)&0x80); + c[3] = sim->legacy_enable|((sim->sys_pause<<1)&0x02)|((sim->gravityMode<<2)&0x0C)|((sim->air->airMode<<4)&0x70)|((sim->ngrav_enable<<7)&0x80); c[4] = SAVE_VERSION; c[5] = CELL; c[6] = bw; diff --git a/src/simulation/Simulation.h b/src/simulation/Simulation.h index f4f8f5b..d200106 100644 --- a/src/simulation/Simulation.h +++ b/src/simulation/Simulation.h @@ -202,7 +202,7 @@ public: int photons[YRES][XRES]; // int gravityMode; - int airMode; + //int airMode; int ngrav_enable; int legacy_enable; int aheat_enable; |
