]> git.localhorst.tv Git - blank.git/blob - src/app/WorldState.hpp
save and load chunk data
[blank.git] / src / app / WorldState.hpp
1 #ifndef BLANK_APP_WORLDSTATE_HPP_
2 #define BLANK_APP_WORLDSTATE_HPP_
3
4 #include "State.hpp"
5 #include "../ai/Spawner.hpp"
6 #include "../ui/Interface.hpp"
7 #include "../world/World.hpp"
8
9
10 namespace blank {
11
12 class Environment;
13
14 class WorldState
15 : public State {
16
17 public:
18         WorldState(
19                 Environment &,
20                 const Interface::Config &,
21                 const World::Config &,
22                 const WorldSave &
23         );
24
25         void Handle(const SDL_Event &) override;
26         void Update(int dt) override;
27         void Render(Viewport &) override;
28
29         World &GetWorld() noexcept { return world; }
30
31 private:
32         Environment &env;
33         World world;
34         Spawner spawner;
35         Interface interface;
36
37 };
38
39 }
40
41 #endif