summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2021-03-13 07:11:56 -0500
committerStar Rauchenberger <fefferburbia@gmail.com>2021-03-13 15:34:50 -0500
commit3c505f6f7fa5d4fab7c2a2864a45c8f5d0b4d329 (patch)
tree0c46beb4097378189b0bb9ac3738b869b29b24b5 /src
parentfb26b9b9c89ff242576d68de5a0bef189087ad15 (diff)
downloadtanetane-3c505f6f7fa5d4fab7c2a2864a45c8f5d0b4d329.tar.gz
tanetane-3c505f6f7fa5d4fab7c2a2864a45c8f5d0b4d329.tar.bz2
tanetane-3c505f6f7fa5d4fab7c2a2864a45c8f5d0b4d329.zip
Created MenuSystem
It currently has nothing in it.

#7
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp2
-rw-r--r--src/menu_system.cpp2
-rw-r--r--src/menu_system.h20
-rw-r--r--src/system.h3
4 files changed, 26 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp index 56d4301..f1a8e42 100644 --- a/src/main.cpp +++ b/src/main.cpp
@@ -15,6 +15,7 @@
15#include "effect_system.h" 15#include "effect_system.h"
16#include "behaviour_system.h" 16#include "behaviour_system.h"
17#include "mirror_system.h" 17#include "mirror_system.h"
18#include "menu_system.h"
18 19
19void loop(Renderer& renderer, std::mt19937& rng) { 20void loop(Renderer& renderer, std::mt19937& rng) {
20 Game game(renderer, rng); 21 Game game(renderer, rng);
@@ -28,6 +29,7 @@ void loop(Renderer& renderer, std::mt19937& rng) {
28 game.emplaceSystem<CameraSystem>(); 29 game.emplaceSystem<CameraSystem>();
29 game.emplaceSystem<MessageSystem>(); 30 game.emplaceSystem<MessageSystem>();
30 game.emplaceSystem<EffectSystem>(); 31 game.emplaceSystem<EffectSystem>();
32 game.emplaceSystem<MenuSystem>();
31 33
32 game.loadMap("hallucination_interior"); 34 game.loadMap("hallucination_interior");
33 35
diff --git a/src/menu_system.cpp b/src/menu_system.cpp new file mode 100644 index 0000000..a5f3539 --- /dev/null +++ b/src/menu_system.cpp
@@ -0,0 +1,2 @@
1#include "menu_system.h"
2#include "game.h"
diff --git a/src/menu_system.h b/src/menu_system.h new file mode 100644 index 0000000..46963b2 --- /dev/null +++ b/src/menu_system.h
@@ -0,0 +1,20 @@
1#ifndef MENU_SYSTEM_H_205861EC
2#define MENU_SYSTEM_H_205861EC
3
4#include "system.h"
5
6class Game;
7
8class MenuSystem : public System {
9public:
10
11 static constexpr SystemKey Key = SystemKey::Menu;
12
13 explicit MenuSystem(Game& game) : game_(game) {}
14
15private:
16
17 Game& game_;
18};
19
20#endif /* end of include guard: MENU_SYSTEM_H_205861EC */
diff --git a/src/system.h b/src/system.h index a129b3b..b712b72 100644 --- a/src/system.h +++ b/src/system.h
@@ -11,7 +11,8 @@ enum class SystemKey {
11 Animation, 11 Animation,
12 Camera, 12 Camera,
13 Message, 13 Message,
14 Effect 14 Effect,
15 Menu
15}; 16};
16 17
17class System { 18class System {