]> git.localhorst.tv Git - blank.git/blob - src/app/UnloadState.hpp
the sound thing
[blank.git] / src / app / UnloadState.hpp
1 #ifndef BLANK_APP_UNLOADSTATE_HPP_
2 #define BLANK_APP_UNLOADSTATE_HPP_
3
4 #include "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 ChunkLoader;
16 class Environment;
17
18 class UnloadState
19 : public State {
20
21 public:
22         UnloadState(Environment &, ChunkLoader &);
23
24         void OnResume();
25
26         void Handle(const SDL_Event &) override;
27         void Update(int dt) override;
28         void Render(Viewport &) override;
29
30 private:
31         Environment &env;
32         ChunkLoader &loader;
33         Progress progress;
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 #endif