summaryrefslogtreecommitdiff
path: root/terrain_loader.h
blob: 7efa5966e38a679aee2a97028e4bb0fe63b01f92 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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