| 126 | } |
| 127 | |
| 128 | void sugoi_storage_t::serialize_type(const sugoi_entity_type_t& type, skr_binary_writer_t* s, bool keepMeta) |
| 129 | { |
| 130 | using namespace sugoi; |
| 131 | namespace bin = skr::binary; |
| 132 | // group is define by entity_type, so we just serialize it's type |
| 133 | // todo: assert(s.is_serialize()); |
| 134 | bin::Archive(s, type.type.length); |
| 135 | auto& reg = type_registry_t::get(); |
| 136 | for (SIndex i = 0; i < type.type.length; i++) |
| 137 | { |
| 138 | auto t = type.type.data[i]; |
| 139 | bin::Archive(s, reg.descriptions[type_index_t(t).index()].guid); |
| 140 | } |
| 141 | if(keepMeta) |
| 142 | { |
| 143 | bin::Archive(s, type.meta.length); |
| 144 | ArchiveBuffer(s, type.meta.data, type.meta.length); |
| 145 | } |
| 146 | } |
| 147 | |
| 148 | sugoi_entity_type_t sugoi_storage_t::deserialize_type(sugoi::fixed_stack_t& stack, skr_binary_reader_t* s, bool keepMeta) |
| 149 | { |
nothing calls this directly
no test coverage detected