]> git.localhorst.tv Git - blank.git/blob - src/standalone/UnloadState.hpp
fixed some initialization issues
[blank.git] / src / standalone / UnloadState.hpp
1 #ifndef BLANK_STANDALONE_UNLOADSTATE_HPP_
2 #define BLANK_STANDALONE_UNLOADSTATE_HPP_
3
4 #include "../app/State.hpp"
5
6 #include "../ui/Progress.hpp"
7
8 #include <cstddef>
9 #include <list>
10
11
12 namespace blank {
13
14 class Chunk;
15 class ChunkStore;
16 class Environment;
17 class WorldSave;
18
19 namespace standalone {
20
21 class UnloadState
22 : public State {
23
24 public:
25         UnloadState(Environment &, ChunkStore &, const WorldSave &);
26
27         void OnResume();
28
29         void Handle(const SDL_Event &) override;
30         void Update(int dt) override;
31         void Render(Viewport &) override;
32
33 private:
34         Environment &env;
35         ChunkStore &chunks;
36         const WorldSave &save;
37         Progress progress;
38         std::list<Chunk>::iterator cur;
39         std::list<Chunk>::iterator end;
40         std::size_t done;
41         std::size_t total;
42         std::size_t per_update;
43
44 };
45
46 }
47 }
48
49 #endif