Build viewer/editor #13

Manually merged
williamjcm merged 128 commits from mass-viewer into master 2022-03-02 14:50:10 +01:00
Showing only changes of commit d3d065c945 - Show all commits

View file

@ -55,13 +55,19 @@ auto StructSerialiser::deserialise(const std::string& name, const std::string& t
} }
else { else {
for(UnsignedInt i = 0; i < count; i++) { for(UnsignedInt i = 0; i < count; i++) {
auto prop = readStructValue(name, item_type, value_length, reader, serialiser); auto prop = Containers::pointer<UnrealPropertyBase>();
prop = serialiser.readItem(reader, item_type, UnsignedLong(-1), name);
if(!prop) {
prop = readStructValue(name, item_type, value_length, reader, serialiser);
}
if(!prop) { if(!prop) {
return nullptr; return nullptr;
} }
prop->structGuid = guid; static_cast<StructProperty*>(prop.get())->structGuid = guid;
arrayAppend(array, std::move(prop)); arrayAppend(array, std::move(prop));
} }
@ -131,8 +137,10 @@ auto StructSerialiser::serialise(Containers::ArrayView<UnrealPropertyBase::ptr>
return false; return false;
} }
if(!writeStructValue(struct_prop, bytes_written_here, writer, serialiser)) { if(!serialiser.writeItem(prop, struct_prop->structType, bytes_written_here, writer)) {
return false; if(!writeStructValue(struct_prop, bytes_written_here, writer, serialiser)) {
return false;
}
} }
} }