From 0073f833c88f4a25dadc777495639069ba9d7bed Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Mon, 9 May 2011 23:47:45 +0200 Subject: Simple flat file-based saving and loading of chunks. --- terrain.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'terrain.h') 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); }; -- cgit v1.2.3