summaryrefslogtreecommitdiff
path: root/src/simulation/Simulation.h
diff options
context:
space:
mode:
authorSimon 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)
commitedad8f46af6cf2403c2ffa77ecfa138ae1b9f8d9 (patch)
tree94ac1023a0241e27176d63aabee26fd1b876e08b /src/simulation/Simulation.h
parentf19c7f62c77f6a3e8f5728e015166b0c625f5f67 (diff)
downloadpowder-edad8f46af6cf2403c2ffa77ecfa138ae1b9f8d9.zip
powder-edad8f46af6cf2403c2ffa77ecfa138ae1b9f8d9.tar.gz
Undo/Snapshots, fixes #118
Diffstat (limited to 'src/simulation/Simulation.h')
-rw-r--r--src/simulation/Simulation.h5
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);