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