World of Might and Magic  0.2.0
Open reimplementation of Might and Magic 6 7 8 game engine
Game.h
См. документацию.
1 #pragma once
2 
3 #include <memory>
4 
8 
9 #include "Engine/Engine.h"
10 #include "Engine/IocContainer.h"
11 
12 
15 
16 
17 namespace Application {
18 
19 class Game {
20  public:
21  inline Game() {
22  this->log = EngineIoc::ResolveLogger();
26  this->vis = EngineIoc::ResolveVis();
28  }
29 
30  bool Configure(std::shared_ptr<const Configuration> config);
31  void Run();
32 
33  private:
34  bool Loop();
35  void EventLoop();
36  void GameLoop();
38  void OnEscape();
39  void OnPressSpace();
40 
41 
42  std::shared_ptr<const Configuration> config;
43  std::shared_ptr<Engine> engine;
44  Log *log = nullptr;
45  Mouse *mouse = nullptr;
46  Keyboard *keyboard = nullptr;
48  Vis *vis = nullptr;
49 
50  Menu *menu = nullptr;
51 };
52 
53 } // namespace Application
54 
55 extern class Image *gamma_preview_image; // 506E40
Engine_::IocContainer
Definition: IocContainer.h:15
IocContainer.h
Application::Game::keyboard
Keyboard * keyboard
Definition: Game.h:46
Application::Game::CloseTargetedSpellWindow
void CloseTargetedSpellWindow()
Definition: Game.cpp:285
IocContainer.h
Mouse
Definition: Mouse.h:279
Application::Game::GameLoop
void GameLoop()
Definition: Game.cpp:2704
Engine_::IocContainer::ResolveLogger
static Log * ResolveLogger()
Definition: IocContainer.cpp:51
Application::Game::decal_builder
DecalBuilder * decal_builder
Definition: Game.h:47
Application::Game::log
Log * log
Definition: Game.h:44
Log
Definition: Log.h:3
Engine.h
Application::Game::vis
Vis * vis
Definition: Game.h:48
Application::Menu
Definition: GameMenu.h:9
Engine_::IocContainer::ResolveVis
static Vis * ResolveVis()
Definition: IocContainer.cpp:110
Image
Definition: Image.h:19
Application::Game::Configure
bool Configure(std::shared_ptr< const Configuration > config)
Definition: Game.cpp:92
Application::IocContainer::ResolveGameMenu
static Menu * ResolveGameMenu()
Definition: IocContainer.cpp:13
Vis
Definition: Vis.h:69
Application::Game::Loop
bool Loop()
Definition: Game.cpp:134
Application::Game::menu
Menu * menu
Definition: Game.h:50
Engine_::IocContainer::ResolveDecalBuilder
static DecalBuilder * ResolveDecalBuilder()
Definition: IocContainer.cpp:60
GameMenu.h
Engine_::IocContainer::ResolveMouse
static Mouse * ResolveMouse()
Definition: IocContainer.cpp:88
Application::Game::OnPressSpace
void OnPressSpace()
Definition: Game.cpp:2697
Application::Game::Game
Game()
Definition: Game.h:21
Application
Definition: Configuration.h:5
Configuration.h
gamma_preview_image
class Image * gamma_preview_image
Definition: Game.cpp:242
Application::Game::Run
void Run()
Definition: Game.cpp:100
Application::Game
Definition: Game.h:19
Application::IocContainer
Definition: IocContainer.h:8
Application::Game::EventLoop
void EventLoop()
Definition: Game.cpp:322
Application::Game::OnEscape
void OnEscape()
Definition: Game.cpp:300
Application::Game::engine
std::shared_ptr< Engine > engine
Definition: Game.h:43
Engine_::IocContainer::ResolveKeyboard
static Keyboard * ResolveKeyboard()
Definition: IocContainer.cpp:96
config
EGLConfig config
Definition: SDL_egl.h:1149
Application::Game::mouse
Mouse * mouse
Definition: Game.h:45
Keyboard
Definition: Keyboard.h:76
DecalBuilder
Definition: DecalBuilder.h:123
Application::Game::config
std::shared_ptr< const Configuration > config
Definition: Game.h:42