From a9852bd2c5a601f9f9c58b1dff60e9130587657b Mon Sep 17 00:00:00 2001 From: HampusM Date: Sun, 20 Mar 2022 14:09:48 +0100 Subject: refactor: move on start & on exit details to the game class --- src/interfaces/game.hpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/interfaces/game.hpp') diff --git a/src/interfaces/game.hpp b/src/interfaces/game.hpp index cfff8c5..c99c01f 100644 --- a/src/interfaces/game.hpp +++ b/src/interfaces/game.hpp @@ -13,12 +13,14 @@ class IGame public: virtual ~IGame() = default; - virtual void run() = 0; + virtual void on_start() = 0; + + virtual void on_exit() const noexcept = 0; [[nodiscard]] virtual std::unordered_map> - get_input_config( - const std::shared_ptr &window, const std::shared_ptr &scene, - const std::shared_ptr &cursor_controller) const noexcept = 0; + get_input_config() const noexcept = 0; }; -using IGameFactory = std::shared_ptr (*)(); +using IGameFactory = std::shared_ptr (*)( + const std::shared_ptr &window, const std::shared_ptr &scene, + const std::shared_ptr &cursor_controller); -- cgit v1.2.3-18-g5258