diff options
author | Clyne Sullivan <tullivan99@gmail.com> | 2015-09-10 21:23:08 -0400 |
---|---|---|
committer | Clyne Sullivan <tullivan99@gmail.com> | 2015-09-10 21:23:08 -0400 |
commit | e2c16377c87b2ba70bea8fc1fb428eae525b5cf9 (patch) | |
tree | 53ab50d515e604646034e39db9e79e60cc53b68b /include | |
parent | a103b556146e434d038487fe518b854da8bc10d3 (diff) |
world saving
Diffstat (limited to 'include')
-rw-r--r-- | include/World.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/World.h b/include/World.h index f6a08f9..08ecabb 100644 --- a/include/World.h +++ b/include/World.h @@ -11,7 +11,7 @@ private: struct line_t {
// x = 2.0 (window width) / HLINES
double start; // Where to change to dirt, going down (y)
- } *line;
+ } __attribute__ ((packed)) *line;
unsigned int lineCount;
public:
World *toLeft,*toRight;
@@ -20,6 +20,8 @@ public: void draw(void);
void detect(vec2 *v,const float width);
float getWidth(void);
+ void saveToFile(FILE *f,World *parent);
+ void loadFromFile(FILE *f,World *parent);
};
#endif // WORLD_H |