summaryrefslogtreecommitdiff
path: root/terrain_cache.h
diff options
context:
space:
mode:
Diffstat (limited to 'terrain_cache.h')
-rw-r--r--terrain_cache.h45
1 files changed, 0 insertions, 45 deletions
diff --git a/terrain_cache.h b/terrain_cache.h
deleted file mode 100644
index 2ea4e15..0000000
--- a/terrain_cache.h
+++ /dev/null
@@ -1,45 +0,0 @@
-#ifndef TERRAIN_CACHE_H
-#define TERRAIN_CACHE_H
-
-#include "terrain_loader.h"
-
-#include <boost/shared_ptr.hpp>
-
-#include <map>
-#include <cstddef>
-
-class TerrainCache;
-
-struct TerrainCacheObject {
- typedef boost::shared_ptr<TerrainCacheObject> p;
-
- TerrainCache *cache;
- float *heights;
- int x, y, width, height;
-
- TerrainCacheObject(TerrainCache *cache, int x, int y, int width, int height);
- virtual ~TerrainCacheObject();
-};
-
-class TerrainCache {
- friend class TerrainCacheObject;
-
- private:
- typedef std::pair<int, int> intpair;
- typedef std::map<intpair, TerrainCacheObject::p> cache_map;
-
- cache_map caches;
- TerrainLoader *tl;
- size_t max_size;
-
- TerrainCacheObject::p make_object(int x, int y, int width, int height);
-
- public:
- TerrainCache(int seed, fs::path root, size_t max_size);
- virtual ~TerrainCache();
-
- TerrainCacheObject::p get_chunk(int x, int y, int width, int height);
- size_t get_size();
-};
-
-#endif