From edae5f58ec40a387139dc3dbf9c4dcf1ab6327e9 Mon Sep 17 00:00:00 2001 From: jonschz <17198703+jonschz@users.noreply.github.com> Date: Mon, 23 Jun 2025 20:58:16 +0200 Subject: [PATCH] Remove getters/setters that (likely) don't exist (#1583) Co-authored-by: jonschz --- LEGO1/lego/legoomni/include/legogamestate.h | 9 --------- LEGO1/lego/legoomni/src/common/legogamestate.cpp | 1 + LEGO1/lego/legoomni/src/worlds/act3.cpp | 6 +++--- LEGO1/lego/legoomni/src/worlds/infocenter.cpp | 12 ++++++------ LEGO1/lego/legoomni/src/worlds/isle.cpp | 2 +- LEGO1/lego/legoomni/src/worlds/legoact2.cpp | 6 +++--- 6 files changed, 14 insertions(+), 22 deletions(-) diff --git a/LEGO1/lego/legoomni/include/legogamestate.h b/LEGO1/lego/legoomni/include/legogamestate.h index b81696fd..e5dd9a26 100644 --- a/LEGO1/lego/legoomni/include/legogamestate.h +++ b/LEGO1/lego/legoomni/include/legogamestate.h @@ -223,14 +223,8 @@ public: Act GetCurrentAct() { return m_currentAct; } Act GetLoadedAct() { return m_loadedAct; } - Area GetPreviousArea() { return m_previousArea; } - Area GetUnknown0x42c() { return m_unk0x42c; } - void SetDirty(MxBool p_isDirty) { m_isDirty = p_isDirty; } - void SetPreviousArea(Area p_previousArea) { m_previousArea = p_previousArea; } void SetActorId(MxU8 p_actorId) { m_actorId = p_actorId; } - Username* GetPlayersIndex(MxS32 p_index) { return &m_players[p_index]; } - MxS16 GetPlayerCount() { return m_playerCount; } LegoBackgroundColor* GetBackgroundColor() { return m_backgroundColor; } void SetCurrentAct(Act p_currentAct); @@ -254,14 +248,11 @@ private: LegoBackgroundColor* m_tempBackgroundColor; // 0x1c LegoFullScreenMovie* m_fullScreenMovie; // 0x20 - // TODO: Most likely getters/setters are not used according to BETA for the following members: - public: MxS16 m_currentPlayerId; // 0x24 MxS16 m_playerCount; // 0x26 Username m_players[9]; // 0x28 History m_history; // 0xa6 - undefined2 m_unk0x41a; // 0x41a JukeboxScript::Script m_jukeboxMusic; // 0x41c MxBool m_isDirty; // 0x420 Area m_currentArea; // 0x424 diff --git a/LEGO1/lego/legoomni/src/common/legogamestate.cpp b/LEGO1/lego/legoomni/src/common/legogamestate.cpp index 0a2c452a..1e53cb4f 100644 --- a/LEGO1/lego/legoomni/src/common/legogamestate.cpp +++ b/LEGO1/lego/legoomni/src/common/legogamestate.cpp @@ -1629,6 +1629,7 @@ void LegoGameState::SerializeScoreHistory(MxS16 p_flags) } // FUNCTION: LEGO1 0x1003cea0 +// FUNCTION: BETA10 0x10017840 void LegoGameState::SetCurrentAct(Act p_currentAct) { m_currentAct = p_currentAct; diff --git a/LEGO1/lego/legoomni/src/worlds/act3.cpp b/LEGO1/lego/legoomni/src/worlds/act3.cpp index 48aacd92..64ed8d6c 100644 --- a/LEGO1/lego/legoomni/src/worlds/act3.cpp +++ b/LEGO1/lego/legoomni/src/worlds/act3.cpp @@ -488,7 +488,7 @@ MxResult Act3::Create(MxDSAction& p_dsAction) case LegoGameState::e_act1: case LegoGameState::e_actNotFound: GameState()->StopArea(LegoGameState::e_undefined); - if (GameState()->GetPreviousArea() == LegoGameState::e_infomain) { + if (GameState()->m_previousArea == LegoGameState::e_infomain) { GameState()->StopArea(LegoGameState::e_isle); } } @@ -505,7 +505,7 @@ MxResult Act3::Create(MxDSAction& p_dsAction) GameState()->m_currentArea = LegoGameState::e_act3script; GameState()->SetCurrentAct(LegoGameState::e_act3); - GameState()->SetDirty(TRUE); + GameState()->m_isDirty = TRUE; } return result; @@ -883,7 +883,7 @@ void Act3::Enable(MxBool p_enable) FUN_10015820(FALSE, LegoOmni::c_disableInput | LegoOmni::c_disable3d | LegoOmni::c_clearScreen); PlayMusic(JukeboxScript::c_Act3Music); - GameState()->SetDirty(TRUE); + GameState()->m_isDirty = TRUE; if (m_time > 0) { MxFloat delta = Timer()->GetTime() - m_time - 100.0f; diff --git a/LEGO1/lego/legoomni/src/worlds/infocenter.cpp b/LEGO1/lego/legoomni/src/worlds/infocenter.cpp index 8a41663e..90078e6d 100644 --- a/LEGO1/lego/legoomni/src/worlds/infocenter.cpp +++ b/LEGO1/lego/legoomni/src/worlds/infocenter.cpp @@ -219,7 +219,7 @@ MxResult Infocenter::Create(MxDSAction& p_dsAction) if (m_infocenterState->m_unk0x74 == 4) { LegoGameState* state = GameState(); - state->SetPreviousArea(GameState()->GetUnknown0x42c()); + state->m_previousArea = GameState()->m_unk0x42c; } InputManager()->Register(this); @@ -1020,13 +1020,13 @@ MxU8 Infocenter::HandleControl(LegoControlManagerNotificationParam& p_param) case InfomainScript::c_BigInfo_Ctl: switch (state->GetCurrentAct()) { case LegoGameState::e_act1: - if (state->GetPreviousArea()) { - switch (state->GetPreviousArea()) { + if (state->m_previousArea) { + switch (state->m_previousArea) { case LegoGameState::e_infodoor: case LegoGameState::e_regbook: case LegoGameState::e_infoscor: m_infocenterState->m_unk0x74 = 5; - m_destLocation = state->GetPreviousArea(); + m_destLocation = state->m_previousArea; actionToPlay = (InfomainScript::Script) m_infocenterState->GetNextLeaveDialogue(); m_radio.Stop(); InputManager()->DisableInputProcessing(); @@ -1081,7 +1081,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()->GetPreviousArea(); + GameState()->m_unk0x42c = GameState()->m_previousArea; InputManager()->DisableInputProcessing(); break; case InfomainScript::c_Mama_Ctl: @@ -1390,7 +1390,7 @@ void Infocenter::Reset() AnimationManager()->Reset(FALSE); CharacterManager()->ReleaseAllActors(); GameState()->SetCurrentAct(LegoGameState::e_act1); - GameState()->SetPreviousArea(LegoGameState::e_undefined); + GameState()->m_previousArea = LegoGameState::e_undefined; GameState()->m_unk0x42c = LegoGameState::e_undefined; InitializeBitmaps(); diff --git a/LEGO1/lego/legoomni/src/worlds/isle.cpp b/LEGO1/lego/legoomni/src/worlds/isle.cpp index 1aa352fe..050aae97 100644 --- a/LEGO1/lego/legoomni/src/worlds/isle.cpp +++ b/LEGO1/lego/legoomni/src/worlds/isle.cpp @@ -121,7 +121,7 @@ MxResult Isle::Create(MxDSAction& p_dsAction) m_act1state = act1state; EnableAnimations(TRUE); - GameState()->SetDirty(TRUE); + GameState()->m_isDirty = TRUE; } return result; diff --git a/LEGO1/lego/legoomni/src/worlds/legoact2.cpp b/LEGO1/lego/legoomni/src/worlds/legoact2.cpp index 2b9dd80b..ddc97f1c 100644 --- a/LEGO1/lego/legoomni/src/worlds/legoact2.cpp +++ b/LEGO1/lego/legoomni/src/worlds/legoact2.cpp @@ -141,7 +141,7 @@ MxResult LegoAct2::Create(MxDSAction& p_dsAction) case LegoGameState::e_act1: case LegoGameState::e_actNotFound: GameState()->StopArea(LegoGameState::e_undefined); - if (GameState()->GetPreviousArea() == LegoGameState::e_infomain) { + if (GameState()->m_previousArea == LegoGameState::e_infomain) { GameState()->StopArea(LegoGameState::e_isle); } } @@ -149,7 +149,7 @@ MxResult LegoAct2::Create(MxDSAction& p_dsAction) GameState()->m_currentArea = LegoGameState::e_act2main; GameState()->SetCurrentAct(LegoGameState::e_act2); InputManager()->Register(this); - GameState()->SetDirty(TRUE); + GameState()->m_isDirty = TRUE; } return result; @@ -536,7 +536,7 @@ void LegoAct2::Enable(MxBool p_enable) ((IslePathActor*) m_pepper->GetEntity())->VTable0xec(m_unk0x10dc, m_unk0x1124, TRUE); - if (GameState()->GetPreviousArea() == LegoGameState::e_infomain) { + if (GameState()->m_previousArea == LegoGameState::e_infomain) { GameState()->StopArea(LegoGameState::e_infomain); }