diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-12-22 16:12:31 +0100 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-12-22 16:12:31 +0100 |
commit | 7e12ebdf945d40d6f11872cf5852c9bb54d1864f (patch) | |
tree | d81f4661e2fd47f487cf0c9627baa1e21dc45b37 /src/crepe/manager/SystemManager.h | |
parent | 61148c757a1f742ff09e40e5347e74e638c7371c (diff) |
big WIP
Diffstat (limited to 'src/crepe/manager/SystemManager.h')
-rw-r--r-- | src/crepe/manager/SystemManager.h | 13 |
1 files changed, 10 insertions, 3 deletions
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<std::type_index, std::unique_ptr<System>> 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<std::reference_wrapper<System>> system_order; + std::vector<SystemEntry> system_order; /** * \brief Initialize a system * \tparam T System type (must be derivative of \c System) |