From 7e12ebdf945d40d6f11872cf5852c9bb54d1864f Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Sun, 22 Dec 2024 16:12:31 +0100 Subject: big WIP --- src/crepe/manager/SystemManager.h | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src/crepe/manager/SystemManager.h') diff --git a/src/crepe/manager/SystemManager.h b/src/crepe/manager/SystemManager.h index 614d90c..7b862a3 100644 --- a/src/crepe/manager/SystemManager.h +++ b/src/crepe/manager/SystemManager.h @@ -26,14 +26,14 @@ public: * * Updates the game state based on the elapsed time since the last frame. */ - void frame_update(); + void frame_update() noexcept; /** * \brief Fixed update executed at a fixed rate. * * This function updates physics and game logic based on LoopTimer's fixed_delta_time. */ - void fixed_update(); + void fixed_update() noexcept; private: /** @@ -43,13 +43,20 @@ private: * constructor of \c SystemManager using SystemManager::load_system. */ std::unordered_map> systems; + //! Internal ordered system list entry + struct SystemEntry { + //! System instance reference + System & system; + //! System name + std::string name; + }; /** * \brief Collection of System instances * * This map holds System instances indexed by the system's class typeid. It is filled in the * constructor of \c SystemManager using SystemManager::load_system. */ - std::vector> system_order; + std::vector system_order; /** * \brief Initialize a system * \tparam T System type (must be derivative of \c System) -- cgit v1.2.3