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

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