From dc104e37842049e040f7e39f4e1aab56cde1488c Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Wed, 1 Jun 2011 19:02:52 +0200 Subject: Moved common files here. --- terrain_loader.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 terrain_loader.h (limited to 'terrain_loader.h') diff --git a/terrain_loader.h b/terrain_loader.h new file mode 100644 index 0000000..f99fb09 --- /dev/null +++ b/terrain_loader.h @@ -0,0 +1,27 @@ +#ifndef TERRAIN_LOADER_H +#define TERRAIN_LOADER_H + +#include +#include + +namespace fs = boost::filesystem; + +class TerrainLoader { + private: + fs::path root; + + public: + typedef boost::shared_ptr p; + + TerrainLoader(fs::path root); + virtual ~TerrainLoader(); + + float *generate_heights(int64_t x, int64_t y, unsigned int width, unsigned int height); + virtual float *get_chunk(int64_t x, int64_t y, unsigned int width, unsigned int height); + bool has_chunk(int64_t x, int64_t y); + void save_chunk(float *chunk, int64_t x, int64_t y, unsigned int width, unsigned int height); + float *load_chunk(int64_t x, int64_t y, unsigned int width, unsigned int height); + +}; + +#endif -- cgit v1.2.3