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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
42 changed files with 120 additions and 40 deletions

View file

@ -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; }

View file

@ -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'

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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'

View file

@ -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);

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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; }

View file

@ -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

View file

@ -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

View file

@ -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();

View file

@ -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

View file

@ -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);

View file

@ -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();

View file

@ -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

View file

@ -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'

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;