From b74611d2b20fc071b8a699f2ce25e61f60118d6e Mon Sep 17 00:00:00 2001 From: HampusM Date: Sun, 22 May 2022 23:13:29 +0200 Subject: refactor: improve input handling & remove commands --- src/engine/engine.hpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'src/engine/engine.hpp') diff --git a/src/engine/engine.hpp b/src/engine/engine.hpp index 1e8a217..b34ea2b 100644 --- a/src/engine/engine.hpp +++ b/src/engine/engine.hpp @@ -12,7 +12,7 @@ #include #include -constexpr auto MIN_TIME_SINCE_LAST_UPDATE_MILLIS = 100; +constexpr auto MIN_TIME_SINCE_LAST_UPDATE_MILLIS = 40; class CLIGameEngine : public ICLIGameEngine, public yacppdic::AutoWirable< @@ -20,14 +20,14 @@ class CLIGameEngine : public ICLIGameEngine, CLIGameEngine, IGameFactory, ISceneFactory, - IInputHandler, + IUserInputObserver, ICursorController> { public: CLIGameEngine( IGameFactory game_factory, ISceneFactory scene_factory, - std::shared_ptr input_handler, + std::shared_ptr user_input_observer, std::shared_ptr cursor_controller) noexcept; void start() noexcept override; @@ -36,9 +36,6 @@ private: IGameFactory _game_factory; ISceneFactory _scene_factory; - std::shared_ptr _input_handler; + std::shared_ptr _user_input_observer; std::shared_ptr _cursor_controller; - - void _configure_input( - const std::unordered_map> &input_config) noexcept; }; -- cgit v1.2.3-18-g5258