From ef37d054dfe5812efa9eefb4b9b18621fdabac25 Mon Sep 17 00:00:00 2001 From: Jonathan Bradley Date: Mon, 21 Apr 2025 15:46:46 -0400 Subject: pke: first-pass serializing ui and font renders --- src/serialization.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/serialization.cpp') 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(mapping); + return inst_mapping->serialized_uuid == *reinterpret_cast(handle); +} + srlztn_serialize_helper *pke_serialize_init(pk_membucket *bkt) { srlztn_serialize_helper *helper = pk_new(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; -- cgit v1.2.3