summaryrefslogtreecommitdiff
path: root/terrain_loader.h
diff options
context:
space:
mode:
Diffstat (limited to 'terrain_loader.h')
-rw-r--r--terrain_loader.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/terrain_loader.h b/terrain_loader.h
new file mode 100644
index 0000000..7efa596
--- /dev/null
+++ b/terrain_loader.h
@@ -0,0 +1,25 @@
+#ifndef TERRAIN_LOADER_H
+#define TERRAIN_LOADER_H
+
+#include <boost/filesystem.hpp>
+
+namespace fs = boost::filesystem;
+
+class TerrainLoader {
+ private:
+ int seed;
+ fs::path root;
+
+ public:
+ TerrainLoader(int seed, fs::path root);
+ virtual ~TerrainLoader();
+
+ 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);
+
+};
+
+#endif