aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/manager/ReplayManager.h
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-12-11 16:51:03 +0100
committerLoek Le Blansch <loek@pipeframe.xyz>2024-12-11 16:51:03 +0100
commitf0ecbea57a4d75905c4ee79608807187cd8f3e72 (patch)
tree04a399dc7d400aaa9443be19ce13fd97e5822f95 /src/crepe/manager/ReplayManager.h
parentd228d4b3856606ad4395723b2703759a0ebe9832 (diff)
WIP
Diffstat (limited to 'src/crepe/manager/ReplayManager.h')
-rw-r--r--src/crepe/manager/ReplayManager.h17
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