diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-12-12 22:45:12 +0100 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-12-12 22:45:12 +0100 |
commit | 23196be83778973d9688cc5d465e4e4a16476568 (patch) | |
tree | 91dee3b2c2e05d3b529cf537d12a7faf7ec21dc1 /src/crepe/system/ReplaySystem.h | |
parent | 297d621987c224db26eadfb9bde9235741387496 (diff) |
add documentation
Diffstat (limited to 'src/crepe/system/ReplaySystem.h')
-rw-r--r-- | src/crepe/system/ReplaySystem.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/crepe/system/ReplaySystem.h b/src/crepe/system/ReplaySystem.h index 919c554..8ba60d5 100644 --- a/src/crepe/system/ReplaySystem.h +++ b/src/crepe/system/ReplaySystem.h @@ -7,6 +7,11 @@ namespace crepe { +/** + * \brief ReplayManager helper system + * + * This system records and replays recordings using ReplayManager. + */ class ReplaySystem : public System { public: using System::System; @@ -14,15 +19,25 @@ public: void fixed_update() override; private: + //! Last ReplayManager state ReplayManager::State last_state = ReplayManager::IDLE; + /** + * \brief Playback snapshot + * + * When starting playback, the component state is saved and most systems are disabled. This + * struct stores the engine state before ReplayManager::play is called. + */ struct Snapshot { ComponentManager::Snapshot components; SystemManager::Snapshot systems; }; + //! Before playback snapshot Snapshot playback; + //! Snapshot state and disable systems during playback void playback_begin(); + //! Restore state from before \c playback_begin() void playback_end(); }; |