Implement/match Isle::Escape (#950)

This commit is contained in:
Christian Semmler
2024-05-24 20:41:57 -04:00
committed by GitHub
parent e59d684f37
commit b759390060
42 changed files with 120 additions and 40 deletions

View File

@@ -140,3 +140,15 @@ MxResult Ambulance::Tickle()
// TODO
return SUCCESS;
}
// STUB: LEGO1 0x10037240
void Ambulance::FUN_10037240()
{
// TODO
}
// STUB: LEGO1 0x10037250
void Ambulance::FUN_10037250()
{
// TODO
}

View File

@@ -119,3 +119,15 @@ void TowTrack::FUN_1004dad0()
{
// TODO
}
// STUB: LEGO1 0x1004db10
void TowTrack::FUN_1004db10()
{
// TODO
}
// STUB: LEGO1 0x1004dbe0
void TowTrack::FUN_1004dbe0()
{
// TODO
}

View File

@@ -56,7 +56,7 @@ void LegoCarBuild::Enable(MxBool p_enable)
}
// STUB: LEGO1 0x10025e70
MxBool LegoCarBuild::VTable0x64()
MxBool LegoCarBuild::Escape()
{
// TODO
return FALSE;

View File

@@ -619,7 +619,7 @@ MxLong LegoNavController::Notify(MxParam& p_param)
if (currentWorld) {
InfocenterState* infocenterState = (InfocenterState*) GameState()->GetState("InfocenterState");
if (infocenterState && infocenterState->GetUnknown0x74() != 8 && currentWorld->VTable0x64()) {
if (infocenterState && infocenterState->GetUnknown0x74() != 8 && currentWorld->Escape()) {
BackgroundAudioManager()->Stop();
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
infocenterState->SetUnknown0x74(8);

View File

@@ -53,7 +53,7 @@ MxBool LegoWorld::VTable0x5c()
}
// FUNCTION: LEGO1 0x1001d680
MxBool LegoWorld::VTable0x64()
MxBool LegoWorld::Escape()
{
return FALSE;
}

View File

@@ -51,7 +51,7 @@ undefined4 CarRace::VTable0x78(undefined4)
}
// STUB: LEGO1 0x10017900
MxBool CarRace::VTable0x64()
MxBool CarRace::Escape()
{
// TODO
return FALSE;

View File

@@ -32,7 +32,7 @@ undefined4 JetskiRace::VTable0x70(undefined4)
}
// STUB: LEGO1 0x10016a10
MxBool JetskiRace::VTable0x64()
MxBool JetskiRace::Escape()
{
return TRUE;
}

View File

@@ -57,7 +57,7 @@ undefined4 LegoRace::VTable0x74(undefined4)
}
// FUNCTION: LEGO1 0x10015b90
MxBool LegoRace::VTable0x64()
MxBool LegoRace::Escape()
{
return FALSE;
}

View File

@@ -88,7 +88,7 @@ void Act3::VTable0x60()
}
// STUB: LEGO1 0x10073e50
MxBool Act3::VTable0x64()
MxBool Act3::Escape()
{
// TODO
return FALSE;

View File

@@ -133,7 +133,7 @@ void ElevatorBottom::Enable(MxBool p_enable)
}
// FUNCTION: LEGO1 0x10018310
MxBool ElevatorBottom::VTable0x64()
MxBool ElevatorBottom::Escape()
{
DeleteObjects(&m_atom, 500, 999);
m_destLocation = LegoGameState::e_infomain;

View File

@@ -411,7 +411,7 @@ MxResult GasStation::Tickle()
}
// FUNCTION: LEGO1 0x10005e70
MxBool GasStation::VTable0x64()
MxBool GasStation::Escape()
{
m_radio.Stop();
m_state->FUN_10006490();

View File

@@ -149,7 +149,7 @@ void HistoryBook::ReadyWorld()
}
// FUNCTION: LEGO1 0x10082a10
MxBool HistoryBook::VTable0x64()
MxBool HistoryBook::Escape()
{
m_destLocation = LegoGameState::Area::e_infomain;
return TRUE;

View File

@@ -662,7 +662,7 @@ MxResult Hospital::Tickle()
}
// FUNCTION: LEGO1 0x10076330
MxBool Hospital::VTable0x64()
MxBool Hospital::Escape()
{
DeleteObjects(&m_atom, HospitalScript::c_hho002cl_RunAnim, 999);
m_hospitalState->m_unk0x08.m_unk0x00 = 0;

View File

@@ -1327,7 +1327,7 @@ void Infocenter::Reset()
}
// FUNCTION: LEGO1 0x10070f60
MxBool Infocenter::VTable0x64()
MxBool Infocenter::Escape()
{
if (m_infocenterState != NULL) {
MxU32 val = m_infocenterState->GetUnknown0x74();

View File

@@ -165,7 +165,7 @@ void InfocenterDoor::Enable(MxBool p_enable)
}
// FUNCTION: LEGO1 0x10037cd0
MxBool InfocenterDoor::VTable0x64()
MxBool InfocenterDoor::Escape()
{
DeleteObjects(&m_atom, 500, 510);
m_destLocation = LegoGameState::e_infomain;

View File

@@ -1116,11 +1116,61 @@ void Isle::CreateState()
}
}
// STUB: LEGO1 0x10033180
MxBool Isle::VTable0x64()
// FUNCTION: LEGO1 0x10033180
MxBool Isle::Escape()
{
// TODO
return FALSE;
m_radio.Stop();
BackgroundAudioManager()->Stop();
switch (m_act1state->m_unk0x018) {
case 3:
if (CurrentActor() != NULL) {
m_pizza->FUN_10038380();
m_pizza->FUN_100382b0();
}
break;
case 8:
if (CurrentActor() != NULL && !CurrentActor()->IsA("TowTrack")) {
m_towtrack->FUN_1004db10();
m_towtrack->FUN_1004dbe0();
}
break;
case 10:
if (CurrentActor() != NULL && !CurrentActor()->IsA("Ambulance")) {
m_ambulance->FUN_10037240();
m_ambulance->FUN_10037250();
}
break;
}
if (m_act1state->m_unk0x01e == TRUE) {
InvokeAction(Extra::e_stop, *g_isleScript, IsleScript::c_Floor2, NULL);
m_act1state->m_unk0x01e = FALSE;
}
m_act1state->m_elevFloor = Act1State::c_floor1;
AnimationManager()->FUN_10061010(FALSE);
DeleteObjects(&m_atom, IsleScript::c_sba001bu_RunAnim, IsleScript::c_FNS018EN_Wav_518);
if (CurrentActor()) {
if (CurrentActor()->GetActorId() != GameState()->GetActorId()) {
((IslePathActor*) CurrentActor())->VTable0xe4();
m_skateboard->SetUnknown0x160(FALSE);
}
}
if (GameState()->m_currentArea == LegoGameState::e_polidoor) {
VariableTable()->SetVariable("VISIBILITY", "Show Policsta");
}
if (GameState()->m_currentArea == LegoGameState::e_garadoor) {
VariableTable()->SetVariable("VISIBILITY", "Show Gas");
}
m_act1state->m_unk0x018 = 0;
m_destLocation = LegoGameState::e_infomain;
return TRUE;
}
// STUB: LEGO1 0x10033350

View File

@@ -255,7 +255,7 @@ MxResult JukeBox::Tickle()
}
// FUNCTION: LEGO1 0x1005de70
MxBool JukeBox::VTable0x64()
MxBool JukeBox::Escape()
{
m_destLocation = LegoGameState::e_infomain;
return TRUE;

View File

@@ -48,7 +48,7 @@ void LegoAct2::VTable0x60()
}
// STUB: LEGO1 0x100519d0
MxBool LegoAct2::VTable0x64()
MxBool LegoAct2::Escape()
{
// TODO
return FALSE;

View File

@@ -190,7 +190,7 @@ void Police::Enable(MxBool p_enable)
}
// FUNCTION: LEGO1 0x1005e790
MxBool Police::VTable0x64()
MxBool Police::Escape()
{
DeleteObjects(&m_atom, PoliceScript::c_nps001ni_RunAnim, 510);
m_destLocation = LegoGameState::e_infomain;

View File

@@ -493,7 +493,7 @@ MxBool RegistrationBook::CreateSurface()
}
// FUNCTION: LEGO1 0x100783e0
MxBool RegistrationBook::VTable0x64()
MxBool RegistrationBook::Escape()
{
DeleteObjects(&m_atom, RegbookScript::c_iic006in_RunAnim, RegbookScript::c_iic008in_PlayWav);
return TRUE;

View File

@@ -312,7 +312,7 @@ void Score::FillArea(MxU32 i_activity, MxU32 i_actor, MxS16 score)
}
// FUNCTION: LEGO1 0x10001e40
MxBool Score::VTable0x64()
MxBool Score::Escape()
{
DeleteScript();
m_destLocation = LegoGameState::e_infomain;