]> git.localhorst.tv Git - blank.git/blob - src/world/ChunkLoader.hpp
more fun with AI/steering
[blank.git] / src / world / ChunkLoader.hpp
1 #ifndef BLANK_WORLD_CHUNKLOADER_HPP_
2 #define BLANK_WORLD_CHUNKLOADER_HPP_
3
4 #include <cstddef>
5
6
7 namespace blank {
8
9 class ChunkStore;
10 class Generator;
11 class WorldSave;
12
13 class ChunkLoader {
14
15 public:
16         ChunkLoader(
17                 ChunkStore &,
18                 const Generator &,
19                 const WorldSave &
20         ) noexcept;
21
22         const WorldSave &SaveFile() const noexcept { return save; }
23
24         void Update(int dt);
25
26         int ToLoad() const noexcept;
27
28         // returns true if the chunk was generated
29         // (as opposed to loaded from file)
30         bool LoadOne();
31         void LoadN(std::size_t n);
32
33 private:
34         ChunkStore &store;
35         const Generator &gen;
36         const WorldSave &save;
37
38 };
39
40 }
41
42 #endif