]> git.localhorst.tv Git - blank.git/blob - src/app/Environment.hpp
fix loop removing players from world
[blank.git] / src / app / Environment.hpp
1 #ifndef BLANK_APP_ENVIRONMENT_HPP_
2 #define BLANK_APP_ENVIRONMENT_HPP_
3
4 #include "Assets.hpp"
5 #include "FrameCounter.hpp"
6 #include "StateControl.hpp"
7 #include "../audio/Audio.hpp"
8 #include "../graphics/Viewport.hpp"
9 #include "../ui/Keymap.hpp"
10
11 #include <string>
12
13
14 namespace blank {
15
16 class Window;
17
18 struct HeadlessEnvironment {
19
20         struct Config {
21                 std::string asset_path;
22                 std::string save_path;
23
24                 std::string GetWorldPath(
25                         const std::string &world_name
26                 ) const;
27                 std::string GetWorldPath(
28                         const std::string &world_name,
29                         const std::string &hostname
30                 ) const;
31         } config;
32
33         AssetLoader loader;
34
35         FrameCounter counter;
36
37         StateControl state;
38
39
40         explicit HeadlessEnvironment(const Config &);
41
42 };
43
44
45 struct Environment
46 : public HeadlessEnvironment {
47
48         Assets assets;
49
50         Audio audio;
51         Viewport viewport;
52         Window &window;
53
54         Keymap keymap;
55
56
57         Environment(Window &win, const Config &);
58
59 };
60
61 }
62
63 #endif