mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-12 03:01:17 +00:00
Match LegoGameState::ScoreItem::Serialize
This commit is contained in:
parent
0c63127b20
commit
a269bedcff
@ -121,10 +121,10 @@ class LegoGameState {
|
||||
struct ScoreItem {
|
||||
MxResult Serialize(LegoFile* p_file);
|
||||
|
||||
MxS16 m_totalScore; // 0x00
|
||||
MxU8 m_scores[5][5]; // 0x02
|
||||
Username m_name; // 0x1c
|
||||
undefined2 m_unk0x2a; // 0x2a
|
||||
MxS16 m_totalScore; // 0x00
|
||||
MxU8 m_scores[5][5]; // 0x02
|
||||
Username m_name; // 0x1c
|
||||
MxS16 m_unk0x2a; // 0x2a
|
||||
};
|
||||
|
||||
// SIZE 0x372
|
||||
|
||||
@ -1182,28 +1182,28 @@ LegoGameState::Username& LegoGameState::Username::operator=(const Username& p_ot
|
||||
MxResult LegoGameState::ScoreItem::Serialize(LegoFile* p_file)
|
||||
{
|
||||
if (p_file->IsReadMode()) {
|
||||
Read(p_file, &m_totalScore);
|
||||
p_file->Read(m_totalScore);
|
||||
|
||||
for (MxS32 i = 0; i < 5; i++) {
|
||||
for (MxS32 j = 0; j < 5; j++) {
|
||||
Read(p_file, &m_scores[i][j]);
|
||||
p_file->Read(m_scores[i][j]);
|
||||
}
|
||||
}
|
||||
|
||||
m_name.Serialize(p_file);
|
||||
Read(p_file, &m_unk0x2a);
|
||||
p_file->Read(m_unk0x2a);
|
||||
}
|
||||
else if (p_file->IsWriteMode()) {
|
||||
Write(p_file, m_totalScore);
|
||||
p_file->Write(m_totalScore);
|
||||
|
||||
for (MxS32 i = 0; i < 5; i++) {
|
||||
for (MxS32 j = 0; j < 5; j++) {
|
||||
Write(p_file, m_scores[i][j]);
|
||||
p_file->Write(m_scores[i][j]);
|
||||
}
|
||||
}
|
||||
|
||||
m_name.Serialize(p_file);
|
||||
Write(p_file, m_unk0x2a);
|
||||
p_file->Write(m_unk0x2a);
|
||||
}
|
||||
|
||||
return SUCCESS;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user