diff --git a/LEGO1/lego/legoomni/include/legogamestate.h b/LEGO1/lego/legoomni/include/legogamestate.h index 5e818cc7..dc26f8c3 100644 --- a/LEGO1/lego/legoomni/include/legogamestate.h +++ b/LEGO1/lego/legoomni/include/legogamestate.h @@ -172,13 +172,11 @@ class LegoGameState { Act GetCurrentAct() { return m_currentAct; } Act GetLoadedAct() { return m_loadedAct; } - Area GetCurrentArea() { return m_currentArea; } Area GetPreviousArea() { return m_previousArea; } Area GetUnknown0x42c() { return m_unk0x42c; } History* GetHistory() { return &m_history; } void SetDirty(MxBool p_isDirty) { m_isDirty = p_isDirty; } - void SetCurrentArea(Area p_currentArea) { m_currentArea = p_currentArea; } void SetPreviousArea(Area p_previousArea) { m_previousArea = p_previousArea; } void SetActorId(MxU8 p_actorId) { m_actorId = p_actorId; } void SetUnknown0x42c(Area p_unk0x42c) { m_unk0x42c = p_unk0x42c; } diff --git a/LEGO1/lego/legoomni/src/actors/bike.cpp b/LEGO1/lego/legoomni/src/actors/bike.cpp index 0c5420be..4793a2a2 100644 --- a/LEGO1/lego/legoomni/src/actors/bike.cpp +++ b/LEGO1/lego/legoomni/src/actors/bike.cpp @@ -40,7 +40,7 @@ MxResult Bike::Create(MxDSAction& p_dsAction) void Bike::Exit() { IslePathActor::Exit(); - GameState()->SetCurrentArea(LegoGameState::Area::e_bike); + GameState()->m_currentArea = LegoGameState::Area::e_bike; RemoveFromCurrentWorld(*g_isleScript, IsleScript::c_BikeDashboard_Bitmap); RemoveFromCurrentWorld(*g_isleScript, IsleScript::c_BikeArms_Ctl); RemoveFromCurrentWorld(*g_isleScript, IsleScript::c_BikeHorn_Ctl); diff --git a/LEGO1/lego/legoomni/src/actors/helicopter.cpp b/LEGO1/lego/legoomni/src/actors/helicopter.cpp index 1626f7be..3aff5575 100644 --- a/LEGO1/lego/legoomni/src/actors/helicopter.cpp +++ b/LEGO1/lego/legoomni/src/actors/helicopter.cpp @@ -76,7 +76,7 @@ void Helicopter::Exit() IslePathActor::Exit(); if (GameState()->GetCurrentAct() == LegoGameState::e_act1) { - GameState()->SetCurrentArea(LegoGameState::e_copter); + GameState()->m_currentArea = LegoGameState::e_copter; if (UserActor() && UserActor()->IsA("IslePathActor")) { ((IslePathActor*) UserActor()) ->SpawnPlayer( @@ -180,7 +180,7 @@ MxLong Helicopter::HandleControl(LegoControlManagerNotificationParam& p_param) break; } Exit(); - GameState()->SetCurrentArea(LegoGameState::e_unk66); + GameState()->m_currentArea = LegoGameState::e_unk66; ret = 1; break; case IsleScript::c_Helicopter_TakeOff_Ctl: { diff --git a/LEGO1/lego/legoomni/src/build/legocarbuild.cpp b/LEGO1/lego/legoomni/src/build/legocarbuild.cpp index 9cf584f2..973a1328 100644 --- a/LEGO1/lego/legoomni/src/build/legocarbuild.cpp +++ b/LEGO1/lego/legoomni/src/build/legocarbuild.cpp @@ -138,22 +138,22 @@ MxResult LegoCarBuild::Create(MxDSAction& p_dsAction) if (m_atomId == *g_copterScript) { buildStateClassName = "LegoCopterBuildState"; - GameState()->SetCurrentArea(LegoGameState::e_copterbuild); + GameState()->m_currentArea = LegoGameState::e_copterbuild; m_carId = Helicopter_Actor; } else if (m_atomId == *g_dunecarScript) { buildStateClassName = "LegoDuneCarBuildState"; - GameState()->SetCurrentArea(LegoGameState::e_dunecarbuild); + GameState()->m_currentArea = LegoGameState::e_dunecarbuild; m_carId = DuneBugy_Actor; } else if (m_atomId == *g_jetskiScript) { buildStateClassName = "LegoJetskiBuildState"; - GameState()->SetCurrentArea(LegoGameState::e_jetskibuild); + GameState()->m_currentArea = LegoGameState::e_jetskibuild; m_carId = Jetski_Actor; } else if (m_atomId == *g_racecarScript) { buildStateClassName = "LegoRaceCarBuildState"; - GameState()->SetCurrentArea(LegoGameState::e_racecarbuild); + GameState()->m_currentArea = LegoGameState::e_racecarbuild; m_carId = Helicopter_Actor; } @@ -821,7 +821,7 @@ undefined4 LegoCarBuild::FUN_10024c20(LegoEventNotificationParam* p_param) Act1State* gameState = (Act1State*) GameState()->GetState("Act1State"); - switch (GameState()->GetCurrentArea()) { + switch (GameState()->m_currentArea) { case LegoGameState::e_copterbuild: if (gameState->m_helicopter) { delete gameState->m_helicopter; diff --git a/LEGO1/lego/legoomni/src/worlds/elevatorbottom.cpp b/LEGO1/lego/legoomni/src/worlds/elevatorbottom.cpp index cfe25812..8fefddf4 100644 --- a/LEGO1/lego/legoomni/src/worlds/elevatorbottom.cpp +++ b/LEGO1/lego/legoomni/src/worlds/elevatorbottom.cpp @@ -45,7 +45,7 @@ MxResult ElevatorBottom::Create(MxDSAction& p_dsAction) SetIsWorldActive(FALSE); - GameState()->SetCurrentArea(LegoGameState::e_elevbott); + GameState()->m_currentArea = LegoGameState::e_elevbott; GameState()->StopArea(LegoGameState::e_previousArea); return result; diff --git a/LEGO1/lego/legoomni/src/worlds/gasstation.cpp b/LEGO1/lego/legoomni/src/worlds/gasstation.cpp index 453b0862..bd782ed8 100644 --- a/LEGO1/lego/legoomni/src/worlds/gasstation.cpp +++ b/LEGO1/lego/legoomni/src/worlds/gasstation.cpp @@ -91,7 +91,7 @@ MxResult GasStation::Create(MxDSAction& p_dsAction) m_state->m_unk0x14.m_unk0x00 = 3; } - GameState()->SetCurrentArea(LegoGameState::e_garage); + GameState()->m_currentArea = LegoGameState::e_garage; GameState()->StopArea(LegoGameState::e_previousArea); InputManager()->Register(this); diff --git a/LEGO1/lego/legoomni/src/worlds/historybook.cpp b/LEGO1/lego/legoomni/src/worlds/historybook.cpp index 4287fe56..bec6764f 100644 --- a/LEGO1/lego/legoomni/src/worlds/historybook.cpp +++ b/LEGO1/lego/legoomni/src/worlds/historybook.cpp @@ -39,7 +39,7 @@ MxResult HistoryBook::Create(MxDSAction& p_dsAction) InputManager()->SetCamera(NULL); InputManager()->Register(this); - GameState()->SetCurrentArea(LegoGameState::Area::e_histbook); + GameState()->m_currentArea = LegoGameState::Area::e_histbook; GameState()->StopArea(LegoGameState::Area::e_previousArea); return result; } diff --git a/LEGO1/lego/legoomni/src/worlds/hospital.cpp b/LEGO1/lego/legoomni/src/worlds/hospital.cpp index 2bf024f2..6b3c8e5a 100644 --- a/LEGO1/lego/legoomni/src/worlds/hospital.cpp +++ b/LEGO1/lego/legoomni/src/worlds/hospital.cpp @@ -96,7 +96,7 @@ MxResult Hospital::Create(MxDSAction& p_dsAction) m_hospitalState->m_unk0x08.m_unk0x00 = 3; } - GameState()->SetCurrentArea(LegoGameState::e_hospital); + GameState()->m_currentArea = LegoGameState::e_hospital; GameState()->StopArea(LegoGameState::e_previousArea); InputManager()->Register(this); diff --git a/LEGO1/lego/legoomni/src/worlds/infocenter.cpp b/LEGO1/lego/legoomni/src/worlds/infocenter.cpp index 8e882e75..342d85bd 100644 --- a/LEGO1/lego/legoomni/src/worlds/infocenter.cpp +++ b/LEGO1/lego/legoomni/src/worlds/infocenter.cpp @@ -210,7 +210,7 @@ MxResult Infocenter::Create(MxDSAction& p_dsAction) } } - GameState()->SetCurrentArea(LegoGameState::e_infomain); + GameState()->m_currentArea = LegoGameState::e_infomain; GameState()->StopArea(LegoGameState::e_previousArea); if (m_infocenterState->GetUnknown0x74() == 4) { @@ -523,9 +523,9 @@ void Infocenter::ReadyWorld() bgRed->Enable(TRUE); if (GameState()->GetCurrentAct() == GameState()->GetLoadedAct()) { - GameState()->SetCurrentArea(LegoGameState::e_act2main); + GameState()->m_currentArea = LegoGameState::e_act2main; GameState()->StopArea(LegoGameState::e_act2main); - GameState()->SetCurrentArea(LegoGameState::e_infomain); + GameState()->m_currentArea = LegoGameState::e_infomain; } m_infocenterState->SetUnknown0x74(5); @@ -579,9 +579,9 @@ void Infocenter::ReadyWorld() bgRed->Enable(TRUE); if (GameState()->GetCurrentAct() == GameState()->GetLoadedAct()) { - GameState()->SetCurrentArea(LegoGameState::e_act3script); + GameState()->m_currentArea = LegoGameState::e_act3script; GameState()->StopArea(LegoGameState::e_act3script); - GameState()->SetCurrentArea(LegoGameState::e_infomain); + GameState()->m_currentArea = LegoGameState::e_infomain; } m_infocenterState->SetUnknown0x74(5); diff --git a/LEGO1/lego/legoomni/src/worlds/infocenterdoor.cpp b/LEGO1/lego/legoomni/src/worlds/infocenterdoor.cpp index 4b6d7850..5f3ae04c 100644 --- a/LEGO1/lego/legoomni/src/worlds/infocenterdoor.cpp +++ b/LEGO1/lego/legoomni/src/worlds/infocenterdoor.cpp @@ -48,7 +48,7 @@ MxResult InfocenterDoor::Create(MxDSAction& p_dsAction) SetIsWorldActive(FALSE); - GameState()->SetCurrentArea(LegoGameState::e_infodoor); + GameState()->m_currentArea = LegoGameState::e_infodoor; GameState()->StopArea(LegoGameState::e_previousArea); return result; diff --git a/LEGO1/lego/legoomni/src/worlds/isle.cpp b/LEGO1/lego/legoomni/src/worlds/isle.cpp index 66e7a559..347e4b07 100644 --- a/LEGO1/lego/legoomni/src/worlds/isle.cpp +++ b/LEGO1/lego/legoomni/src/worlds/isle.cpp @@ -112,8 +112,8 @@ MxResult Isle::Create(MxDSAction& p_dsAction) m_destLocation = LegoGameState::e_infomain; } - if (GameState()->GetCurrentArea() == LegoGameState::e_isle) { - GameState()->SetCurrentArea(LegoGameState::e_undefined); + if (GameState()->m_currentArea == LegoGameState::e_isle) { + GameState()->m_currentArea = LegoGameState::e_undefined; } LegoGameState* gameState = GameState(); diff --git a/LEGO1/lego/legoomni/src/worlds/jukebox.cpp b/LEGO1/lego/legoomni/src/worlds/jukebox.cpp index ca27142d..fe476499 100644 --- a/LEGO1/lego/legoomni/src/worlds/jukebox.cpp +++ b/LEGO1/lego/legoomni/src/worlds/jukebox.cpp @@ -61,7 +61,7 @@ MxResult JukeBox::Create(MxDSAction& p_dsAction) m_state->m_music = JukeBoxState::e_pasquell; } - GameState()->SetCurrentArea(LegoGameState::e_jukeboxw); + GameState()->m_currentArea = LegoGameState::e_jukeboxw; GameState()->StopArea(LegoGameState::e_previousArea); TickleManager()->RegisterClient(this, 2000); return ret; diff --git a/LEGO1/lego/legoomni/src/worlds/police.cpp b/LEGO1/lego/legoomni/src/worlds/police.cpp index cf7bb0f8..43bd67bf 100644 --- a/LEGO1/lego/legoomni/src/worlds/police.cpp +++ b/LEGO1/lego/legoomni/src/worlds/police.cpp @@ -63,7 +63,7 @@ MxResult Police::Create(MxDSAction& p_dsAction) } m_policeState = policeState; - GameState()->SetCurrentArea(LegoGameState::e_police); + GameState()->m_currentArea = LegoGameState::e_police; GameState()->StopArea(LegoGameState::e_previousArea); return ret; } diff --git a/LEGO1/lego/legoomni/src/worlds/registrationbook.cpp b/LEGO1/lego/legoomni/src/worlds/registrationbook.cpp index 234903bf..fe4ac424 100644 --- a/LEGO1/lego/legoomni/src/worlds/registrationbook.cpp +++ b/LEGO1/lego/legoomni/src/worlds/registrationbook.cpp @@ -97,7 +97,7 @@ MxResult RegistrationBook::Create(MxDSAction& p_dsAction) SetIsWorldActive(FALSE); InputManager()->Register(this); - GameState()->SetCurrentArea(LegoGameState::e_regbook); + GameState()->m_currentArea = LegoGameState::e_regbook; GameState()->StopArea(LegoGameState::e_previousArea); m_infocenterState = (InfocenterState*) GameState()->GetState("InfocenterState"); diff --git a/LEGO1/lego/legoomni/src/worlds/score.cpp b/LEGO1/lego/legoomni/src/worlds/score.cpp index db9a24ec..3ecae676 100644 --- a/LEGO1/lego/legoomni/src/worlds/score.cpp +++ b/LEGO1/lego/legoomni/src/worlds/score.cpp @@ -63,7 +63,7 @@ MxResult Score::Create(MxDSAction& p_dsAction) LegoGameState* gameState = GameState(); ScoreState* state = (ScoreState*) gameState->GetState("ScoreState"); m_state = state ? state : (ScoreState*) gameState->CreateState("ScoreState"); - GameState()->SetCurrentArea(LegoGameState::e_infoscor); + GameState()->m_currentArea = LegoGameState::e_infoscor; GameState()->StopArea(LegoGameState::e_previousArea); }