wip entity deserialization phase 1. Unit test not passing because of globals that assume only one entity manager / game state.

This commit is contained in:
2026-09-10 22:50:18 -04:00
parent 615d36b09c
commit 58b79fb499
9 changed files with 518 additions and 259 deletions
+9 -4
View File
@@ -10,10 +10,11 @@ struct Entity final
{
DECLARE_CLASS()
EntityID ID = 0;
Class* derived_kind = nullptr;
DerivedType derived = nullptr;
Vector4 position = {};
EntityID ID = 0;
const Class* derived_kind = nullptr;
DerivedType derived = nullptr;
Vector4 position = {};
bool is_dirty = false;
};
// Can reinterpret cast to this to have the offset of Base and Kind for any entity
@@ -64,3 +65,7 @@ template <typename EntityType>
}
void serialize(Archive& ar, NonNullPtr<Entity> entity);
[[nodiscard]] const Class* find_class_by_name(String name);
[[nodiscard]] const Class* resolve_entity_class(uint8 kind, uint32 crc);