aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/manager/ComponentManager.h
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-12-11 21:04:30 +0100
committerLoek Le Blansch <loek@pipeframe.xyz>2024-12-11 21:04:30 +0100
commit359ad8db97305856f4cfdade1cd1dada78a7a635 (patch)
treea6d5dce34c2aa5406744c414baccf6a2450dd8a5 /src/crepe/manager/ComponentManager.h
parent313da47b72aafa0b40ac2cd2b586d525ed17fbd4 (diff)
more replay system WIP
Diffstat (limited to 'src/crepe/manager/ComponentManager.h')
-rw-r--r--src/crepe/manager/ComponentManager.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/crepe/manager/ComponentManager.h b/src/crepe/manager/ComponentManager.h
index dd7c154..457a196 100644
--- a/src/crepe/manager/ComponentManager.h
+++ b/src/crepe/manager/ComponentManager.h
@@ -143,10 +143,15 @@ public:
RefVector<T> get_components_by_tag(const std::string & tag) const;
struct SnapshotComponent {
- Component component;
+ std::type_index type;
+ game_object_id_t id;
+ size_t index;
+ std::unique_ptr<Component> component;
};
struct Snapshot {
-
+ // TODO: some kind of hash code that ensures components exist in all the same places as
+ // this snapshot
+ std::vector<SnapshotComponent> components;
};
Snapshot save();
void restore(const Snapshot &);