summaryrefslogtreecommitdiff
path: root/terrain.h
diff options
context:
space:
mode:
authorJon Bergli Heier <snakebite@jvnv.net>2011-05-09 23:47:45 +0200
committerJon Bergli Heier <snakebite@jvnv.net>2011-05-09 23:47:45 +0200
commit0073f833c88f4a25dadc777495639069ba9d7bed (patch)
tree6586c91497d2aab3ec2ef6d188ac2c3eecba06eb /terrain.h
parenta820c852d14f466f3d9096c7efcd571d3bf006eb (diff)
Simple flat file-based saving and loading of chunks.
Diffstat (limited to 'terrain.h')
-rw-r--r--terrain.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/terrain.h b/terrain.h
index b50c5e5..736b719 100644
--- a/terrain.h
+++ b/terrain.h
@@ -60,10 +60,13 @@ class Terrain {
float *generate_heights(int x, int y, int width, int height);
float *get_chunk(int x, int y, int width, int height);
bool has_chunk(int x, int y);
+ void save_chunk(float *chunk, int x, int y, int width, int height);
+ float *load_chunk(int x, int y, int width, int height);
void raise(float x, float z, float radius, float focus, float strength, bool up = true);
void update(float x, float z);
+ Chunk *find_chunk(float x, float y);
Node *find(float x, float y);
};