diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2012-08-16 21:03:40 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-08-16 21:03:40 (GMT) |
| commit | edad8f46af6cf2403c2ffa77ecfa138ae1b9f8d9 (patch) | |
| tree | 94ac1023a0241e27176d63aabee26fd1b876e08b /src/simulation/Simulation.h | |
| parent | f19c7f62c77f6a3e8f5728e015166b0c625f5f67 (diff) | |
| download | powder-edad8f46af6cf2403c2ffa77ecfa138ae1b9f8d9.zip powder-edad8f46af6cf2403c2ffa77ecfa138ae1b9f8d9.tar.gz | |
Undo/Snapshots, fixes #118
Diffstat (limited to 'src/simulation/Simulation.h')
| -rw-r--r-- | src/simulation/Simulation.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/simulation/Simulation.h b/src/simulation/Simulation.h index b9401de..48e06d9 100644 --- a/src/simulation/Simulation.h +++ b/src/simulation/Simulation.h @@ -23,6 +23,7 @@ #define CHANNELS ((int)(MAX_TEMP-73)/100+2) +class Snapshot; class Element; class SimTool; class Brush; @@ -122,6 +123,10 @@ public: GameSave * Save(); GameSave * Save(int x1, int y1, int x2, int y2); SimulationSample Get(int x, int y); + + Snapshot * CreateSnapshot(); + void Restore(const Snapshot & snap); + inline int is_blocking(int t, int x, int y); inline int is_boundary(int pt, int x, int y); inline int find_next_boundary(int pt, int *x, int *y, int dm, int *em); |
