diff options
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; |
