mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-27 10:24:18 +00:00
Begin refactor Serialize functions
This commit is contained in:
@@ -124,12 +124,12 @@ MxResult PizzeriaState::Serialize(LegoFile* p_file)
|
||||
|
||||
if (p_file->IsReadMode()) {
|
||||
for (MxS16 i = 0; i < 5; i++) {
|
||||
m_unk0x08[i].ReadFromFile(p_file);
|
||||
p_file->Read(m_unk0x08[i].m_nextIndex);
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (MxS16 i = 0; i < 5; i++) {
|
||||
m_unk0x08[i].WriteToFile(p_file);
|
||||
p_file->Write(m_unk0x08[i].m_nextIndex);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2943,7 +2943,7 @@ MxResult AnimState::Serialize(LegoFile* p_file)
|
||||
// LegoState::Serialize(p_file);
|
||||
// Option 2:
|
||||
if (p_file->IsWriteMode()) {
|
||||
p_file->WriteString(ClassName());
|
||||
p_file->Write(MxString(ClassName()));
|
||||
}
|
||||
|
||||
if (p_file->IsReadMode()) {
|
||||
|
||||
@@ -743,7 +743,7 @@ void WriteDefaultTexture(LegoFile* p_file, const char* p_name)
|
||||
LegoTexture texture;
|
||||
texture.SetImage(image);
|
||||
|
||||
p_file->WriteString(name);
|
||||
p_file->Write(MxString(name));
|
||||
texture.Write(p_file);
|
||||
}
|
||||
else {
|
||||
@@ -760,7 +760,7 @@ void WriteDefaultTexture(LegoFile* p_file, const char* p_name)
|
||||
// FUNCTION: LEGO1 0x1003f8a0
|
||||
void WriteNamedTexture(LegoFile* p_file, LegoNamedTexture* p_namedTexture)
|
||||
{
|
||||
p_file->WriteString(*p_namedTexture->GetName());
|
||||
p_file->Write(MxString(*p_namedTexture->GetName()));
|
||||
p_namedTexture->GetTexture()->Write(p_file);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user