mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-22 07:54:23 +00:00
Clear unknowns in LegoGameState
(#1670)
This commit is contained in:
@@ -172,7 +172,7 @@ public:
|
||||
History();
|
||||
void WriteScoreHistory();
|
||||
MxResult Serialize(LegoStorage* p_storage);
|
||||
ScoreItem* FindPlayerInScoreHistory(Username* p_player, MxS16 p_unk0x24, MxS32& p_unk0x2c);
|
||||
ScoreItem* FindPlayerInScoreHistory(Username* p_player, MxS16 p_playerId, MxS32& p_playerScoreHistoryIndex);
|
||||
|
||||
// FUNCTION: BETA10 0x1002c2b0
|
||||
MxS16 GetCount() { return m_count; }
|
||||
@@ -260,7 +260,7 @@ public:
|
||||
MxBool m_isDirty; // 0x420
|
||||
Area m_currentArea; // 0x424
|
||||
Area m_previousArea; // 0x428
|
||||
Area m_unk0x42c; // 0x42c
|
||||
Area m_savedPreviousArea; // 0x42c
|
||||
};
|
||||
|
||||
MxBool ROIColorOverride(const char* p_input, char* p_output, MxU32 p_copyLen);
|
||||
|
@@ -154,7 +154,7 @@ LegoGameState::LegoGameState()
|
||||
m_jukeboxMusic = JukeboxScript::c_noneJukebox;
|
||||
m_currentArea = e_undefined;
|
||||
m_previousArea = e_undefined;
|
||||
m_unk0x42c = e_undefined;
|
||||
m_savedPreviousArea = e_undefined;
|
||||
m_playerCount = 0;
|
||||
m_isDirty = FALSE;
|
||||
m_loadedAct = e_actNotFound;
|
||||
@@ -313,7 +313,7 @@ MxResult LegoGameState::Save(MxULong p_slot)
|
||||
}
|
||||
}
|
||||
|
||||
area = m_unk0x42c;
|
||||
area = m_savedPreviousArea;
|
||||
storage.WriteU16(area);
|
||||
SerializeScoreHistory(LegoFile::c_write);
|
||||
m_isDirty = FALSE;
|
||||
@@ -431,10 +431,10 @@ MxResult LegoGameState::Load(MxULong p_slot)
|
||||
storage.ReadS16(actArea);
|
||||
|
||||
if (m_currentAct == e_act1) {
|
||||
m_unk0x42c = e_undefined;
|
||||
m_savedPreviousArea = e_undefined;
|
||||
}
|
||||
else {
|
||||
m_unk0x42c = (Area) actArea;
|
||||
m_savedPreviousArea = (Area) actArea;
|
||||
}
|
||||
|
||||
result = SUCCESS;
|
||||
@@ -1190,7 +1190,7 @@ void LegoGameState::Init()
|
||||
}
|
||||
}
|
||||
|
||||
m_unk0x42c = e_undefined;
|
||||
m_savedPreviousArea = e_undefined;
|
||||
}
|
||||
|
||||
// FUNCTION: BETA10 0x10086510
|
||||
@@ -1569,18 +1569,18 @@ void LegoGameState::History::WriteScoreHistory()
|
||||
// FUNCTION: BETA10 0x1008732a
|
||||
LegoGameState::ScoreItem* LegoGameState::History::FindPlayerInScoreHistory(
|
||||
LegoGameState::Username* p_player,
|
||||
MxS16 p_unk0x24,
|
||||
MxS32& p_unk0x2c
|
||||
MxS16 p_playerId,
|
||||
MxS32& p_playerScoreHistoryIndex
|
||||
)
|
||||
{
|
||||
MxS32 i = 0;
|
||||
for (; i < m_count; i++) {
|
||||
if (!memcmp(p_player, &m_scores[i].m_name, sizeof(*p_player)) && m_scores[i].m_playerId == p_unk0x24) {
|
||||
if (!memcmp(p_player, &m_scores[i].m_name, sizeof(*p_player)) && m_scores[i].m_playerId == p_playerId) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
p_unk0x2c = i;
|
||||
p_playerScoreHistoryIndex = i;
|
||||
|
||||
if (i >= m_count) {
|
||||
return NULL;
|
||||
|
@@ -220,7 +220,7 @@ MxResult Infocenter::Create(MxDSAction& p_dsAction)
|
||||
|
||||
if (m_infocenterState->m_state == InfocenterState::e_selectedSave) {
|
||||
LegoGameState* state = GameState();
|
||||
state->m_previousArea = GameState()->m_unk0x42c;
|
||||
state->m_previousArea = GameState()->m_savedPreviousArea;
|
||||
}
|
||||
|
||||
InputManager()->Register(this);
|
||||
@@ -1082,7 +1082,7 @@ MxU8 Infocenter::HandleControl(LegoControlManagerNotificationParam& p_param)
|
||||
actionToPlay = GameState()->GetCurrentAct() != LegoGameState::e_act1 ? InfomainScript::c_GoTo_RegBook_Red
|
||||
: InfomainScript::c_GoTo_RegBook;
|
||||
m_radio.Stop();
|
||||
GameState()->m_unk0x42c = GameState()->m_previousArea;
|
||||
GameState()->m_savedPreviousArea = GameState()->m_previousArea;
|
||||
InputManager()->DisableInputProcessing();
|
||||
break;
|
||||
case InfomainScript::c_Mama_Ctl:
|
||||
@@ -1392,7 +1392,7 @@ void Infocenter::Reset()
|
||||
CharacterManager()->ReleaseAllActors();
|
||||
GameState()->SetCurrentAct(LegoGameState::e_act1);
|
||||
GameState()->m_previousArea = LegoGameState::e_undefined;
|
||||
GameState()->m_unk0x42c = LegoGameState::e_undefined;
|
||||
GameState()->m_savedPreviousArea = LegoGameState::e_undefined;
|
||||
|
||||
InitializeBitmaps();
|
||||
m_selectedCharacter = e_pepper;
|
||||
|
Reference in New Issue
Block a user