summaryrefslogtreecommitdiff
path: root/src/client/GameSave.h
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-07-28 01:23:21 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-07-28 01:23:21 (GMT)
commitaa774771a048200976211ac6ce8da5e7e29a7ce7 (patch)
treee7ca088297d3a6f4f294617f1dfd4e44a9caf383 /src/client/GameSave.h
parent385552ceab18ed968f12f6612159452510415048 (diff)
downloadpowder-aa774771a048200976211ac6ce8da5e7e29a7ce7.zip
powder-aa774771a048200976211ac6ce8da5e7e29a7ce7.tar.gz
Collapse gamesave to save space in memory
Diffstat (limited to 'src/client/GameSave.h')
-rw-r--r--src/client/GameSave.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/client/GameSave.h b/src/client/GameSave.h
index a1bd1cf..5bd9e7a 100644
--- a/src/client/GameSave.h
+++ b/src/client/GameSave.h
@@ -65,6 +65,10 @@ public:
void setSize(int width, int height);
char * Serialise(int & dataSize);
void Transform(matrix2d transform, vector2d translate);
+
+ void Expand();
+ void Collapse();
+ bool Collapsed();
inline GameSave& operator << (Particle v)
{
@@ -83,10 +87,14 @@ public:
}
private:
+ bool expanded;
+ bool hasOriginalData;
float * fanVelXPtr;
float * fanVelYPtr;
unsigned char * blockMapPtr;
+ std::vector<char> originalData;
+
void read(char * data, int dataSize);
void readOPS(char * data, int dataLength);
void readPSv(char * data, int dataLength);