implement LegoGameState::StopPreviousAction (#511)

* implement RemoveFromWorld

* fix unloading

* Rename stuff, add default arg

* Rename functions

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
This commit is contained in:
Misha
2024-01-31 07:34:36 -05:00
committed by GitHub
parent cdf76754f7
commit bad32149ca
11 changed files with 223 additions and 32 deletions

View File

@@ -38,8 +38,8 @@ MxResult ElevatorBottom::Create(MxDSAction& p_dsAction)
SetIsWorldActive(FALSE);
GameState()->SetUnknown424(5);
GameState()->FUN_1003a720(0);
GameState()->SetCurrentArea(5);
GameState()->StopArea();
return result;
}
@@ -56,7 +56,7 @@ MxLong ElevatorBottom::Notify(MxParam& p_param)
ret = HandleNotification17(p_param);
break;
case c_notificationTransitioned:
GameState()->HandleAction(m_unk0xf8);
GameState()->SwitchArea(m_unk0xf8);
break;
}
}

View File

@@ -139,7 +139,7 @@ MxLong Infocenter::Notify(MxParam& p_param)
}
else if (m_unk0x104 != 0) {
BackgroundAudioManager()->RaiseVolume();
GameState()->HandleAction(m_unk0x104);
GameState()->SwitchArea(m_unk0x104);
m_unk0x104 = 0;
}
break;

View File

@@ -39,8 +39,8 @@ MxResult InfocenterDoor::Create(MxDSAction& p_dsAction)
SetIsWorldActive(FALSE);
GameState()->SetUnknown424(3);
GameState()->FUN_1003a720(0);
GameState()->SetCurrentArea(3);
GameState()->StopArea();
return result;
}

View File

@@ -52,8 +52,8 @@ MxResult Score::Create(MxDSAction& p_dsAction)
LegoGameState* gs = GameState();
ScoreState* state = (ScoreState*) gs->GetState("ScoreState");
m_state = state ? state : (ScoreState*) gs->CreateState("ScoreState");
GameState()->SetUnknown424(0xd);
GameState()->FUN_1003a720(0);
GameState()->SetCurrentArea(0xd);
GameState()->StopArea();
}
return result;
@@ -97,7 +97,7 @@ MxLong Score::Notify(MxParam& p_param)
case c_notificationTransitioned:
DeleteObjects(g_infoscorScript, 7, 9);
if (m_unk0xf8)
GameState()->HandleAction(m_unk0xf8);
GameState()->SwitchArea(m_unk0xf8);
ret = 1;
break;
default: