From 1aff40dd94519e7aa5593eacf890ff841a4631ec Mon Sep 17 00:00:00 2001 From: Christian Semmler Date: Sun, 8 Dec 2024 10:00:57 -0700 Subject: [PATCH] Implement/match several functions in `Act3`, refactor (#1197) * Implement/match several functions in Act3, refactor * Fix naming * Rename * Add comment * Add annotation * Add BETA assert --- LEGO1/lego/legoomni/include/act2actor.h | 2 +- LEGO1/lego/legoomni/include/act3.h | 27 +-- LEGO1/lego/legoomni/include/act3actors.h | 2 +- LEGO1/lego/legoomni/include/act3brickster.h | 2 +- LEGO1/lego/legoomni/include/act3cop.h | 2 +- LEGO1/lego/legoomni/include/act3shark.h | 4 +- LEGO1/lego/legoomni/include/doors.h | 4 +- LEGO1/lego/legoomni/include/helicopter.h | 2 +- LEGO1/lego/legoomni/include/legoanimactor.h | 2 +- .../legoomni/include/legobuildingmanager.h | 2 +- LEGO1/lego/legoomni/include/legoextraactor.h | 4 +- LEGO1/lego/legoomni/include/legojetski.h | 2 +- .../legoomni/include/legojetskiraceactor.h | 2 +- .../lego/legoomni/include/legonavcontroller.h | 14 +- .../lego/legoomni/include/legoplantmanager.h | 1 + LEGO1/lego/legoomni/include/legoraceactor.h | 2 +- LEGO1/lego/legoomni/include/legoracemap.h | 6 +- LEGO1/lego/legoomni/include/legoracers.h | 2 +- LEGO1/lego/legoomni/include/legoracespecial.h | 6 +- LEGO1/lego/legoomni/src/actors/act2actor.cpp | 2 +- LEGO1/lego/legoomni/src/actors/act3actors.cpp | 14 +- .../legoomni/src/actors/act3brickster.cpp | 2 +- LEGO1/lego/legoomni/src/actors/act3cop.cpp | 2 +- LEGO1/lego/legoomni/src/actors/act3shark.cpp | 2 +- LEGO1/lego/legoomni/src/actors/doors.cpp | 10 +- LEGO1/lego/legoomni/src/actors/helicopter.cpp | 6 +- .../src/common/legobuildingmanager.cpp | 2 +- .../legoomni/src/common/legoplantmanager.cpp | 8 + LEGO1/lego/legoomni/src/entity/legojetski.cpp | 2 +- .../src/entity/legojetskiraceactor.cpp | 8 +- .../legoomni/src/entity/legonavcontroller.cpp | 1 + .../legoomni/src/entity/legopovcontroller.cpp | 2 +- .../lego/legoomni/src/paths/legoanimactor.cpp | 8 +- .../lego/legoomni/src/race/legoraceactor.cpp | 14 +- LEGO1/lego/legoomni/src/race/legoracers.cpp | 14 +- .../legoomni/src/race/legoracespecial.cpp | 14 +- LEGO1/lego/legoomni/src/worlds/act3.cpp | 157 +++++++++++++++--- 37 files changed, 244 insertions(+), 112 deletions(-) diff --git a/LEGO1/lego/legoomni/include/act2actor.h b/LEGO1/lego/legoomni/include/act2actor.h index e830b289..cf8ed507 100644 --- a/LEGO1/lego/legoomni/include/act2actor.h +++ b/LEGO1/lego/legoomni/include/act2actor.h @@ -22,7 +22,7 @@ class Act2Actor : public LegoAnimActor { void SetROI(LegoROI* p_roi, MxBool p_bool1, MxBool p_bool2) override; // vtable+0x24 void SetWorldSpeed(MxFloat p_worldSpeed) override; // vtable+0x30 MxS32 VTable0x68(Vector3& p_v1, Vector3& p_v2, Vector3& p_v3) override; // vtable+0x68 - void VTable0x70(float p_und) override; // vtable+0x70 + void VTable0x70(float p_time) override; // vtable+0x70 MxResult VTable0x94(LegoPathActor*, MxBool) override; // vtable+0x94 MxResult VTable0x9c() override; // vtable+0x9c MxS32 VTable0xa0() override; // vtable+0xa0 diff --git a/LEGO1/lego/legoomni/include/act3.h b/LEGO1/lego/legoomni/include/act3.h index 764dcdaf..d158950a 100644 --- a/LEGO1/lego/legoomni/include/act3.h +++ b/LEGO1/lego/legoomni/include/act3.h @@ -6,8 +6,15 @@ #include "legostate.h" #include "legoworld.h" +class Act3Brickster; +class Act3Cop; +class Act3Shark; class Helicopter; +// Macros confirmed by BETA10 +#define MAX_PIZZAS 20 +#define MAX_DONUTS 20 + // SIZE 0x0c struct Act3ListElement { undefined4 m_unk0x00[3]; // 0x00 @@ -89,7 +96,7 @@ class Act3 : public LegoWorld { MxBool Escape() override; // vtable+0x64 void Enable(MxBool p_enable) override; // vtable+0x68 - void SetHelicopter(Helicopter* p_helicopter) { m_helicopter = p_helicopter; } + void SetHelicopter(Helicopter* p_copter) { m_copter = p_copter; } void SetDestLocation(LegoGameState::Area p_destLocation) { m_destLocation = p_destLocation; } // SYNTHETIC: LEGO1 0x10072630 @@ -101,15 +108,15 @@ class Act3 : public LegoWorld { void FUN_10073430(); protected: - undefined4 m_unk0xf8; // 0xf8 - Act3Ammo m_unk0xfc[20]; // 0xfc - Act3Ammo m_unk0x217c[20]; // 0x217c + Act3State* m_state; // 0xf8 + Act3Ammo m_pizzas[MAX_PIZZAS]; // 0xfc + Act3Ammo m_donuts[MAX_DONUTS]; // 0x217c undefined m_unk0x41fc; // 0x41fc - undefined4 m_unk0x4200; // 0x4200 - undefined4 m_unk0x4204; // 0x4204 - undefined4 m_unk0x4208; // 0x4208 - Helicopter* m_helicopter; // 0x420c - undefined4 m_unk0x4210; // 0x4210 + Act3Cop* m_cop1; // 0x4200 + Act3Cop* m_cop2; // 0x4204 + Act3Brickster* m_brickster; // 0x4208 + Helicopter* m_copter; // 0x420c + Act3Shark* m_shark; // 0x4210 MxFloat m_unk0x4214; // 0x4214 undefined4 m_unk0x4218; // 0x4218 undefined m_unk0x421c; // 0x421c @@ -117,7 +124,7 @@ class Act3 : public LegoWorld { undefined m_unk0x421e; // 0x421e Act3List m_unk0x4220; // 0x4220 undefined4 m_unk0x4230[15]; // 0x4230 - undefined4 m_unk0x426c; // 0x426c + Act3Script::Script m_unk0x426c; // 0x426c LegoGameState::Area m_destLocation; // 0x4270 }; diff --git a/LEGO1/lego/legoomni/include/act3actors.h b/LEGO1/lego/legoomni/include/act3actors.h index 2fce23b3..9b1d941d 100644 --- a/LEGO1/lego/legoomni/include/act3actors.h +++ b/LEGO1/lego/legoomni/include/act3actors.h @@ -20,7 +20,7 @@ class Act3Actor : public LegoAnimActor { return "Act3Actor"; } - MxU32 VTable0x90(float p_float, Matrix4& p_transform) override; // vtable+0x90 + MxU32 VTable0x90(float p_time, Matrix4& p_transform) override; // vtable+0x90 MxResult VTable0x94(LegoPathActor* p_actor, MxBool p_bool) override; // vtable+0x94 // SYNTHETIC: LEGO1 0x10043330 diff --git a/LEGO1/lego/legoomni/include/act3brickster.h b/LEGO1/lego/legoomni/include/act3brickster.h index c84b8dd7..815ba51d 100644 --- a/LEGO1/lego/legoomni/include/act3brickster.h +++ b/LEGO1/lego/legoomni/include/act3brickster.h @@ -12,7 +12,7 @@ class Act3Brickster : public Act3Actor { ~Act3Brickster() override; void ParseAction(char* p_extra) override; // vtable+0x20 - void VTable0x70(float p_und) override; // vtable+0x70 + void VTable0x70(float p_time) override; // vtable+0x70 MxResult VTable0x94(LegoPathActor*, MxBool) override; // vtable+0x94 void SwitchBoundary( LegoPathBoundary*& p_boundary, diff --git a/LEGO1/lego/legoomni/include/act3cop.h b/LEGO1/lego/legoomni/include/act3cop.h index a720b84c..91d3a461 100644 --- a/LEGO1/lego/legoomni/include/act3cop.h +++ b/LEGO1/lego/legoomni/include/act3cop.h @@ -11,7 +11,7 @@ class Act3Cop : public Act3Actor { Act3Cop(); void ParseAction(char* p_extra) override; // vtable+0x20 - void VTable0x70(float p_und) override; // vtable+0x70 + void VTable0x70(float p_time) override; // vtable+0x70 MxResult VTable0x94(LegoPathActor*, MxBool) override; // vtable+0x94 MxResult VTable0x9c() override; // vtable+0x9c diff --git a/LEGO1/lego/legoomni/include/act3shark.h b/LEGO1/lego/legoomni/include/act3shark.h index 49b467b2..06ac9da5 100644 --- a/LEGO1/lego/legoomni/include/act3shark.h +++ b/LEGO1/lego/legoomni/include/act3shark.h @@ -17,8 +17,8 @@ class Act3Shark : public LegoAnimActor { return "Act3Shark"; } - void ParseAction(char*) override; // vtable+0x20 - void VTable0x70(float p_float) override; // vtable+0x70 + void ParseAction(char*) override; // vtable+0x20 + void VTable0x70(float p_time) override; // vtable+0x70 // LegoAnimActor vtable virtual MxResult FUN_10042ce0(void*); // vtable+0x10 diff --git a/LEGO1/lego/legoomni/include/doors.h b/LEGO1/lego/legoomni/include/doors.h index 8be10963..2a5e45e3 100644 --- a/LEGO1/lego/legoomni/include/doors.h +++ b/LEGO1/lego/legoomni/include/doors.h @@ -25,9 +25,9 @@ class Doors : public LegoPathActor { } void ParseAction(char* p_extra) override; // vtable+0x20 - void VTable0x70(float p_float) override; // vtable+0x70 + void VTable0x70(float p_time) override; // vtable+0x70 MxResult VTable0x94(LegoPathActor* p_actor, MxBool p_bool) override; // vtable+0x94 - virtual MxFloat VTable0xcc(float p_float); // vtable+0xcc + virtual MxFloat VTable0xcc(float p_time); // vtable+0xcc // SYNTHETIC: LEGO1 0x1000e580 // Doors::`scalar deleting destructor' diff --git a/LEGO1/lego/legoomni/include/helicopter.h b/LEGO1/lego/legoomni/include/helicopter.h index 74715234..9faaff8b 100644 --- a/LEGO1/lego/legoomni/include/helicopter.h +++ b/LEGO1/lego/legoomni/include/helicopter.h @@ -66,7 +66,7 @@ class Helicopter : public IslePathActor { } MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 - void VTable0x70(float p_float) override; // vtable+0x70 + void VTable0x70(float p_time) override; // vtable+0x70 void VTable0x74(Matrix4& p_transform) override; // vtable+0x74 MxLong HandleClick() override; // vtable+0xcc MxLong HandleControl(LegoControlManagerNotificationParam& p_param) override; // vtable+0xd4 diff --git a/LEGO1/lego/legoomni/include/legoanimactor.h b/LEGO1/lego/legoomni/include/legoanimactor.h index ea4fcb4b..ebdc4099 100644 --- a/LEGO1/lego/legoomni/include/legoanimactor.h +++ b/LEGO1/lego/legoomni/include/legoanimactor.h @@ -55,7 +55,7 @@ class LegoAnimActor : public virtual LegoPathActor { void ParseAction(char* p_extra) override; // vtable+0x20 void SetWorldSpeed(MxFloat p_worldSpeed) override; // vtable+0x30 - void VTable0x70(float p_und) override; // vtable+0x70 + void VTable0x70(float p_time) override; // vtable+0x70 void VTable0x74(Matrix4& p_transform) override; // vtable+0x74 virtual MxResult FUN_1001c1f0(float& p_und); diff --git a/LEGO1/lego/legoomni/include/legobuildingmanager.h b/LEGO1/lego/legoomni/include/legobuildingmanager.h index 409e805c..41b5a8fd 100644 --- a/LEGO1/lego/legoomni/include/legobuildingmanager.h +++ b/LEGO1/lego/legoomni/include/legobuildingmanager.h @@ -87,8 +87,8 @@ class LegoBuildingManager : public MxCore { MxResult FUN_10030630(); LegoBuildingInfo* GetInfoArray(MxS32& p_length); void FUN_100307b0(LegoEntity* p_entity, MxS32 p_adjust); + void FUN_10030800(); - static void FUN_10030800(); static const char* GetCustomizeAnimFile() { return g_customizeAnimFile; } // SYNTHETIC: LEGO1 0x1002f940 diff --git a/LEGO1/lego/legoomni/include/legoextraactor.h b/LEGO1/lego/legoomni/include/legoextraactor.h index f6295efa..54e3b1f8 100644 --- a/LEGO1/lego/legoomni/include/legoextraactor.h +++ b/LEGO1/lego/legoomni/include/legoextraactor.h @@ -43,9 +43,9 @@ class LegoExtraActor : public virtual LegoAnimActor { float p_f2, Vector3& p_v3 ) override; // vtable+0x6c - void VTable0x70(float) override; // vtable+0x70 + void VTable0x70(float p_time) override; // vtable+0x70 void VTable0x74(Matrix4& p_transform) override; // vtable+0x74 - MxU32 VTable0x90(float p_float, Matrix4& p_matrix) override; // vtable+0x90 + MxU32 VTable0x90(float p_time, Matrix4& p_matrix) override; // vtable+0x90 MxResult VTable0x94(LegoPathActor* p_actor, MxBool p_bool) override; // vtable+0x94 MxResult VTable0x9c() override; // vtable+0x9c void VTable0xa4(MxBool& p_und1, MxS32& p_und2) override; // vtable+0xa4 diff --git a/LEGO1/lego/legoomni/include/legojetski.h b/LEGO1/lego/legoomni/include/legojetski.h index 56057da2..94daf791 100644 --- a/LEGO1/lego/legoomni/include/legojetski.h +++ b/LEGO1/lego/legoomni/include/legojetski.h @@ -40,7 +40,7 @@ class LegoJetski : public LegoJetskiRaceActor, public LegoRaceMap { float p_f2, Vector3& p_v3 ) override; // vtable+0x6c - void VTable0x70(float p_float) override; // vtable+0x70 + void VTable0x70(float p_time) override; // vtable+0x70 MxResult VTable0x94(LegoPathActor* p_actor, MxBool p_bool) override; // vtable+0x94 void SwitchBoundary(LegoPathBoundary*& p_boundary, LegoUnknown100db7f4*& p_edge, float& p_unk0xe4) override; // vtable+0x98 diff --git a/LEGO1/lego/legoomni/include/legojetskiraceactor.h b/LEGO1/lego/legoomni/include/legojetskiraceactor.h index f60a02ff..d7aa6fdc 100644 --- a/LEGO1/lego/legoomni/include/legojetskiraceactor.h +++ b/LEGO1/lego/legoomni/include/legojetskiraceactor.h @@ -39,7 +39,7 @@ class LegoJetskiRaceActor : public virtual LegoCarRaceActor { float p_f2, Vector3& p_v3 ) override; // vtable+0x6c - void VTable0x70(float p_float) override; // vtable+0x70 + void VTable0x70(float p_time) override; // vtable+0x70 MxS32 VTable0x1c(LegoPathBoundary* p_boundary, LegoEdge* p_edge) override; // vtable+0x1c // SYNTHETIC: LEGO1 0x10013a80 diff --git a/LEGO1/lego/legoomni/include/legonavcontroller.h b/LEGO1/lego/legoomni/include/legonavcontroller.h index 7bd64127..ef882450 100644 --- a/LEGO1/lego/legoomni/include/legonavcontroller.h +++ b/LEGO1/lego/legoomni/include/legonavcontroller.h @@ -38,7 +38,6 @@ class LegoNavController : public MxCore { void SetTargets(int p_hPos, int p_vPos, MxBool p_accel); void SetControlMax(int p_hMax, int p_vMax); - void SetTrackDefaultParams(MxBool p_state) { m_trackDefault = p_state; } void SetToDefaultParams(); MxBool CalculateNewPosDir( const Vector3& p_curPos, @@ -88,6 +87,13 @@ class LegoNavController : public MxCore { // FUNCTION: BETA10 0x100c7880 void SetTrackDefault(MxS32 p_trackDefault) { m_trackDefault = p_trackDefault; } + // FUNCTION: BETA10 0x100178a0 + void Reset() + { + m_trackDefault = TRUE; + SetToDefaultParams(); + } + MxFloat GetLinearVel() { return m_linearVel; } MxFloat GetRotationalVel() { return m_rotationalVel; } MxFloat GetMaxLinearVel() { return m_maxLinearVel; } @@ -96,17 +102,17 @@ class LegoNavController : public MxCore { void ResetMaxLinearVel(MxFloat p_maxLinearVel) { m_maxLinearVel = p_maxLinearVel; - m_trackDefault = 0; + m_trackDefault = FALSE; } void ResetMaxLinearAccel(MxFloat p_maxLinearAccel) { m_maxLinearAccel = p_maxLinearAccel; - m_trackDefault = 0; + m_trackDefault = FALSE; } void ResetMaxLinearDeccel(MxFloat p_maxLinearDeccel) { m_maxLinearDeccel = p_maxLinearDeccel; - m_trackDefault = 0; + m_trackDefault = FALSE; } // FUNCTION: BETA10 0x100c9a10 diff --git a/LEGO1/lego/legoomni/include/legoplantmanager.h b/LEGO1/lego/legoomni/include/legoplantmanager.h index 132e1f4f..8c23fd84 100644 --- a/LEGO1/lego/legoomni/include/legoplantmanager.h +++ b/LEGO1/lego/legoomni/include/legoplantmanager.h @@ -49,6 +49,7 @@ class LegoPlantManager : public MxCore { MxBool FUN_10026c50(LegoEntity* p_entity); void ScheduleAnimation(LegoEntity* p_entity, MxLong p_length); void FUN_10027120(); + void FUN_10027200(); static void SetCustomizeAnimFile(const char* p_value); static const char* GetCustomizeAnimFile() { return g_customizeAnimFile; } diff --git a/LEGO1/lego/legoomni/include/legoraceactor.h b/LEGO1/lego/legoomni/include/legoraceactor.h index 6fa69eff..0d759f36 100644 --- a/LEGO1/lego/legoomni/include/legoraceactor.h +++ b/LEGO1/lego/legoomni/include/legoraceactor.h @@ -31,7 +31,7 @@ class LegoRaceActor : public virtual LegoAnimActor { } MxS32 VTable0x68(Vector3& p_v1, Vector3& p_v2, Vector3& p_v3) override; // vtable+0x68 - MxU32 VTable0x90(float p_float, Matrix4& p_matrix) override; // vtable+0x90 + MxU32 VTable0x90(float p_time, Matrix4& p_matrix) override; // vtable+0x90 MxResult VTable0x94(LegoPathActor* p_actor, MxBool p_bool) override; // vtable+0x94 // FUNCTION: LEGO1 0x10014aa0 diff --git a/LEGO1/lego/legoomni/include/legoracemap.h b/LEGO1/lego/legoomni/include/legoracemap.h index 1380cd0c..1adc3793 100644 --- a/LEGO1/lego/legoomni/include/legoracemap.h +++ b/LEGO1/lego/legoomni/include/legoracemap.h @@ -21,9 +21,9 @@ class LegoRaceMap : public virtual LegoRaceActor { ~LegoRaceMap() override; // LegoPathActor vtable - MxLong Notify(MxParam& p_param) override; // vtable+0x04 - void ParseAction(char* p_extra) override; // vtable+0x20 - void VTable0x70(float p_und) override = 0; // vtable+0x70 + MxLong Notify(MxParam& p_param) override; // vtable+0x04 + void ParseAction(char* p_extra) override; // vtable+0x20 + void VTable0x70(float p_time) override = 0; // vtable+0x70 // LegoRaceMap vtable virtual void FUN_1005d4b0(); // vtable+0x00 diff --git a/LEGO1/lego/legoomni/include/legoracers.h b/LEGO1/lego/legoomni/include/legoracers.h index 3ccfc06f..36601e27 100644 --- a/LEGO1/lego/legoomni/include/legoracers.h +++ b/LEGO1/lego/legoomni/include/legoracers.h @@ -66,7 +66,7 @@ class LegoRaceCar : public LegoCarRaceActor, public LegoRaceMap { float p_f2, Vector3& p_v3 ) override; // vtable+0x6c - void VTable0x70(float p_float) override; // vtable+0x70 + void VTable0x70(float p_time) override; // vtable+0x70 MxResult VTable0x94(LegoPathActor* p_actor, MxBool p_bool) override; // vtable+0x94 void SwitchBoundary(LegoPathBoundary*& p_boundary, LegoUnknown100db7f4*& p_edge, float& p_unk0xe4) override; // vtable+0x98 diff --git a/LEGO1/lego/legoomni/include/legoracespecial.h b/LEGO1/lego/legoomni/include/legoracespecial.h index 42a2d437..4ceabdea 100644 --- a/LEGO1/lego/legoomni/include/legoracespecial.h +++ b/LEGO1/lego/legoomni/include/legoracespecial.h @@ -42,13 +42,13 @@ class LegoCarRaceActor : public virtual LegoRaceActor { float p_f1, float p_f2, Vector3& p_v3 - ) override; // vtable+0x6c - void VTable0x70(float p_float) override; // vtable+0x70 + ) override; // vtable+0x6c + void VTable0x70(float p_time) override; // vtable+0x70 void SwitchBoundary(LegoPathBoundary*& p_boundary, LegoUnknown100db7f4*& p_edge, float& p_unk0xe4) override; // vtable+0x98 MxResult VTable0x9c() override; // vtable+0x9c - virtual void FUN_10080590(float p_float); + virtual void FUN_10080590(float p_time); // FUNCTION: LEGO1 0x10012bb0 virtual void FUN_10012bb0(float p_unk0x14) { m_unk0x14 = p_unk0x14; } diff --git a/LEGO1/lego/legoomni/src/actors/act2actor.cpp b/LEGO1/lego/legoomni/src/actors/act2actor.cpp index b97c08bc..1d29f18b 100644 --- a/LEGO1/lego/legoomni/src/actors/act2actor.cpp +++ b/LEGO1/lego/legoomni/src/actors/act2actor.cpp @@ -117,7 +117,7 @@ MxResult Act2Actor::VTable0x9c() // STUB: LEGO1 0x10018c30 // STUB: BETA10 0x1000cb52 -void Act2Actor::VTable0x70(float p_und) +void Act2Actor::VTable0x70(float p_time) { // TODO } diff --git a/LEGO1/lego/legoomni/src/actors/act3actors.cpp b/LEGO1/lego/legoomni/src/actors/act3actors.cpp index 7756cb45..6b56f30f 100644 --- a/LEGO1/lego/legoomni/src/actors/act3actors.cpp +++ b/LEGO1/lego/legoomni/src/actors/act3actors.cpp @@ -15,7 +15,7 @@ Act3Actor::Act3Actor() } // FUNCTION: LEGO1 0x1003fb70 -MxU32 Act3Actor::VTable0x90(float p_float, Matrix4& p_transform) +MxU32 Act3Actor::VTable0x90(float p_time, Matrix4& p_transform) { // Note: Code duplication with LegoExtraActor::VTable0x90 switch (m_state & 0xff) { @@ -23,10 +23,10 @@ MxU32 Act3Actor::VTable0x90(float p_float, Matrix4& p_transform) case 1: return TRUE; case 2: - m_unk0x1c = p_float + 2000.0f; + m_unk0x1c = p_time + 2000.0f; m_state = 3; - m_actorTime += (p_float - m_lastTime) * m_worldSpeed; - m_lastTime = p_float; + m_actorTime += (p_time - m_lastTime) * m_worldSpeed; + m_lastTime = p_time; return FALSE; case 3: assert(!m_userNavFlag); @@ -34,7 +34,7 @@ MxU32 Act3Actor::VTable0x90(float p_float, Matrix4& p_transform) p_transform = m_roi->GetLocal2World(); - if (m_unk0x1c > p_float) { + if (m_unk0x1c > p_time) { Mx3DPointFloat position; position = positionRef; @@ -42,8 +42,8 @@ MxU32 Act3Actor::VTable0x90(float p_float, Matrix4& p_transform) p_transform.RotateX(0.6); positionRef = position; - m_actorTime += (p_float - m_lastTime) * m_worldSpeed; - m_lastTime = p_float; + m_actorTime += (p_time - m_lastTime) * m_worldSpeed; + m_lastTime = p_time; VTable0x74(p_transform); return FALSE; diff --git a/LEGO1/lego/legoomni/src/actors/act3brickster.cpp b/LEGO1/lego/legoomni/src/actors/act3brickster.cpp index 24340578..395ffe04 100644 --- a/LEGO1/lego/legoomni/src/actors/act3brickster.cpp +++ b/LEGO1/lego/legoomni/src/actors/act3brickster.cpp @@ -21,7 +21,7 @@ void Act3Brickster::ParseAction(char* p_extra) } // STUB: LEGO1 0x10041050 -void Act3Brickster::VTable0x70(float p_und) +void Act3Brickster::VTable0x70(float p_time) { // TODO } diff --git a/LEGO1/lego/legoomni/src/actors/act3cop.cpp b/LEGO1/lego/legoomni/src/actors/act3cop.cpp index 557386ce..54094516 100644 --- a/LEGO1/lego/legoomni/src/actors/act3cop.cpp +++ b/LEGO1/lego/legoomni/src/actors/act3cop.cpp @@ -22,7 +22,7 @@ void Act3Cop::ParseAction(char* p_extra) } // STUB: LEGO1 0x100401f0 -void Act3Cop::VTable0x70(float p_und) +void Act3Cop::VTable0x70(float p_time) { // TODO } diff --git a/LEGO1/lego/legoomni/src/actors/act3shark.cpp b/LEGO1/lego/legoomni/src/actors/act3shark.cpp index 8cc9f698..67fffcdf 100644 --- a/LEGO1/lego/legoomni/src/actors/act3shark.cpp +++ b/LEGO1/lego/legoomni/src/actors/act3shark.cpp @@ -16,7 +16,7 @@ MxResult Act3Shark::FUN_10042ce0(void*) } // STUB: LEGO1 0x10042d40 -void Act3Shark::VTable0x70(float p_float) +void Act3Shark::VTable0x70(float p_time) { // TODO } diff --git a/LEGO1/lego/legoomni/src/actors/doors.cpp b/LEGO1/lego/legoomni/src/actors/doors.cpp index 3ff0306d..1dff3758 100644 --- a/LEGO1/lego/legoomni/src/actors/doors.cpp +++ b/LEGO1/lego/legoomni/src/actors/doors.cpp @@ -40,11 +40,11 @@ MxResult Doors::VTable0x94(LegoPathActor* p_actor, MxBool p_bool) // FUNCTION: LEGO1 0x10066190 // FUNCTION: BETA10 0x1002696b -MxFloat Doors::VTable0xcc(float p_float) +MxFloat Doors::VTable0xcc(float p_time) { MxFloat fVar1; - fVar1 = p_float - m_unk0x158; + fVar1 = p_time - m_unk0x158; if (fVar1 <= 0.0f) { return 0.0f; @@ -65,7 +65,7 @@ MxFloat Doors::VTable0xcc(float p_float) // FUNCTION: LEGO1 0x10066250 // FUNCTION: BETA10 0x10026a45 -void Doors::VTable0x70(float p_float) +void Doors::VTable0x70(float p_time) { assert(m_ltDoor && m_rtDoor); @@ -80,7 +80,7 @@ void Doors::VTable0x70(float p_float) case 1: break; case 2: - float local8 = VTable0xcc(p_float); + float local8 = VTable0xcc(p_time); if (local8 > 0.0f) { MxMatrix local58(m_ltDoorLocal); @@ -102,7 +102,7 @@ void Doors::VTable0x70(float p_float) m_unk0x1f4 = local8; } - if (m_unk0x158 + g_unk0x100d8e84 < p_float) { + if (m_unk0x158 + g_unk0x100d8e84 < p_time) { m_ltDoor->FUN_100a58f0(m_ltDoorLocal); m_rtDoor->FUN_100a58f0(m_rtDoorLocal); m_ltDoor->VTable0x14(); diff --git a/LEGO1/lego/legoomni/src/actors/helicopter.cpp b/LEGO1/lego/legoomni/src/actors/helicopter.cpp index 9c169087..57dca029 100644 --- a/LEGO1/lego/legoomni/src/actors/helicopter.cpp +++ b/LEGO1/lego/legoomni/src/actors/helicopter.cpp @@ -354,16 +354,16 @@ void Helicopter::VTable0x74(Matrix4& p_transform) } // FUNCTION: LEGO1 0x10003ee0 -void Helicopter::VTable0x70(float p_float) +void Helicopter::VTable0x70(float p_time) { MxU32 state = m_state->GetUnkown8(); switch (state) { default: - LegoPathActor::VTable0x70(p_float); + LegoPathActor::VTable0x70(p_time); return; case 4: case 5: - float f = m_unk0x1f0 - p_float + 3000; + float f = m_unk0x1f0 - p_time + 3000; if (f >= 0) { float f2 = f / 3000 + 1; if (f2 < 0) { diff --git a/LEGO1/lego/legoomni/src/common/legobuildingmanager.cpp b/LEGO1/lego/legoomni/src/common/legobuildingmanager.cpp index 1c0245c5..35a5d63a 100644 --- a/LEGO1/lego/legoomni/src/common/legobuildingmanager.cpp +++ b/LEGO1/lego/legoomni/src/common/legobuildingmanager.cpp @@ -889,7 +889,7 @@ void LegoBuildingManager::FUN_100307b0(LegoEntity* p_entity, MxS32 p_adjust) // FUNCTION: LEGO1 0x10030800 void LegoBuildingManager::FUN_10030800() { - for (MxS32 i = 0; i < sizeOfArray(g_buildingInfo); i++) { + for (MxU32 i = 0; i < sizeOfArray(g_buildingInfo); i++) { g_buildingInfo[i].m_initialUnk0x11 = g_buildingInfo[i].m_unk0x11; } } diff --git a/LEGO1/lego/legoomni/src/common/legoplantmanager.cpp b/LEGO1/lego/legoomni/src/common/legoplantmanager.cpp index 5b26d576..c91fbdc8 100644 --- a/LEGO1/lego/legoomni/src/common/legoplantmanager.cpp +++ b/LEGO1/lego/legoomni/src/common/legoplantmanager.cpp @@ -633,3 +633,11 @@ void LegoPlantManager::FUN_100271b0(LegoEntity* p_entity, MxS32 p_adjust) } } } + +// FUNCTION: LEGO1 0x10027200 +void LegoPlantManager::FUN_10027200() +{ + for (MxU32 i = 0; i < sizeOfArray(g_plantInfo); i++) { + g_plantInfo[i].m_initialUnk0x16 = g_plantInfo[i].m_unk0x16; + } +} diff --git a/LEGO1/lego/legoomni/src/entity/legojetski.cpp b/LEGO1/lego/legoomni/src/entity/legojetski.cpp index 5ad8524d..ef1c36c0 100644 --- a/LEGO1/lego/legoomni/src/entity/legojetski.cpp +++ b/LEGO1/lego/legoomni/src/entity/legojetski.cpp @@ -25,7 +25,7 @@ void LegoJetski::FUN_100136f0(float p_worldSpeed) } // STUB: LEGO1 0x10013740 -void LegoJetski::VTable0x70(float p_float) +void LegoJetski::VTable0x70(float p_time) { // TODO } diff --git a/LEGO1/lego/legoomni/src/entity/legojetskiraceactor.cpp b/LEGO1/lego/legoomni/src/entity/legojetskiraceactor.cpp index 22a60c40..8b39ebbb 100644 --- a/LEGO1/lego/legoomni/src/entity/legojetskiraceactor.cpp +++ b/LEGO1/lego/legoomni/src/entity/legojetskiraceactor.cpp @@ -119,14 +119,14 @@ MxS32 LegoJetskiRaceActor::VTable0x1c(LegoPathBoundary* p_boundary, LegoEdge* p_ } // FUNCTION: LEGO1 0x10081550 -void LegoJetskiRaceActor::VTable0x70(float p_float) +void LegoJetskiRaceActor::VTable0x70(float p_time) { if (m_unk0x0c == 0) { const LegoChar* raceState = VariableTable()->GetVariable(g_raceState); if (!stricmp(raceState, g_racing)) { m_unk0x0c = 1; - m_lastTime = p_float - 1.0f; - m_unk0x1c = p_float; + m_lastTime = p_time - 1.0f; + m_unk0x1c = p_time; } else if (!m_userNavFlag) { LegoAnimActor::VTable0x70(m_lastTime + 1.0f); @@ -134,7 +134,7 @@ void LegoJetskiRaceActor::VTable0x70(float p_float) } if (m_unk0x0c == 1) { - LegoAnimActor::VTable0x70(p_float); + LegoAnimActor::VTable0x70(p_time); } } diff --git a/LEGO1/lego/legoomni/src/entity/legonavcontroller.cpp b/LEGO1/lego/legoomni/src/entity/legonavcontroller.cpp index e16050bd..d3474ced 100644 --- a/LEGO1/lego/legoomni/src/entity/legonavcontroller.cpp +++ b/LEGO1/lego/legoomni/src/entity/legonavcontroller.cpp @@ -142,6 +142,7 @@ void LegoNavController::SetControlMax(int p_hMax, int p_vMax) } // FUNCTION: LEGO1 0x10054cd0 +// FUNCTION: BETA10 0x1009ad76 void LegoNavController::SetToDefaultParams() { m_deadZone = g_defdeadZone; diff --git a/LEGO1/lego/legoomni/src/entity/legopovcontroller.cpp b/LEGO1/lego/legoomni/src/entity/legopovcontroller.cpp index 6c63abd8..0cff228f 100644 --- a/LEGO1/lego/legoomni/src/entity/legopovcontroller.cpp +++ b/LEGO1/lego/legoomni/src/entity/legopovcontroller.cpp @@ -106,7 +106,7 @@ MxResult LegoPointOfViewController::Create(Lego3DView* p_lego3DView) m_lego3DView = p_lego3DView; m_nav = new LegoNavController(); LegoOmni::GetInstance()->SetNavController(m_nav); - m_nav->SetTrackDefaultParams(TRUE); + m_nav->SetTrackDefault(TRUE); TickleManager()->RegisterClient(this, 10); return SUCCESS; } diff --git a/LEGO1/lego/legoomni/src/paths/legoanimactor.cpp b/LEGO1/lego/legoomni/src/paths/legoanimactor.cpp index 6ed0a8c1..6001212b 100644 --- a/LEGO1/lego/legoomni/src/paths/legoanimactor.cpp +++ b/LEGO1/lego/legoomni/src/paths/legoanimactor.cpp @@ -70,10 +70,10 @@ void LegoAnimActor::VTable0x74(Matrix4& p_transform) } // FUNCTION: LEGO1 0x1001c290 -void LegoAnimActor::VTable0x70(float p_float) +void LegoAnimActor::VTable0x70(float p_time) { if (m_lastTime == 0) { - m_lastTime = p_float - 1.0f; + m_lastTime = p_time - 1.0f; } if (m_state == 0 && !m_userNavFlag && m_worldSpeed <= 0) { @@ -84,10 +84,10 @@ void LegoAnimActor::VTable0x70(float p_float) FUN_1001c360(f, matrix); } - m_lastTime = m_actorTime = p_float; + m_lastTime = m_actorTime = p_time; } else { - LegoPathActor::VTable0x70(p_float); + LegoPathActor::VTable0x70(p_time); } } diff --git a/LEGO1/lego/legoomni/src/race/legoraceactor.cpp b/LEGO1/lego/legoomni/src/race/legoraceactor.cpp index e640b812..c0462c6c 100644 --- a/LEGO1/lego/legoomni/src/race/legoraceactor.cpp +++ b/LEGO1/lego/legoomni/src/race/legoraceactor.cpp @@ -45,7 +45,7 @@ MxS32 LegoRaceActor::VTable0x68(Vector3& p_v1, Vector3& p_v2, Vector3& p_v3) // FUNCTION: LEGO1 0x100147f0 // FUNCTION: BETA10 0x100c9c93 -MxU32 LegoRaceActor::VTable0x90(float p_float, Matrix4& p_transform) +MxU32 LegoRaceActor::VTable0x90(float p_time, Matrix4& p_transform) { // Note: Code duplication with LegoExtraActor::VTable0x90 switch (m_state) { @@ -54,10 +54,10 @@ MxU32 LegoRaceActor::VTable0x90(float p_float, Matrix4& p_transform) return 1; case 2: - m_unk0x08 = p_float + 2000.0f; + m_unk0x08 = p_time + 2000.0f; m_state = 3; - m_actorTime += (p_float - m_lastTime) * m_worldSpeed; - m_lastTime = p_float; + m_actorTime += (p_time - m_lastTime) * m_worldSpeed; + m_lastTime = p_time; return 0; case 3: @@ -66,7 +66,7 @@ MxU32 LegoRaceActor::VTable0x90(float p_float, Matrix4& p_transform) p_transform = m_roi->GetLocal2World(); - if (m_unk0x08 > p_float) { + if (m_unk0x08 > p_time) { Mx3DPointFloat position; position = positionRef; @@ -74,8 +74,8 @@ MxU32 LegoRaceActor::VTable0x90(float p_float, Matrix4& p_transform) p_transform.RotateX(0.6); positionRef = position; - m_actorTime += (p_float - m_lastTime) * m_worldSpeed; - m_lastTime = p_float; + m_actorTime += (p_time - m_lastTime) * m_worldSpeed; + m_lastTime = p_time; VTable0x74(p_transform); return 0; diff --git a/LEGO1/lego/legoomni/src/race/legoracers.cpp b/LEGO1/lego/legoomni/src/race/legoracers.cpp index 4b12e8d7..306179db 100644 --- a/LEGO1/lego/legoomni/src/race/legoracers.cpp +++ b/LEGO1/lego/legoomni/src/race/legoracers.cpp @@ -371,17 +371,17 @@ MxU32 LegoRaceCar::HandleSkeletonKicks(float p_param1) // FUNCTION: LEGO1 0x100131f0 // FUNCTION: BETA10 0x100cb88a -void LegoRaceCar::VTable0x70(float p_float) +void LegoRaceCar::VTable0x70(float p_time) { if (m_userNavFlag && (m_userState == LEGORACECAR_KICK1 || m_userState == LEGORACECAR_KICK2)) { - FUN_10012ff0(p_float); + FUN_10012ff0(p_time); return; } - LegoCarRaceActor::VTable0x70(p_float); + LegoCarRaceActor::VTable0x70(p_time); if (m_userNavFlag && m_userState == LEGORACECAR_UNKNOWN_1) { - if (HandleSkeletonKicks(p_float)) { + if (HandleSkeletonKicks(p_time)) { return; } } @@ -390,7 +390,7 @@ void LegoRaceCar::VTable0x70(float p_float) FUN_1005d4b0(); if (!m_userNavFlag) { - FUN_10080590(p_float); + FUN_10080590(p_time); return; } @@ -415,11 +415,11 @@ void LegoRaceCar::VTable0x70(float p_float) } if (absoluteSpeed != 0.0f) { - g_unk0x100f0b88 = p_float; + g_unk0x100f0b88 = p_time; g_unk0x100f0b8c = FALSE; } - if (p_float - g_unk0x100f0b88 > 5000.0f && !g_unk0x100f0b8c) { + if (p_time - g_unk0x100f0b88 > 5000.0f && !g_unk0x100f0b8c) { SoundManager()->GetCacheSoundManager()->Play(g_srt001ra, NULL, 0); g_unk0x100f0b8c = TRUE; } diff --git a/LEGO1/lego/legoomni/src/race/legoracespecial.cpp b/LEGO1/lego/legoomni/src/race/legoracespecial.cpp index aaabbff3..c423726d 100644 --- a/LEGO1/lego/legoomni/src/race/legoracespecial.cpp +++ b/LEGO1/lego/legoomni/src/race/legoracespecial.cpp @@ -54,7 +54,7 @@ LegoCarRaceActor::LegoCarRaceActor() // FUNCTION: LEGO1 0x10080590 // FUNCTION: BETA10 0x100cd8cf -void LegoCarRaceActor::FUN_10080590(float p_float) +void LegoCarRaceActor::FUN_10080590(float p_time) { MxFloat maxSpeed = m_maxLinearVel; Mx3DPointFloat destEdgeUnknownVector; @@ -89,8 +89,8 @@ void LegoCarRaceActor::FUN_10080590(float p_float) } MxFloat deltaSpeed = maxSpeed - m_worldSpeed; - MxFloat changeInSpeed = (p_float - m_unk0x1c) * m_unk0x14; - m_unk0x1c = p_float; + MxFloat changeInSpeed = (p_time - m_unk0x1c) * m_unk0x14; + m_unk0x1c = p_time; if (deltaSpeed < 0.0f) { changeInSpeed = -changeInSpeed; @@ -214,7 +214,7 @@ void LegoCarRaceActor::SwitchBoundary(LegoPathBoundary*& p_boundary, LegoUnknown // FUNCTION: LEGO1 0x10080b70 // FUNCTION: BETA10 0x100cdbae -void LegoCarRaceActor::VTable0x70(float p_float) +void LegoCarRaceActor::VTable0x70(float p_time) { // m_unk0x0c is not an MxBool, there are places where it is set to 2 or higher if (m_unk0x0c == 0) { @@ -222,13 +222,13 @@ void LegoCarRaceActor::VTable0x70(float p_float) if (strcmpi(value, g_racing) == 0) { m_unk0x0c = 1; - m_lastTime = p_float - 1.0f; - m_unk0x1c = p_float; + m_lastTime = p_time - 1.0f; + m_unk0x1c = p_time; } } if (m_unk0x0c == 1) { - LegoAnimActor::VTable0x70(p_float); + LegoAnimActor::VTable0x70(p_time); } } diff --git a/LEGO1/lego/legoomni/src/worlds/act3.cpp b/LEGO1/lego/legoomni/src/worlds/act3.cpp index 48c5c232..5b384052 100644 --- a/LEGO1/lego/legoomni/src/worlds/act3.cpp +++ b/LEGO1/lego/legoomni/src/worlds/act3.cpp @@ -1,26 +1,42 @@ #include "act3.h" +#include "3dmanager/lego3dmanager.h" +#include "act3_actions.h" +#include "helicopter.h" +#include "legoanimationmanager.h" +#include "legobuildingmanager.h" +#include "legocontrolmanager.h" +#include "legomain.h" #include "legonavcontroller.h" +#include "legoplantmanager.h" +#include "legovideomanager.h" #include "misc.h" +#include "mxbackgroundaudiomanager.h" #include "mxmisc.h" #include "mxnotificationmanager.h" +#include "mxticklemanager.h" +#include "mxtransitionmanager.h" DECOMP_SIZE_ASSERT(Act3, 0x4274) DECOMP_SIZE_ASSERT(Act3State, 0x0c) DECOMP_SIZE_ASSERT(Act3ListElement, 0x0c) DECOMP_SIZE_ASSERT(Act3List, 0x10) +// GLOBAL: LEGO1 0x100d95e8 +Act3Script::Script g_unk0x100d95e8[] = + {Act3Script::c_tlp053in_RunAnim, Act3Script::c_tlp064la_RunAnim, Act3Script::c_tlp068in_RunAnim}; + // FUNCTION: LEGO1 0x10072270 // FUNCTION: BETA10 0x10015470 Act3::Act3() { - m_unk0xf8 = 0; + m_state = NULL; m_unk0x41fc = 0; - m_unk0x4200 = 0; - m_unk0x4204 = 0; - m_unk0x4208 = 0; - m_helicopter = NULL; - m_unk0x4210 = 0; + m_cop1 = NULL; + m_cop2 = NULL; + m_brickster = NULL; + m_copter = NULL; + m_shark = NULL; m_unk0x4214 = -1; m_unk0x421e = 0; @@ -37,10 +53,13 @@ MxBool Act3::VTable0x5c() return TRUE; } -// STUB: LEGO1 0x100726a0 +// FUNCTION: LEGO1 0x100726a0 +// FUNCTION: BETA10 0x100155da Act3::~Act3() { - // TODO + Destroy(TRUE); + NotificationManager()->Unregister(this); + TickleManager()->UnregisterClient(this); } // STUB: LEGO1 0x100727e0 @@ -55,47 +74,134 @@ MxBool Act3::FUN_10072980(LegoPathController*, Mx3DPointFloat& p_loc, Mx3DPointF return FALSE; } -// STUB: LEGO1 0x10072c30 +// FUNCTION: LEGO1 0x10072c30 +// FUNCTION: BETA10 0x100160fb MxResult Act3::Create(MxDSAction& p_dsAction) { - // TODO - return SUCCESS; + GameState()->FindLoadedAct(); + + MxResult result = LegoWorld::Create(p_dsAction); + if (result == SUCCESS) { + ControlManager()->Register(this); + InputManager()->SetWorld(this); + InputManager()->Register(this); + + switch (GameState()->GetLoadedAct()) { + case LegoGameState::e_act2: + GameState()->StopArea(LegoGameState::e_infomain); + GameState()->StopArea(LegoGameState::e_act2main); + break; + case LegoGameState::e_act3: + GameState()->StopArea(LegoGameState::e_infomain); + GameState()->StopArea(LegoGameState::e_act3script); + break; + case LegoGameState::e_act1: + case LegoGameState::e_actNotFound: + GameState()->StopArea(LegoGameState::e_undefined); + if (GameState()->GetPreviousArea() == LegoGameState::e_infomain) { + GameState()->StopArea(LegoGameState::e_isle); + } + } + + LegoGameState* gameState = GameState(); + Act3State* state = (Act3State*) gameState->GetState("Act3State"); + + if (state == NULL) { + state = (Act3State*) gameState->CreateState("Act3State"); + } + + m_state = state; + assert(m_state); + + GameState()->m_currentArea = LegoGameState::e_act3script; + GameState()->SetCurrentAct(LegoGameState::e_act3); + GameState()->SetDirty(TRUE); + } + + return result; } -// STUB: LEGO1 0x10072d50 +// FUNCTION: LEGO1 0x10072d50 +// FUNCTION: BETA10 0x1001627f void Act3::Destroy(MxBool p_fromDestructor) { - // TODO + NavController()->Reset(); + ControlManager()->Unregister(this); + + if (InputManager()->GetWorld() == this) { + InputManager()->ClearWorld(); + } + + InputManager()->UnRegister(this); + + if (UserActor() != NULL) { + if ((IslePathActor*) UserActor() == m_copter) { + ((IslePathActor*) UserActor())->Exit(); + } + + Remove(UserActor()); + } + + if (!p_fromDestructor) { + LegoWorld::Destroy(FALSE); + } } // STUB: LEGO1 0x10072de0 +// STUB: BETA10 0x10016322 MxLong Act3::Notify(MxParam& p_param) { // TODO return 0; } -// STUB: LEGO1 0x10073270 +// FUNCTION: LEGO1 0x10073270 void Act3::ReadyWorld() { - // TODO + PlantManager()->FUN_10027200(); + BuildingManager()->FUN_10030800(); + AnimationManager()->FUN_1005f6d0(FALSE); + VideoManager()->Get3DManager()->SetFrustrum(90.0f, 0.1f, 125.0f); + + m_unk0x426c = g_unk0x100d95e8[rand() % 3]; + AnimationManager()->FUN_10060dc0(m_unk0x426c, NULL, TRUE, FALSE, NULL, TRUE, FALSE, FALSE, FALSE); + + m_state->m_unk0x08 = 1; } -// STUB: LEGO1 0x10073300 +// FUNCTION: LEGO1 0x10073300 MxResult Act3::Tickle() { - // TODO + if (!m_worldStarted) { + LegoWorld::Tickle(); + return SUCCESS; + } + + if (m_unk0x426c != (Act3Script::Script) 0) { + if (AnimationManager()->FUN_10064ee0(m_unk0x426c)) { + FUN_10015820(FALSE, LegoOmni::c_disableInput | LegoOmni::c_disable3d | LegoOmni::c_clearScreen); + TickleManager()->UnregisterClient(this); + m_unk0x426c = (Act3Script::Script) 0; + } + } + return SUCCESS; } -// STUB: LEGO1 0x10073400 +// FUNCTION: LEGO1 0x10073400 void Act3::FUN_10073400() { + m_state->m_unk0x08 = 2; + m_destLocation = LegoGameState::e_infomain; + TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE); } -// STUB: LEGO1 0x10073430 +// FUNCTION: LEGO1 0x10073430 void Act3::FUN_10073430() { + m_state->m_unk0x08 = 3; + m_destLocation = LegoGameState::e_infomain; + TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE); } // STUB: LEGO1 0x10073a90 @@ -104,15 +210,18 @@ void Act3::Enable(MxBool p_enable) // TODO } -// STUB: LEGO1 0x10073e40 +// FUNCTION: LEGO1 0x10073e40 void Act3::VTable0x60() { - // TODO + // empty } -// STUB: LEGO1 0x10073e50 +// FUNCTION: LEGO1 0x10073e50 MxBool Act3::Escape() { - // TODO - return FALSE; + BackgroundAudioManager()->Stop(); + AnimationManager()->FUN_10061010(FALSE); + DeleteObjects(&m_atomId, Act3Script::c_tlp053in_RunAnim, 999); + m_destLocation = LegoGameState::e_infomain; + return TRUE; }