finishing first step of serialization : the basics

This commit is contained in:
Patedam committed 2026-09-07 19:42:15 -04:00
1 parent a462575af4
commit b1de6ccc49
8 files changed
+406 -110

No files matched your search

+3 -4
View File
@@ -38,10 +38,8 @@ struct Archive
{
Arena* arena;
bool loading;
ParsedArchive base = {};
IOStream* stream = nullptr;
uint32 base_version = 0;
uint16 class_version = 0;
ParsedArchive base = {};
IOStream* stream = nullptr;
// to remove
void* base_ptr = nullptr;
@@ -94,6 +92,7 @@ bool read_prop(Archive& /*ar*/, String value_raw, Type& value)
}
#define SERIALIZE(ar, name, var) serialize((ar), ConstString(#name), #name##_crc32, (var))
#define SERIALIZE_SIMPLE(ar, var) SERIALIZE(ar, var, var)
template <typename Type>
bool serialize(Archive& ar, String property_name, uint32 property_crc, Type& value)