Fix writing/reading of game state (#834)

* Fix writing/reading of game state

* Match existing state serialization functions
This commit is contained in:
Christian Semmler
2024-04-21 09:42:08 -04:00
committed by GitHub
parent 26f2dd1e5f
commit c9db98c4c3
42 changed files with 71 additions and 79 deletions

View File

@@ -20,8 +20,8 @@ AmbulanceMissionState::AmbulanceMissionState()
}
// STUB: LEGO1 0x10037440
MxResult AmbulanceMissionState::VTable0x1c(LegoFile* p_legoFile)
MxResult AmbulanceMissionState::Serialize(LegoFile* p_legoFile)
{
// TODO
return 0;
return LegoState::Serialize(p_legoFile);
}

View File

@@ -14,11 +14,9 @@ HospitalState::HospitalState()
}
// FUNCTION: LEGO1 0x10076530
MxResult HospitalState::VTable0x1c(LegoFile* p_legoFile)
MxResult HospitalState::Serialize(LegoFile* p_legoFile)
{
if (p_legoFile->IsWriteMode()) {
p_legoFile->FUN_10006030(ClassName());
}
LegoState::Serialize(p_legoFile);
if (p_legoFile->IsWriteMode()) {
// A write variable needs to be used here, otherwise