From b759390060f6a31e7333ffc664729b0d19c757c4 Mon Sep 17 00:00:00 2001 From: Christian Semmler Date: Fri, 24 May 2024 20:41:57 -0400 Subject: [PATCH] Implement/match Isle::Escape (#950) --- LEGO1/lego/legoomni/include/act3.h | 2 +- LEGO1/lego/legoomni/include/ambulance.h | 2 + LEGO1/lego/legoomni/include/carrace.h | 2 +- LEGO1/lego/legoomni/include/elevatorbottom.h | 2 +- LEGO1/lego/legoomni/include/gasstation.h | 2 +- LEGO1/lego/legoomni/include/historybook.h | 2 +- LEGO1/lego/legoomni/include/hospital.h | 2 +- LEGO1/lego/legoomni/include/infocenter.h | 2 +- LEGO1/lego/legoomni/include/infocenterdoor.h | 2 +- LEGO1/lego/legoomni/include/isle.h | 2 +- LEGO1/lego/legoomni/include/jetskirace.h | 2 +- LEGO1/lego/legoomni/include/jukebox.h | 2 +- LEGO1/lego/legoomni/include/legoact2.h | 2 +- LEGO1/lego/legoomni/include/legocarbuild.h | 2 +- LEGO1/lego/legoomni/include/legorace.h | 2 +- LEGO1/lego/legoomni/include/legoworld.h | 2 +- LEGO1/lego/legoomni/include/police.h | 2 +- .../lego/legoomni/include/registrationbook.h | 2 +- LEGO1/lego/legoomni/include/score.h | 2 +- LEGO1/lego/legoomni/include/skateboard.h | 2 + LEGO1/lego/legoomni/include/towtrack.h | 2 + LEGO1/lego/legoomni/src/actors/ambulance.cpp | 12 ++++ LEGO1/lego/legoomni/src/actors/towtrack.cpp | 12 ++++ .../lego/legoomni/src/build/legocarbuild.cpp | 2 +- .../legoomni/src/entity/legonavcontroller.cpp | 2 +- LEGO1/lego/legoomni/src/entity/legoworld.cpp | 2 +- LEGO1/lego/legoomni/src/race/carrace.cpp | 2 +- LEGO1/lego/legoomni/src/race/jetskirace.cpp | 2 +- LEGO1/lego/legoomni/src/race/legorace.cpp | 2 +- LEGO1/lego/legoomni/src/worlds/act3.cpp | 2 +- .../legoomni/src/worlds/elevatorbottom.cpp | 2 +- LEGO1/lego/legoomni/src/worlds/gasstation.cpp | 2 +- .../lego/legoomni/src/worlds/historybook.cpp | 2 +- LEGO1/lego/legoomni/src/worlds/hospital.cpp | 2 +- LEGO1/lego/legoomni/src/worlds/infocenter.cpp | 2 +- .../legoomni/src/worlds/infocenterdoor.cpp | 2 +- LEGO1/lego/legoomni/src/worlds/isle.cpp | 58 +++++++++++++++++-- LEGO1/lego/legoomni/src/worlds/jukebox.cpp | 2 +- LEGO1/lego/legoomni/src/worlds/legoact2.cpp | 2 +- LEGO1/lego/legoomni/src/worlds/police.cpp | 2 +- .../legoomni/src/worlds/registrationbook.cpp | 2 +- LEGO1/lego/legoomni/src/worlds/score.cpp | 2 +- 42 files changed, 120 insertions(+), 40 deletions(-) diff --git a/LEGO1/lego/legoomni/include/act3.h b/LEGO1/lego/legoomni/include/act3.h index 2883ff9d..b476dcc0 100644 --- a/LEGO1/lego/legoomni/include/act3.h +++ b/LEGO1/lego/legoomni/include/act3.h @@ -32,7 +32,7 @@ class Act3 : public LegoWorld { void ReadyWorld() override; // vtable+0x50 MxBool VTable0x5c() override; // vtable+0x5c void VTable0x60() override; // vtable+0x60 - MxBool VTable0x64() override; // vtable+0x64 + MxBool Escape() override; // vtable+0x64 void Enable(MxBool p_enable) override; // vtable+0x68 inline void SetUnknown420c(MxEntity* p_entity) { m_unk0x420c = p_entity; } diff --git a/LEGO1/lego/legoomni/include/ambulance.h b/LEGO1/lego/legoomni/include/ambulance.h index f5d8d04c..9e4b95b7 100644 --- a/LEGO1/lego/legoomni/include/ambulance.h +++ b/LEGO1/lego/legoomni/include/ambulance.h @@ -39,6 +39,8 @@ class Ambulance : public IslePathActor { void CreateState(); void FUN_10036e60(); void FUN_10037060(); + void FUN_10037240(); + void FUN_10037250(); // SYNTHETIC: LEGO1 0x10036130 // Ambulance::`scalar deleting destructor' diff --git a/LEGO1/lego/legoomni/include/carrace.h b/LEGO1/lego/legoomni/include/carrace.h index c5af66e8..bb9d6324 100644 --- a/LEGO1/lego/legoomni/include/carrace.h +++ b/LEGO1/lego/legoomni/include/carrace.h @@ -25,7 +25,7 @@ class CarRace : public LegoRace { MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 void ReadyWorld() override; // vtable+0x50 - MxBool VTable0x64() override; // vtable+0x64 + MxBool Escape() override; // vtable+0x64 undefined4 VTable0x6c(undefined4) override; // vtable+0x6c undefined4 VTable0x70(undefined4) override; // vtable+0x70 undefined4 VTable0x74(undefined4) override; // vtable+0x74 diff --git a/LEGO1/lego/legoomni/include/elevatorbottom.h b/LEGO1/lego/legoomni/include/elevatorbottom.h index e2886f5c..81db82d6 100644 --- a/LEGO1/lego/legoomni/include/elevatorbottom.h +++ b/LEGO1/lego/legoomni/include/elevatorbottom.h @@ -35,7 +35,7 @@ class ElevatorBottom : public LegoWorld { // FUNCTION: LEGO1 0x10017f10 MxBool VTable0x5c() override { return TRUE; } // vtable+0x5c - MxBool VTable0x64() override; // vtable+0x64 + MxBool Escape() override; // vtable+0x64 void Enable(MxBool p_enable) override; // vtable+0x68 // SYNTHETIC: LEGO1 0x10018040 diff --git a/LEGO1/lego/legoomni/include/gasstation.h b/LEGO1/lego/legoomni/include/gasstation.h index c6dd28d5..51e7a3da 100644 --- a/LEGO1/lego/legoomni/include/gasstation.h +++ b/LEGO1/lego/legoomni/include/gasstation.h @@ -35,7 +35,7 @@ class GasStation : public LegoWorld { MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 void ReadyWorld() override; // vtable+0x50 MxBool VTable0x5c() override; // vtable+0x5c - MxBool VTable0x64() override; // vtable+0x64 + MxBool Escape() override; // vtable+0x64 void Enable(MxBool p_enable) override; // vtable+0x68 virtual MxLong HandleClick(LegoControlManagerEvent& p_param); // vtable+0x6c diff --git a/LEGO1/lego/legoomni/include/historybook.h b/LEGO1/lego/legoomni/include/historybook.h index af3b9be2..28870fc9 100644 --- a/LEGO1/lego/legoomni/include/historybook.h +++ b/LEGO1/lego/legoomni/include/historybook.h @@ -31,7 +31,7 @@ class HistoryBook : public LegoWorld { MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 void ReadyWorld() override; // vtable+0x50 - MxBool VTable0x64() override; // vtable+0x64 + MxBool Escape() override; // vtable+0x64 // SYNTHETIC: LEGO1 0x100824b0 // HistoryBook::`scalar deleting destructor' diff --git a/LEGO1/lego/legoomni/include/hospital.h b/LEGO1/lego/legoomni/include/hospital.h index 40f4f947..9f9c8e4c 100644 --- a/LEGO1/lego/legoomni/include/hospital.h +++ b/LEGO1/lego/legoomni/include/hospital.h @@ -37,7 +37,7 @@ class Hospital : public LegoWorld { MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 void ReadyWorld() override; // vtable+0x50 MxBool VTable0x5c() override; // vtable+0x5c - MxBool VTable0x64() override; // vtable+0x64 + MxBool Escape() override; // vtable+0x64 void Enable(MxBool p_enable) override; // vtable+0x68 inline void PlayAction(MxU32 p_objectId); diff --git a/LEGO1/lego/legoomni/include/infocenter.h b/LEGO1/lego/legoomni/include/infocenter.h index 04b56757..f0ed8697 100644 --- a/LEGO1/lego/legoomni/include/infocenter.h +++ b/LEGO1/lego/legoomni/include/infocenter.h @@ -67,7 +67,7 @@ class Infocenter : public LegoWorld { MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 void ReadyWorld() override; // vtable+0x50 MxBool VTable0x5c() override; // vtable+0x5c - MxBool VTable0x64() override; // vtable+0x64 + MxBool Escape() override; // vtable+0x64 void Enable(MxBool p_enable) override; // vtable+0x68 // SYNTHETIC: LEGO1 0x1006ec60 diff --git a/LEGO1/lego/legoomni/include/infocenterdoor.h b/LEGO1/lego/legoomni/include/infocenterdoor.h index 84854072..9cb0c49d 100644 --- a/LEGO1/lego/legoomni/include/infocenterdoor.h +++ b/LEGO1/lego/legoomni/include/infocenterdoor.h @@ -34,7 +34,7 @@ class InfocenterDoor : public LegoWorld { // FUNCTION: LEGO1 0x100377a0 MxBool VTable0x5c() override { return TRUE; } // vtable+0x5c - MxBool VTable0x64() override; // vtable+0x64 + MxBool Escape() override; // vtable+0x64 void Enable(MxBool p_enable) override; // vtable+0x68 // SYNTHETIC: LEGO1 0x100378d0 diff --git a/LEGO1/lego/legoomni/include/isle.h b/LEGO1/lego/legoomni/include/isle.h index 6242a828..372c20ab 100644 --- a/LEGO1/lego/legoomni/include/isle.h +++ b/LEGO1/lego/legoomni/include/isle.h @@ -57,7 +57,7 @@ class Isle : public LegoWorld { // FUNCTION: LEGO1 0x10033170 void VTable0x60() override {} // vtable+60 - MxBool VTable0x64() override; // vtable+64 + MxBool Escape() override; // vtable+64 void Enable(MxBool p_enable) override; // vtable+68 virtual void VTable0x6c(LegoPathActor* p_actor); // vtable+6c diff --git a/LEGO1/lego/legoomni/include/jetskirace.h b/LEGO1/lego/legoomni/include/jetskirace.h index 4d039f70..bb612ec7 100644 --- a/LEGO1/lego/legoomni/include/jetskirace.h +++ b/LEGO1/lego/legoomni/include/jetskirace.h @@ -22,7 +22,7 @@ class JetskiRace : public LegoRace { MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 void ReadyWorld() override; // vtable+0x50 - MxBool VTable0x64() override; // vtable+0x64 + MxBool Escape() override; // vtable+0x64 undefined4 VTable0x6c(undefined4) override; // vtable+0x6c undefined4 VTable0x70(undefined4) override; // vtable+0x70 undefined4 VTable0x74(undefined4) override; // vtable+0x74 diff --git a/LEGO1/lego/legoomni/include/jukebox.h b/LEGO1/lego/legoomni/include/jukebox.h index 260fb9a5..05618523 100644 --- a/LEGO1/lego/legoomni/include/jukebox.h +++ b/LEGO1/lego/legoomni/include/jukebox.h @@ -34,7 +34,7 @@ class JukeBox : public LegoWorld { MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 void ReadyWorld() override; // vtable+0x50 MxBool VTable0x5c() override; // vtable+0x5c - MxBool VTable0x64() override; // vtable+0x64 + MxBool Escape() override; // vtable+0x64 void Enable(MxBool p_enable) override; // vtable+0x68 // SYNTHETIC: LEGO1 0x1005d810 diff --git a/LEGO1/lego/legoomni/include/legoact2.h b/LEGO1/lego/legoomni/include/legoact2.h index c7dd6a35..b84fada3 100644 --- a/LEGO1/lego/legoomni/include/legoact2.h +++ b/LEGO1/lego/legoomni/include/legoact2.h @@ -14,7 +14,7 @@ class LegoAct2 : public LegoWorld { void ReadyWorld() override; // vtable+0x50 MxBool VTable0x5c() override; // vtable+0x5c void VTable0x60() override; // vtable+0x60 - MxBool VTable0x64() override; // vtable+0x64 + MxBool Escape() override; // vtable+0x64 void Enable(MxBool p_enable) override; // vtable+0x68 inline void SetUnknown0x1150(undefined4 p_unk0x1150) { m_unk0x1150 = p_unk0x1150; } diff --git a/LEGO1/lego/legoomni/include/legocarbuild.h b/LEGO1/lego/legoomni/include/legocarbuild.h index 0d2eccc1..bd86964e 100644 --- a/LEGO1/lego/legoomni/include/legocarbuild.h +++ b/LEGO1/lego/legoomni/include/legocarbuild.h @@ -29,7 +29,7 @@ class LegoCarBuild : public LegoWorld { MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 void ReadyWorld() override; // vtable+0x50 MxBool VTable0x5c() override; // vtable+0x5c - MxBool VTable0x64() override; // vtable+0x64 + MxBool Escape() override; // vtable+0x64 void Enable(MxBool p_enable) override; // vtable+0x68 // SYNTHETIC: LEGO1 0x10022a60 diff --git a/LEGO1/lego/legoomni/include/legorace.h b/LEGO1/lego/legoomni/include/legorace.h index c8b02f2e..29e46cab 100644 --- a/LEGO1/lego/legoomni/include/legorace.h +++ b/LEGO1/lego/legoomni/include/legorace.h @@ -30,7 +30,7 @@ class LegoRace : public LegoWorld { MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 MxBool VTable0x5c() override; // vtable+0x5c - MxBool VTable0x64() override; // vtable+0x64 + MxBool Escape() override; // vtable+0x64 void Enable(MxBool p_enable) override; // vtable+0x68 virtual undefined4 VTable0x6c(undefined4) = 0; // vtable+0x6c virtual undefined4 VTable0x70(undefined4); // vtable+0x70 diff --git a/LEGO1/lego/legoomni/include/legoworld.h b/LEGO1/lego/legoomni/include/legoworld.h index 15f103a8..2dd7321a 100644 --- a/LEGO1/lego/legoomni/include/legoworld.h +++ b/LEGO1/lego/legoomni/include/legoworld.h @@ -59,7 +59,7 @@ class LegoWorld : public LegoEntity { // FUNCTION: LEGO1 0x100010a0 virtual void VTable0x60() {} // vtable+0x60 - virtual MxBool VTable0x64(); // vtable+0x64 + virtual MxBool Escape(); // vtable+0x64 virtual void Enable(MxBool p_enable); // vtable+0x68 MxBool PresentersPending(); diff --git a/LEGO1/lego/legoomni/include/police.h b/LEGO1/lego/legoomni/include/police.h index 4ba7ac20..3760f22a 100644 --- a/LEGO1/lego/legoomni/include/police.h +++ b/LEGO1/lego/legoomni/include/police.h @@ -36,7 +36,7 @@ class Police : public LegoWorld { MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 void ReadyWorld() override; // vtable+0x50 MxBool VTable0x5c() override; // vtable+0x5c - MxBool VTable0x64() override; // vtable+0x64 + MxBool Escape() override; // vtable+0x64 void Enable(MxBool p_enable) override; // vtable+0x68 // SYNTHETIC: LEGO1 0x1005e300 diff --git a/LEGO1/lego/legoomni/include/registrationbook.h b/LEGO1/lego/legoomni/include/registrationbook.h index 1266d29b..ee4e55f8 100644 --- a/LEGO1/lego/legoomni/include/registrationbook.h +++ b/LEGO1/lego/legoomni/include/registrationbook.h @@ -34,7 +34,7 @@ class RegistrationBook : public LegoWorld { MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 void ReadyWorld() override; // vtable+0x50 - MxBool VTable0x64() override; // vtable+0x64 + MxBool Escape() override; // vtable+0x64 void Enable(MxBool p_enable) override; // vtable+0x68 inline void PlayAction(MxU32 p_objectId); diff --git a/LEGO1/lego/legoomni/include/score.h b/LEGO1/lego/legoomni/include/score.h index 71efd0f4..979fa33d 100644 --- a/LEGO1/lego/legoomni/include/score.h +++ b/LEGO1/lego/legoomni/include/score.h @@ -35,7 +35,7 @@ class Score : public LegoWorld { MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 void ReadyWorld() override; // vtable+0x50 MxBool VTable0x5c() override; // vtable+0x5c - MxBool VTable0x64() override; // vtable+0x64 + MxBool Escape() override; // vtable+0x64 void Enable(MxBool p_enable) override; // vtable+0x68 void Paint(); diff --git a/LEGO1/lego/legoomni/include/skateboard.h b/LEGO1/lego/legoomni/include/skateboard.h index c42d3fe0..60cadaa2 100644 --- a/LEGO1/lego/legoomni/include/skateboard.h +++ b/LEGO1/lego/legoomni/include/skateboard.h @@ -32,6 +32,8 @@ class SkateBoard : public IslePathActor { MxU32 VTable0xd4(LegoControlManagerEvent& p_param) override; // vtable+0xd4 void VTable0xe4() override; // vtable+0xe4 + inline void SetUnknown0x160(MxBool p_unk0x160) { m_unk0x160 = p_unk0x160; } + void ActivateSceneActions(); // SYNTHETIC: LEGO1 0x1000ff60 diff --git a/LEGO1/lego/legoomni/include/towtrack.h b/LEGO1/lego/legoomni/include/towtrack.h index 8e5ecfc0..add3a9f6 100644 --- a/LEGO1/lego/legoomni/include/towtrack.h +++ b/LEGO1/lego/legoomni/include/towtrack.h @@ -37,6 +37,8 @@ class TowTrack : public IslePathActor { void CreateState(); void FUN_1004dab0(); void FUN_1004dad0(); + void FUN_1004db10(); + void FUN_1004dbe0(); // SYNTHETIC: LEGO1 0x1004c950 // TowTrack::`scalar deleting destructor' diff --git a/LEGO1/lego/legoomni/src/actors/ambulance.cpp b/LEGO1/lego/legoomni/src/actors/ambulance.cpp index 8f7f05d1..b6bc7584 100644 --- a/LEGO1/lego/legoomni/src/actors/ambulance.cpp +++ b/LEGO1/lego/legoomni/src/actors/ambulance.cpp @@ -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 +} diff --git a/LEGO1/lego/legoomni/src/actors/towtrack.cpp b/LEGO1/lego/legoomni/src/actors/towtrack.cpp index 2337fa4b..7cd6ee1b 100644 --- a/LEGO1/lego/legoomni/src/actors/towtrack.cpp +++ b/LEGO1/lego/legoomni/src/actors/towtrack.cpp @@ -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 +} diff --git a/LEGO1/lego/legoomni/src/build/legocarbuild.cpp b/LEGO1/lego/legoomni/src/build/legocarbuild.cpp index 90d06155..f844aa08 100644 --- a/LEGO1/lego/legoomni/src/build/legocarbuild.cpp +++ b/LEGO1/lego/legoomni/src/build/legocarbuild.cpp @@ -56,7 +56,7 @@ void LegoCarBuild::Enable(MxBool p_enable) } // STUB: LEGO1 0x10025e70 -MxBool LegoCarBuild::VTable0x64() +MxBool LegoCarBuild::Escape() { // TODO return FALSE; diff --git a/LEGO1/lego/legoomni/src/entity/legonavcontroller.cpp b/LEGO1/lego/legoomni/src/entity/legonavcontroller.cpp index d3d940d3..63377d72 100644 --- a/LEGO1/lego/legoomni/src/entity/legonavcontroller.cpp +++ b/LEGO1/lego/legoomni/src/entity/legonavcontroller.cpp @@ -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); diff --git a/LEGO1/lego/legoomni/src/entity/legoworld.cpp b/LEGO1/lego/legoomni/src/entity/legoworld.cpp index 2eb76ed2..b0cb72dd 100644 --- a/LEGO1/lego/legoomni/src/entity/legoworld.cpp +++ b/LEGO1/lego/legoomni/src/entity/legoworld.cpp @@ -53,7 +53,7 @@ MxBool LegoWorld::VTable0x5c() } // FUNCTION: LEGO1 0x1001d680 -MxBool LegoWorld::VTable0x64() +MxBool LegoWorld::Escape() { return FALSE; } diff --git a/LEGO1/lego/legoomni/src/race/carrace.cpp b/LEGO1/lego/legoomni/src/race/carrace.cpp index b45ff7ea..418a74c5 100644 --- a/LEGO1/lego/legoomni/src/race/carrace.cpp +++ b/LEGO1/lego/legoomni/src/race/carrace.cpp @@ -51,7 +51,7 @@ undefined4 CarRace::VTable0x78(undefined4) } // STUB: LEGO1 0x10017900 -MxBool CarRace::VTable0x64() +MxBool CarRace::Escape() { // TODO return FALSE; diff --git a/LEGO1/lego/legoomni/src/race/jetskirace.cpp b/LEGO1/lego/legoomni/src/race/jetskirace.cpp index a976724d..37fc198d 100644 --- a/LEGO1/lego/legoomni/src/race/jetskirace.cpp +++ b/LEGO1/lego/legoomni/src/race/jetskirace.cpp @@ -32,7 +32,7 @@ undefined4 JetskiRace::VTable0x70(undefined4) } // STUB: LEGO1 0x10016a10 -MxBool JetskiRace::VTable0x64() +MxBool JetskiRace::Escape() { return TRUE; } diff --git a/LEGO1/lego/legoomni/src/race/legorace.cpp b/LEGO1/lego/legoomni/src/race/legorace.cpp index 034d3af8..c7959fc7 100644 --- a/LEGO1/lego/legoomni/src/race/legorace.cpp +++ b/LEGO1/lego/legoomni/src/race/legorace.cpp @@ -57,7 +57,7 @@ undefined4 LegoRace::VTable0x74(undefined4) } // FUNCTION: LEGO1 0x10015b90 -MxBool LegoRace::VTable0x64() +MxBool LegoRace::Escape() { return FALSE; } diff --git a/LEGO1/lego/legoomni/src/worlds/act3.cpp b/LEGO1/lego/legoomni/src/worlds/act3.cpp index 8195e6c7..98f789da 100644 --- a/LEGO1/lego/legoomni/src/worlds/act3.cpp +++ b/LEGO1/lego/legoomni/src/worlds/act3.cpp @@ -88,7 +88,7 @@ void Act3::VTable0x60() } // STUB: LEGO1 0x10073e50 -MxBool Act3::VTable0x64() +MxBool Act3::Escape() { // TODO return FALSE; diff --git a/LEGO1/lego/legoomni/src/worlds/elevatorbottom.cpp b/LEGO1/lego/legoomni/src/worlds/elevatorbottom.cpp index b3184aff..32c9265a 100644 --- a/LEGO1/lego/legoomni/src/worlds/elevatorbottom.cpp +++ b/LEGO1/lego/legoomni/src/worlds/elevatorbottom.cpp @@ -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; diff --git a/LEGO1/lego/legoomni/src/worlds/gasstation.cpp b/LEGO1/lego/legoomni/src/worlds/gasstation.cpp index d32b32ab..e8a4d813 100644 --- a/LEGO1/lego/legoomni/src/worlds/gasstation.cpp +++ b/LEGO1/lego/legoomni/src/worlds/gasstation.cpp @@ -411,7 +411,7 @@ MxResult GasStation::Tickle() } // FUNCTION: LEGO1 0x10005e70 -MxBool GasStation::VTable0x64() +MxBool GasStation::Escape() { m_radio.Stop(); m_state->FUN_10006490(); diff --git a/LEGO1/lego/legoomni/src/worlds/historybook.cpp b/LEGO1/lego/legoomni/src/worlds/historybook.cpp index 56e09bed..bf01d00a 100644 --- a/LEGO1/lego/legoomni/src/worlds/historybook.cpp +++ b/LEGO1/lego/legoomni/src/worlds/historybook.cpp @@ -149,7 +149,7 @@ void HistoryBook::ReadyWorld() } // FUNCTION: LEGO1 0x10082a10 -MxBool HistoryBook::VTable0x64() +MxBool HistoryBook::Escape() { m_destLocation = LegoGameState::Area::e_infomain; return TRUE; diff --git a/LEGO1/lego/legoomni/src/worlds/hospital.cpp b/LEGO1/lego/legoomni/src/worlds/hospital.cpp index cbc86643..bc6b0386 100644 --- a/LEGO1/lego/legoomni/src/worlds/hospital.cpp +++ b/LEGO1/lego/legoomni/src/worlds/hospital.cpp @@ -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; diff --git a/LEGO1/lego/legoomni/src/worlds/infocenter.cpp b/LEGO1/lego/legoomni/src/worlds/infocenter.cpp index d5d68518..b88db8b5 100644 --- a/LEGO1/lego/legoomni/src/worlds/infocenter.cpp +++ b/LEGO1/lego/legoomni/src/worlds/infocenter.cpp @@ -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(); diff --git a/LEGO1/lego/legoomni/src/worlds/infocenterdoor.cpp b/LEGO1/lego/legoomni/src/worlds/infocenterdoor.cpp index bc961368..7d205ce1 100644 --- a/LEGO1/lego/legoomni/src/worlds/infocenterdoor.cpp +++ b/LEGO1/lego/legoomni/src/worlds/infocenterdoor.cpp @@ -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; diff --git a/LEGO1/lego/legoomni/src/worlds/isle.cpp b/LEGO1/lego/legoomni/src/worlds/isle.cpp index 38e0fa5a..37a00ede 100644 --- a/LEGO1/lego/legoomni/src/worlds/isle.cpp +++ b/LEGO1/lego/legoomni/src/worlds/isle.cpp @@ -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 diff --git a/LEGO1/lego/legoomni/src/worlds/jukebox.cpp b/LEGO1/lego/legoomni/src/worlds/jukebox.cpp index 257db67b..ac284815 100644 --- a/LEGO1/lego/legoomni/src/worlds/jukebox.cpp +++ b/LEGO1/lego/legoomni/src/worlds/jukebox.cpp @@ -255,7 +255,7 @@ MxResult JukeBox::Tickle() } // FUNCTION: LEGO1 0x1005de70 -MxBool JukeBox::VTable0x64() +MxBool JukeBox::Escape() { m_destLocation = LegoGameState::e_infomain; return TRUE; diff --git a/LEGO1/lego/legoomni/src/worlds/legoact2.cpp b/LEGO1/lego/legoomni/src/worlds/legoact2.cpp index 43c05750..cc108d10 100644 --- a/LEGO1/lego/legoomni/src/worlds/legoact2.cpp +++ b/LEGO1/lego/legoomni/src/worlds/legoact2.cpp @@ -48,7 +48,7 @@ void LegoAct2::VTable0x60() } // STUB: LEGO1 0x100519d0 -MxBool LegoAct2::VTable0x64() +MxBool LegoAct2::Escape() { // TODO return FALSE; diff --git a/LEGO1/lego/legoomni/src/worlds/police.cpp b/LEGO1/lego/legoomni/src/worlds/police.cpp index 1cf8f879..cf1396b8 100644 --- a/LEGO1/lego/legoomni/src/worlds/police.cpp +++ b/LEGO1/lego/legoomni/src/worlds/police.cpp @@ -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; diff --git a/LEGO1/lego/legoomni/src/worlds/registrationbook.cpp b/LEGO1/lego/legoomni/src/worlds/registrationbook.cpp index 29802f23..bb325a8f 100644 --- a/LEGO1/lego/legoomni/src/worlds/registrationbook.cpp +++ b/LEGO1/lego/legoomni/src/worlds/registrationbook.cpp @@ -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; diff --git a/LEGO1/lego/legoomni/src/worlds/score.cpp b/LEGO1/lego/legoomni/src/worlds/score.cpp index 0bb40ea7..f8bea176 100644 --- a/LEGO1/lego/legoomni/src/worlds/score.cpp +++ b/LEGO1/lego/legoomni/src/worlds/score.cpp @@ -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;