]> git.localhorst.tv Git - blank.git/blob - src/app/Environment.hpp
move steering behaviours into entity
[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 "../shared/MessageState.hpp"
10 #include "../ui/Keymap.hpp"
11
12 #include <string>
13
14
15 namespace blank {
16
17 class Window;
18
19 struct HeadlessEnvironment {
20
21         struct Config {
22                 std::string asset_path;
23                 std::string save_path;
24
25                 std::string GetWorldPath(
26                         const std::string &world_name
27                 ) const;
28                 std::string GetWorldPath(
29                         const std::string &world_name,
30                         const std::string &hostname
31                 ) const;
32         } config;
33
34         AssetLoader loader;
35
36         FrameCounter counter;
37
38         StateControl state;
39
40
41         explicit HeadlessEnvironment(const Config &);
42
43 };
44
45
46 struct Environment
47 : public HeadlessEnvironment {
48
49         Assets assets;
50
51         Audio audio;
52         Viewport viewport;
53         Window &window;
54
55         Keymap keymap;
56
57         MessageState msg_state;
58
59
60         Environment(Window &win, const Config &);
61
62         void ShowMessage(const char *);
63
64 };
65
66 }
67
68 #endif