From 0c63127b20cc3914f868d7893fceaed679163753 Mon Sep 17 00:00:00 2001 From: Christian Semmler Date: Sun, 12 Jan 2025 12:38:53 -0700 Subject: [PATCH] Match `LegoGameState::Username::Serialize` --- LEGO1/lego/legoomni/include/legogamestate.h | 2 +- LEGO1/lego/legoomni/src/common/legogamestate.cpp | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/LEGO1/lego/legoomni/include/legogamestate.h b/LEGO1/lego/legoomni/include/legogamestate.h index b7eb47d9..33cb5696 100644 --- a/LEGO1/lego/legoomni/include/legogamestate.h +++ b/LEGO1/lego/legoomni/include/legogamestate.h @@ -111,7 +111,7 @@ public: Username(Username& p_other) { Set(p_other); } 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); MxS16 m_letters[7]; // 0x00 diff --git a/LEGO1/lego/legoomni/src/common/legogamestate.cpp b/LEGO1/lego/legoomni/src/common/legogamestate.cpp index 0db04109..272ef25f 100644 --- a/LEGO1/lego/legoomni/src/common/legogamestate.cpp +++ b/LEGO1/lego/legoomni/src/common/legogamestate.cpp @@ -1153,16 +1153,16 @@ LegoGameState::Username::Username() // FUNCTION: LEGO1 0x1003c690 // 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++) { - 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++) { - Write(p_storage, m_letters[i]); + p_file->Write(m_letters[i]); } }