Match LegoGameState::Username::Serialize

This commit is contained in:
Christian Semmler
2025-01-12 12:38:53 -07:00
parent 3b47366f05
commit 0c63127b20
2 changed files with 6 additions and 6 deletions

View File

@@ -111,7 +111,7 @@ public:
Username(Username& p_other) { Set(p_other); } Username(Username& p_other) { Set(p_other); }
void Set(Username& p_other) { memcpy(m_letters, p_other.m_letters, sizeof(m_letters)); } void Set(Username& p_other) { memcpy(m_letters, p_other.m_letters, sizeof(m_letters)); }
MxResult Serialize(LegoStorage* p_storage); MxResult Serialize(LegoFile* p_file);
Username& operator=(const Username& p_other); Username& operator=(const Username& p_other);
MxS16 m_letters[7]; // 0x00 MxS16 m_letters[7]; // 0x00

View File

@@ -1153,16 +1153,16 @@ LegoGameState::Username::Username()
// FUNCTION: LEGO1 0x1003c690 // FUNCTION: LEGO1 0x1003c690
// FUNCTION: BETA10 0x10086c57 // FUNCTION: BETA10 0x10086c57
MxResult LegoGameState::Username::Serialize(LegoStorage* p_storage) MxResult LegoGameState::Username::Serialize(LegoFile* p_file)
{ {
if (p_storage->IsReadMode()) { if (p_file->IsReadMode()) {
for (MxS16 i = 0; i < (MxS16) sizeOfArray(m_letters); i++) { for (MxS16 i = 0; i < (MxS16) sizeOfArray(m_letters); i++) {
Read(p_storage, &m_letters[i]); p_file->Read(m_letters[i]);
} }
} }
else if (p_storage->IsWriteMode()) { else if (p_file->IsWriteMode()) {
for (MxS16 i = 0; i < (MxS16) sizeOfArray(m_letters); i++) { for (MxS16 i = 0; i < (MxS16) sizeOfArray(m_letters); i++) {
Write(p_storage, m_letters[i]); p_file->Write(m_letters[i]);
} }
} }