]> git.localhorst.tv Git - blank.git/blob - app/ServerState.hpp
new gcc version
[blank.git] / app / ServerState.hpp
1 #ifndef BLANK_APP_SERVERSTATE_HPP_
2 #define BLANK_APP_SERVERSTATE_HPP_
3
4 #include "IntervalTimer.hpp"
5 #include "State.hpp"
6 #include "../net/Server.hpp"
7 #include "../world/BlockTypeRegistry.hpp"
8 #include "../world/World.hpp"
9
10
11 namespace blank {
12
13 class HeadlessEnvironment;
14
15 class ServerState
16 : public State {
17
18 public:
19         ServerState(
20                 HeadlessEnvironment &,
21                 const World::Config &,
22                 const WorldSave &,
23                 const Server::Config &
24         );
25
26         void Handle(const SDL_Event &) override;
27         void Update(int dt) override;
28         void Render(Viewport &) override;
29
30 private:
31         HeadlessEnvironment &env;
32         BlockTypeRegistry block_types;
33         World world;
34         Server server;
35         IntervalTimer push_timer;
36
37 };
38
39 }
40
41 #endif