From 38f14606c78c119d452f302f17329455e29a9a6f Mon Sep 17 00:00:00 2001 From: HampusM Date: Thu, 10 Mar 2022 19:12:31 +0100 Subject: refactor: rename game initializer & move input config --- src/engine/engine.hpp | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 src/engine/engine.hpp (limited to 'src/engine/engine.hpp') diff --git a/src/engine/engine.hpp b/src/engine/engine.hpp new file mode 100644 index 0000000..504fc28 --- /dev/null +++ b/src/engine/engine.hpp @@ -0,0 +1,37 @@ +#pragma once + +#include "DI/auto_wirable.hpp" +#include "interfaces/cursor.hpp" +#include "interfaces/engine.hpp" +#include "interfaces/game.hpp" +#include "interfaces/input.hpp" +#include "interfaces/observable.hpp" +#include "interfaces/scene.hpp" +#include "interfaces/window.hpp" + +#include +#include + +class CLIGameEngine + : public ICLIGameEngine, + public AutoWirable +{ +public: + CLIGameEngine(IGameFactory game_factory, ISceneFactory scene_factory, + std::shared_ptr input_handler, + std::shared_ptr cursor_controller, + std::shared_ptr window) noexcept; + + void start() noexcept override; + +private: + IGameFactory _game_factory; + ISceneFactory _scene_factory; + + std::shared_ptr _input_handler; + std::shared_ptr _cursor_controller; + std::shared_ptr _window; + + void _configure_input(const std::unordered_map &input_config); +}; -- cgit v1.2.3-18-g5258