mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-23 00:14:22 +00:00
feat: Implement several ::Serialize functions (#1017)
* feat: Implement many ::Serialize functions * address review comments, part 1 [skip ci] * address review comments, part 2 [skip ci] * review comments (final part) * refactor: Remove Read/Write duplication * fix merge conflict * Match PizzeriaState::Serialize again * Remove unused variable, add LegoVehicleBuildState::Serialize * Implement AnimState::Serialize * fix: Conform with naming scheme * refactor: change names back * refactor: int to MxS32 --------- Co-authored-by: jonschz <jonschz@users.noreply.github.com>
This commit is contained in:
@@ -58,6 +58,18 @@ public:
|
||||
|
||||
inline void SetUnknown0x08(MxS16 p_unk0x08) { m_nextIndex = p_unk0x08; }
|
||||
|
||||
inline MxResult ReadFromFile(LegoFile* p_file)
|
||||
{
|
||||
Read(p_file, &m_nextIndex);
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
inline MxResult WriteToFile(LegoFile* p_file)
|
||||
{
|
||||
Write(p_file, m_nextIndex);
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
private:
|
||||
MxU32* m_objectIds; // 0x00
|
||||
MxS16 m_length; // 0x04
|
||||
@@ -88,10 +100,10 @@ public:
|
||||
virtual MxBool SetFlag() { return FALSE; } // vtable+0x18
|
||||
|
||||
// FUNCTION: LEGO1 0x10005fb0
|
||||
virtual MxResult Serialize(LegoFile* p_legoFile)
|
||||
virtual MxResult Serialize(LegoFile* p_file)
|
||||
{
|
||||
if (p_legoFile->IsWriteMode()) {
|
||||
p_legoFile->WriteString(ClassName());
|
||||
if (p_file->IsWriteMode()) {
|
||||
p_file->WriteString(ClassName());
|
||||
}
|
||||
return SUCCESS;
|
||||
} // vtable+0x1c
|
||||
|
Reference in New Issue
Block a user