diff options
Diffstat (limited to 'src/crepe/manager/ReplayManager.h')
-rw-r--r-- | src/crepe/manager/ReplayManager.h | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/crepe/manager/ReplayManager.h b/src/crepe/manager/ReplayManager.h index 242eae4..c50196c 100644 --- a/src/crepe/manager/ReplayManager.h +++ b/src/crepe/manager/ReplayManager.h @@ -1,6 +1,8 @@ #pragma once #include "Manager.h" +#include "ComponentManager.h" +#include <unordered_map> namespace crepe { @@ -18,15 +20,18 @@ protected: void record_frame(); private: - bool recording; - struct Recording { - recording_t id; - std::vector<Memento> frames; - }; + typedef std::vector<ComponentManager::Snapshot> Recording; + + bool recording = false; + recording_t current_recording = -1; + + + std::unordered_map<recording_t, std::unique_ptr<Recording>> memory; public: void record_start(); recording_t record_end(); - + void play(recording_t handle); + void release(recording_t handle); }; } // namespace crepe |