summaryrefslogtreecommitdiff
path: root/src/simulation
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-04-02 16:01:28 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-04-02 16:01:28 (GMT)
commitefddc12e5d2aadc5eee1927245ad38b9dee89aed (patch)
treecf7ad38119f0734609944158e33bbb944925c777 /src/simulation
parent289556ac7078963b6af361f5812dd62e6712359f (diff)
downloadpowder-efddc12e5d2aadc5eee1927245ad38b9dee89aed.zip
powder-efddc12e5d2aadc5eee1927245ad38b9dee89aed.tar.gz
Stamps browser, placement + clipboard sampling and placement - No clipboard or stamp thumbnail generation, needs thumbnail generator from SaveLoader
Diffstat (limited to 'src/simulation')
-rw-r--r--src/simulation/Simulation.cpp5
-rw-r--r--src/simulation/Simulation.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp
index ceaae07..ec17454 100644
--- a/src/simulation/Simulation.cpp
+++ b/src/simulation/Simulation.cpp
@@ -13,6 +13,11 @@ int Simulation::Load(unsigned char * data, int dataLength)
return SaveLoader::LoadSave(data, dataLength, this, true, 0, 0);
}
+int Simulation::Load(int x, int y, unsigned char * data, int dataLength)
+{
+ return SaveLoader::LoadSave(data, dataLength, this, false, x, y);
+}
+
unsigned char * Simulation::Save(int & dataLength)
{
return SaveLoader::BuildSave(dataLength, this, 0, 0, XRES, YRES);
diff --git a/src/simulation/Simulation.h b/src/simulation/Simulation.h
index b33b349..dd86953 100644
--- a/src/simulation/Simulation.h
+++ b/src/simulation/Simulation.h
@@ -207,6 +207,7 @@ public:
int sandcolour_b; //TODO: Make a single variable
int Load(unsigned char * data, int dataLength);
+ int Load(int x, int y, unsigned char * data, int dataLength);
unsigned char * Save(int & dataLength);
unsigned char * Save(int x1, int y1, int x2, int y2, int & dataLength);
inline int is_blocking(int t, int x, int y);