diff options
| author | Jonathan Bradley <jcb@pikum.xyz> | 2025-04-21 15:46:46 -0400 |
|---|---|---|
| committer | Jonathan Bradley <jcb@pikum.xyz> | 2025-04-21 15:46:46 -0400 |
| commit | ef37d054dfe5812efa9eefb4b9b18621fdabac25 (patch) | |
| tree | 713042c875004da0058bf5813c4b2b736b6c4ed3 /src/serialization.cpp | |
| parent | a066448effaa9a56c049136067a73ba0156f65d3 (diff) | |
pke: first-pass serializing ui and font renders
Diffstat (limited to 'src/serialization.cpp')
| -rw-r--r-- | src/serialization.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/serialization.cpp b/src/serialization.cpp index 507a238..b41c70d 100644 --- a/src/serialization.cpp +++ b/src/serialization.cpp @@ -5,6 +5,11 @@ #include "camera.hpp" #include "ecs.hpp" +bool srlztn_mapping_find_first_handle_by_uuid(void *handle, void *mapping) { + srlztn_instance_mapping *inst_mapping = reinterpret_cast<srlztn_instance_mapping *>(mapping); + return inst_mapping->serialized_uuid == *reinterpret_cast<pk_uuid *>(handle); +} + srlztn_serialize_helper *pke_serialize_init(pk_membucket *bkt) { srlztn_serialize_helper *helper = pk_new<srlztn_serialize_helper>(bkt); // TODO custom allocator @@ -51,7 +56,7 @@ void pke_serialize_file_scene(srlztn_serialize_helper *h) { const auto &instance = instances[i]; if (instance.entHandle == EntityHandle_MAX) continue; - if (instance.flags & COMPONENT_INSTANCE_FLAG_DO_NOT_SERIALIZE) { + if (PK_HAS_FLAG(instance.comp_instance_flags, COMPONENT_INSTANCE_FLAG_DO_NOT_SERIALIZE)) { continue; } h->o << SRLZTN_OBJ_INSTANCE << std::endl; |
