From e4e0f4e4d3c3858300370bb5e3e4422d62ac57c1 Mon Sep 17 00:00:00 2001 From: Christian Semmler Date: Sun, 16 Jun 2024 10:47:53 -0400 Subject: [PATCH] Implement/match Motocycle, consistent notification names (#1037) * Implement/match Motocycle, consistent notification names * Format * Fix * Fix return types * Fix return type * Fix annotations * Rename function --- LEGO1/lego/legoomni/include/ambulance.h | 18 +- LEGO1/lego/legoomni/include/bike.h | 8 +- LEGO1/lego/legoomni/include/carrace.h | 14 +- LEGO1/lego/legoomni/include/dunebuggy.h | 12 +- LEGO1/lego/legoomni/include/elevatorbottom.h | 4 +- LEGO1/lego/legoomni/include/gasstation.h | 14 +- LEGO1/lego/legoomni/include/helicopter.h | 14 +- LEGO1/lego/legoomni/include/hospital.h | 6 +- LEGO1/lego/legoomni/include/infocenter.h | 4 +- LEGO1/lego/legoomni/include/infocenterdoor.h | 4 +- LEGO1/lego/legoomni/include/isle.h | 6 +- LEGO1/lego/legoomni/include/isleactor.h | 16 +- LEGO1/lego/legoomni/include/islepathactor.h | 8 +- LEGO1/lego/legoomni/include/jetski.h | 12 +- LEGO1/lego/legoomni/include/jetskirace.h | 12 +- LEGO1/lego/legoomni/include/jukebox.h | 4 +- .../legoomni/include/legocontrolmanager.h | 22 +-- LEGO1/lego/legoomni/include/legopathstruct.h | 11 +- LEGO1/lego/legoomni/include/legorace.h | 12 +- LEGO1/lego/legoomni/include/legovariables.h | 2 + .../include/{motocycle.h => motorcycle.h} | 26 +-- .../legoomni/include/mxcontrolpresenter.h | 4 +- LEGO1/lego/legoomni/include/pizza.h | 6 +- LEGO1/lego/legoomni/include/pizzeria.h | 2 +- LEGO1/lego/legoomni/include/police.h | 4 +- LEGO1/lego/legoomni/include/radio.h | 4 +- .../lego/legoomni/include/registrationbook.h | 4 +- LEGO1/lego/legoomni/include/score.h | 4 +- LEGO1/lego/legoomni/include/skateboard.h | 10 +- LEGO1/lego/legoomni/include/towtrack.h | 16 +- LEGO1/lego/legoomni/src/actors/ambulance.cpp | 12 +- LEGO1/lego/legoomni/src/actors/bike.cpp | 2 +- LEGO1/lego/legoomni/src/actors/dunebuggy.cpp | 4 +- LEGO1/lego/legoomni/src/actors/helicopter.cpp | 2 +- LEGO1/lego/legoomni/src/actors/isleactor.cpp | 8 +- .../legoomni/src/actors/islepathactor.cpp | 4 +- LEGO1/lego/legoomni/src/actors/jetski.cpp | 2 +- LEGO1/lego/legoomni/src/actors/motorcycle.cpp | 165 ++++++++++++++---- LEGO1/lego/legoomni/src/actors/pizza.cpp | 6 +- LEGO1/lego/legoomni/src/actors/pizzeria.cpp | 2 +- LEGO1/lego/legoomni/src/actors/radio.cpp | 4 +- LEGO1/lego/legoomni/src/actors/skateboard.cpp | 2 +- LEGO1/lego/legoomni/src/actors/towtrack.cpp | 4 +- .../legoomni/src/common/legoobjectfactory.cpp | 2 +- LEGO1/lego/legoomni/src/common/legoutils.cpp | 2 +- .../legoomni/src/common/legovariables.cpp | 8 + .../src/common/mxcontrolpresenter.cpp | 22 +-- .../src/control/legocontrolmanager.cpp | 2 +- .../legoomni/src/paths/legopathstruct.cpp | 6 +- LEGO1/lego/legoomni/src/race/carrace.cpp | 2 +- LEGO1/lego/legoomni/src/race/jetskirace.cpp | 2 +- LEGO1/lego/legoomni/src/race/legorace.cpp | 4 +- .../legoomni/src/worlds/elevatorbottom.cpp | 4 +- LEGO1/lego/legoomni/src/worlds/gasstation.cpp | 8 +- LEGO1/lego/legoomni/src/worlds/hospital.cpp | 8 +- LEGO1/lego/legoomni/src/worlds/infocenter.cpp | 4 +- .../legoomni/src/worlds/infocenterdoor.cpp | 4 +- LEGO1/lego/legoomni/src/worlds/isle.cpp | 12 +- LEGO1/lego/legoomni/src/worlds/jukebox.cpp | 4 +- LEGO1/lego/legoomni/src/worlds/police.cpp | 4 +- .../legoomni/src/worlds/registrationbook.cpp | 4 +- LEGO1/lego/legoomni/src/worlds/score.cpp | 4 +- 62 files changed, 362 insertions(+), 244 deletions(-) rename LEGO1/lego/legoomni/include/{motocycle.h => motorcycle.h} (57%) diff --git a/LEGO1/lego/legoomni/include/ambulance.h b/LEGO1/lego/legoomni/include/ambulance.h index 79091329..e2b1ecf4 100644 --- a/LEGO1/lego/legoomni/include/ambulance.h +++ b/LEGO1/lego/legoomni/include/ambulance.h @@ -122,15 +122,15 @@ class Ambulance : public IslePathActor { return !strcmp(p_name, Ambulance::ClassName()) || IslePathActor::IsA(p_name); } - MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 - void Destroy(MxBool p_fromDestructor) override; // vtable+0x1c - void VTable0x70(float p_time) override; // vtable+0x70 - MxLong HandleClick() override; // vtable+0xcc - MxLong HandleControl(LegoControlManagerEvent& p_param) override; // vtable+0xd4 - MxLong HandlePathStruct(LegoPathStructEvent& p_param) override; // vtable+0xdc - void Exit() override; // vtable+0xe4 - virtual MxLong HandleButtonDown(LegoControlManagerEvent& p_param); // vtable+0xf0 - virtual MxLong HandleEndAction(MxEndActionNotificationParam& p_param); // vtable+0xf4 + MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 + void Destroy(MxBool p_fromDestructor) override; // vtable+0x1c + void VTable0x70(float p_time) override; // vtable+0x70 + MxLong HandleClick() override; // vtable+0xcc + MxLong HandleControl(LegoControlManagerNotificationParam& p_param) override; // vtable+0xd4 + MxLong HandlePathStruct(LegoPathStructNotificationParam& p_param) override; // vtable+0xdc + void Exit() override; // vtable+0xe4 + virtual MxLong HandleButtonDown(LegoControlManagerNotificationParam& p_param); // vtable+0xf0 + virtual MxLong HandleEndAction(MxEndActionNotificationParam& p_param); // vtable+0xf4 void CreateState(); void FUN_10036e60(); diff --git a/LEGO1/lego/legoomni/include/bike.h b/LEGO1/lego/legoomni/include/bike.h index ea12ff1d..266e34f4 100644 --- a/LEGO1/lego/legoomni/include/bike.h +++ b/LEGO1/lego/legoomni/include/bike.h @@ -23,10 +23,10 @@ class Bike : public IslePathActor { return !strcmp(p_name, Bike::ClassName()) || IslePathActor::IsA(p_name); } - MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 - MxLong HandleClick() override; // vtable+0xcc - MxLong HandleControl(LegoControlManagerEvent& p_param) override; // vtable+0xd4 - void Exit() override; // vtable+0xe4 + MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 + MxLong HandleClick() override; // vtable+0xcc + MxLong HandleControl(LegoControlManagerNotificationParam& p_param) override; // vtable+0xd4 + void Exit() override; // vtable+0xe4 void ActivateSceneActions(); diff --git a/LEGO1/lego/legoomni/include/carrace.h b/LEGO1/lego/legoomni/include/carrace.h index 2c67e11a..652bf3b0 100644 --- a/LEGO1/lego/legoomni/include/carrace.h +++ b/LEGO1/lego/legoomni/include/carrace.h @@ -44,13 +44,13 @@ class CarRace : public LegoRace { return !strcmp(p_name, CarRace::ClassName()) || LegoRace::IsA(p_name); } - MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 - void ReadyWorld() override; // vtable+0x50 - MxBool Escape() override; // vtable+0x64 - MxLong HandleClick(LegoEventNotificationParam&) override; // vtable+0x6c - MxLong HandlePathStruct(LegoPathStructEvent&) override; // vtable+0x70 - MxLong HandleEndAction(MxEndActionNotificationParam&) override; // vtable+0x74 - MxLong HandleType0Notification(MxNotificationParam&) override; // vtable+0x78 + MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 + void ReadyWorld() override; // vtable+0x50 + MxBool Escape() override; // vtable+0x64 + MxLong HandleClick(LegoEventNotificationParam&) override; // vtable+0x6c + MxLong HandlePathStruct(LegoPathStructNotificationParam&) override; // vtable+0x70 + MxLong HandleEndAction(MxEndActionNotificationParam&) override; // vtable+0x74 + MxLong HandleType0Notification(MxNotificationParam&) override; // vtable+0x78 // SYNTHETIC: LEGO1 0x10016c70 // CarRace::`scalar deleting destructor' diff --git a/LEGO1/lego/legoomni/include/dunebuggy.h b/LEGO1/lego/legoomni/include/dunebuggy.h index 1fe1d00e..b103869b 100644 --- a/LEGO1/lego/legoomni/include/dunebuggy.h +++ b/LEGO1/lego/legoomni/include/dunebuggy.h @@ -23,12 +23,12 @@ class DuneBuggy : public IslePathActor { return !strcmp(p_name, DuneBuggy::ClassName()) || IslePathActor::IsA(p_name); } - MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 - void VTable0x70(float p_float) override; // vtable+0x70 - MxLong HandleClick() override; // vtable+0xcc - MxLong HandleControl(LegoControlManagerEvent& p_param) override; // vtable+0xd4 - MxLong HandlePathStruct(LegoPathStructEvent& p_param) override; // vtable+0xdc - void Exit() override; // vtable+0xe4 + MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 + void VTable0x70(float p_float) override; // vtable+0x70 + MxLong HandleClick() override; // vtable+0xcc + MxLong HandleControl(LegoControlManagerNotificationParam& p_param) override; // vtable+0xd4 + MxLong HandlePathStruct(LegoPathStructNotificationParam& p_param) override; // vtable+0xdc + void Exit() override; // vtable+0xe4 void FUN_10068350(); diff --git a/LEGO1/lego/legoomni/include/elevatorbottom.h b/LEGO1/lego/legoomni/include/elevatorbottom.h index 7c94aff2..3e7c831e 100644 --- a/LEGO1/lego/legoomni/include/elevatorbottom.h +++ b/LEGO1/lego/legoomni/include/elevatorbottom.h @@ -5,7 +5,7 @@ #include "legogamestate.h" #include "legoworld.h" -class LegoControlManagerEvent; +class LegoControlManagerNotificationParam; // VTABLE: LEGO1 0x100d5f20 // SIZE 0xfc @@ -44,7 +44,7 @@ class ElevatorBottom : public LegoWorld { private: LegoGameState::Area m_destLocation; // 0xf8 - MxLong HandleControl(LegoControlManagerEvent& p_param); + MxLong HandleControl(LegoControlManagerNotificationParam& p_param); }; #endif // ELEVATORBOTTOM_H diff --git a/LEGO1/lego/legoomni/include/gasstation.h b/LEGO1/lego/legoomni/include/gasstation.h index 75234a25..af224e79 100644 --- a/LEGO1/lego/legoomni/include/gasstation.h +++ b/LEGO1/lego/legoomni/include/gasstation.h @@ -75,12 +75,12 @@ class GasStation : public LegoWorld { return !strcmp(p_name, GasStation::ClassName()) || LegoWorld::IsA(p_name); } - MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 - void ReadyWorld() override; // vtable+0x50 - MxBool VTable0x5c() override; // vtable+0x5c - MxBool Escape() override; // vtable+0x64 - void Enable(MxBool p_enable) override; // vtable+0x68 - virtual MxLong HandleControl(LegoControlManagerEvent& p_param); // vtable+0x6c + MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 + void ReadyWorld() override; // vtable+0x50 + MxBool VTable0x5c() override; // vtable+0x5c + MxBool Escape() override; // vtable+0x64 + void Enable(MxBool p_enable) override; // vtable+0x68 + virtual MxLong HandleControl(LegoControlManagerNotificationParam& p_param); // vtable+0x6c inline void PlayAction(MxU32 p_objectId); @@ -90,7 +90,7 @@ class GasStation : public LegoWorld { private: MxLong HandleEndAction(MxEndActionNotificationParam& p_param); MxLong HandleKeyPress(MxS8 p_key); - MxLong HandleButtonDown(LegoControlManagerEvent& p_param); + MxLong HandleButtonDown(LegoControlManagerNotificationParam& p_param); MxS16 m_currentActorId; // 0xf8 undefined2 m_unk0xfa; // 0xfa diff --git a/LEGO1/lego/legoomni/include/helicopter.h b/LEGO1/lego/legoomni/include/helicopter.h index 7e63407d..2c6cf17e 100644 --- a/LEGO1/lego/legoomni/include/helicopter.h +++ b/LEGO1/lego/legoomni/include/helicopter.h @@ -65,13 +65,13 @@ class Helicopter : public IslePathActor { return !strcmp(p_name, Helicopter::ClassName()) || IslePathActor::IsA(p_name); } - MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 - void VTable0x70(float p_float) override; // vtable+0x70 - void VTable0x74(Matrix4& p_transform) override; // vtable+0x74 - MxLong HandleClick() override; // vtable+0xcc - MxLong HandleControl(LegoControlManagerEvent& p_param) override; // vtable+0xd4 - MxLong HandleEndAnim(LegoEndAnimNotificationParam& p_param) override; // vtable+0xd8 - void Exit() override; // vtable+0xe4 + MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 + void VTable0x70(float p_float) override; // vtable+0x70 + void VTable0x74(Matrix4& p_transform) override; // vtable+0x74 + MxLong HandleClick() override; // vtable+0xcc + MxLong HandleControl(LegoControlManagerNotificationParam& p_param) override; // vtable+0xd4 + MxLong HandleEndAnim(LegoEndAnimNotificationParam& p_param) override; // vtable+0xd8 + void Exit() override; // vtable+0xe4 // SYNTHETIC: LEGO1 0x10003210 // Helicopter::`scalar deleting destructor' diff --git a/LEGO1/lego/legoomni/include/hospital.h b/LEGO1/lego/legoomni/include/hospital.h index 4c453240..c378ba3e 100644 --- a/LEGO1/lego/legoomni/include/hospital.h +++ b/LEGO1/lego/legoomni/include/hospital.h @@ -7,7 +7,7 @@ #include "legostate.h" #include "legoworld.h" -class LegoControlManagerEvent; +class LegoControlManagerNotificationParam; class MxEndActionNotificationParam; class MxStillPresenter; @@ -89,8 +89,8 @@ class Hospital : public LegoWorld { private: MxLong HandleKeyPress(MxS8 p_key); MxLong HandleEndAction(MxEndActionNotificationParam& p_param); - MxLong HandleButtonDown(LegoControlManagerEvent& p_param); - MxBool HandleControl(LegoControlManagerEvent& p_param); + MxLong HandleButtonDown(LegoControlManagerNotificationParam& p_param); + MxBool HandleControl(LegoControlManagerNotificationParam& p_param); MxS16 m_currentActorId; // 0xf8 LegoGameState::Area m_destLocation; // 0xfc diff --git a/LEGO1/lego/legoomni/include/infocenter.h b/LEGO1/lego/legoomni/include/infocenter.h index 7d805246..5838b50c 100644 --- a/LEGO1/lego/legoomni/include/infocenter.h +++ b/LEGO1/lego/legoomni/include/infocenter.h @@ -10,7 +10,7 @@ class MxNotificationParam; class MxStillPresenter; -class LegoControlManagerEvent; +class LegoControlManagerNotificationParam; // VTABLE: LEGO1 0x100d93a8 // SIZE 0x94 @@ -129,7 +129,7 @@ class Infocenter : public LegoWorld { MxLong HandleKeyPress(MxS8 p_key); MxU8 HandleMouseMove(MxS32 p_x, MxS32 p_y); MxU8 HandleButtonUp(MxS32 p_x, MxS32 p_y); - MxU8 HandleControl(LegoControlManagerEvent& p_param); + MxU8 HandleControl(LegoControlManagerNotificationParam& p_param); MxLong HandleEndAction(MxEndActionNotificationParam& p_param); MxLong HandleNotification0(MxNotificationParam& p_param); diff --git a/LEGO1/lego/legoomni/include/infocenterdoor.h b/LEGO1/lego/legoomni/include/infocenterdoor.h index 6d012b4c..0962d5eb 100644 --- a/LEGO1/lego/legoomni/include/infocenterdoor.h +++ b/LEGO1/lego/legoomni/include/infocenterdoor.h @@ -4,7 +4,7 @@ #include "legogamestate.h" #include "legoworld.h" -class LegoControlManagerEvent; +class LegoControlManagerNotificationParam; // VTABLE: LEGO1 0x100d72d8 // SIZE 0xfc @@ -43,7 +43,7 @@ class InfocenterDoor : public LegoWorld { private: LegoGameState::Area m_destLocation; // 0xf8 - MxLong HandleControl(LegoControlManagerEvent& p_param); + MxLong HandleControl(LegoControlManagerNotificationParam& p_param); }; #endif // INFOCENTERDOOR_H diff --git a/LEGO1/lego/legoomni/include/isle.h b/LEGO1/lego/legoomni/include/isle.h index d1faaa16..34a28a85 100644 --- a/LEGO1/lego/legoomni/include/isle.h +++ b/LEGO1/lego/legoomni/include/isle.h @@ -15,7 +15,7 @@ class Jetski; class JukeBoxEntity; class LegoNamedTexture; class Motocycle; -class LegoPathStructEvent; +class LegoPathStructNotificationParam; class Pizza; class Pizzeria; class RaceCar; @@ -198,8 +198,8 @@ class Isle : public LegoWorld { protected: MxLong HandleEndAction(MxEndActionNotificationParam& p_param); - MxLong HandleControl(LegoControlManagerEvent& p_param); - MxLong HandlePathStruct(LegoPathStructEvent& p_param); + MxLong HandleControl(LegoControlManagerNotificationParam& p_param); + MxLong HandlePathStruct(LegoPathStructNotificationParam& p_param); MxLong HandleTransitionEnd(); void HandleElevatorEndAction(); void UpdateGlobe(); diff --git a/LEGO1/lego/legoomni/include/isleactor.h b/LEGO1/lego/legoomni/include/isleactor.h index 388db2c2..17c95c25 100644 --- a/LEGO1/lego/legoomni/include/isleactor.h +++ b/LEGO1/lego/legoomni/include/isleactor.h @@ -3,6 +3,8 @@ #include "legoactor.h" +class LegoControlManagerNotificationParam; +class LegoPathStructNotificationParam; class LegoWorld; class MxEndActionNotificationParam; class MxNotificationParam; @@ -29,25 +31,25 @@ class IsleActor : public LegoActor { MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 // FUNCTION: LEGO1 0x1000e5f0 - virtual undefined4 HandleClick() { return 0; } // vtable+0x68 + virtual MxLong HandleClick() { return 0; } // vtable+0x68 // FUNCTION: LEGO1 0x1000e600 - virtual undefined4 VTable0x6c() { return 0; } // vtable+0x6c + virtual MxLong VTable0x6c() { return 0; } // vtable+0x6c // FUNCTION: LEGO1 0x1000e610 - virtual undefined4 VTable0x70() { return 0; } // vtable+0x70 + virtual MxLong HandleEndAnim() { return 0; } // vtable+0x70 // FUNCTION: LEGO1 0x1000e620 - virtual undefined4 HandleEndAction(MxEndActionNotificationParam&) { return 0; } // vtable+0x74 + virtual MxLong HandleEndAction(MxEndActionNotificationParam&) { return 0; } // vtable+0x74 // FUNCTION: LEGO1 0x1000e630 - virtual undefined4 HandleButtonDown(MxNotificationParam&) { return 0; } // vtable+0x78 + virtual MxLong HandleButtonDown(LegoControlManagerNotificationParam&) { return 0; } // vtable+0x78 // FUNCTION: LEGO1 0x1000e640 - virtual undefined4 HandleButtonUp(MxNotificationParam&) { return 0; } // vtable+0x7c + virtual MxLong HandleButtonUp(LegoControlManagerNotificationParam&) { return 0; } // vtable+0x7c // FUNCTION: LEGO1 0x1000e650 - virtual undefined4 VTable0x80(MxParam&) { return 0; } // vtable+0x80 + virtual MxLong HandlePathStruct(LegoPathStructNotificationParam&) { return 0; } // vtable+0x80 protected: LegoWorld* m_world; // 0x78 diff --git a/LEGO1/lego/legoomni/include/islepathactor.h b/LEGO1/lego/legoomni/include/islepathactor.h index 37b750d3..48948738 100644 --- a/LEGO1/lego/legoomni/include/islepathactor.h +++ b/LEGO1/lego/legoomni/include/islepathactor.h @@ -6,10 +6,10 @@ #include "mxtypes.h" #include "roi/legoroi.h" -class LegoControlManagerEvent; +class LegoControlManagerNotificationParam; class LegoEndAnimNotificationParam; class LegoWorld; -class LegoPathStructEvent; +class LegoPathStructNotificationParam; // VTABLE: LEGO1 0x100d4398 // SIZE 0x160 @@ -113,13 +113,13 @@ class IslePathActor : public LegoPathActor { virtual MxLong HandleNotification0() { return 0; } // vtable+0xd0 // FUNCTION: LEGO1 0x10002e80 - virtual MxLong HandleControl(LegoControlManagerEvent&) { return 0; } // vtable+0xd4 + virtual MxLong HandleControl(LegoControlManagerNotificationParam&) { return 0; } // vtable+0xd4 // FUNCTION: LEGO1 0x10002e90 virtual MxLong HandleEndAnim(LegoEndAnimNotificationParam&) { return 0; } // vtable+0xd8 // FUNCTION: LEGO1 0x10002e00 - virtual MxLong HandlePathStruct(LegoPathStructEvent&) { return 0; } // vtable+0xdc + virtual MxLong HandlePathStruct(LegoPathStructNotificationParam&) { return 0; } // vtable+0xdc virtual void Enter(); // vtable+0xe0 virtual void Exit(); // vtable+0xe4 diff --git a/LEGO1/lego/legoomni/include/jetski.h b/LEGO1/lego/legoomni/include/jetski.h index b49b11fe..4eb46096 100644 --- a/LEGO1/lego/legoomni/include/jetski.h +++ b/LEGO1/lego/legoomni/include/jetski.h @@ -4,7 +4,7 @@ #include "decomp.h" #include "islepathactor.h" -class LegoControlManagerEvent; +class LegoControlManagerNotificationParam; // VTABLE: LEGO1 0x100d9ec8 // SIZE 0x164 @@ -25,11 +25,11 @@ class Jetski : public IslePathActor { return !strcmp(p_name, Jetski::ClassName()) || IslePathActor::IsA(p_name); } - MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 - void VTable0x70(float p_float) override; // vtable+0x70 - MxLong HandleClick() override; // vtable+0xcc - MxLong HandleControl(LegoControlManagerEvent&) override; // vtable+0xd4 - void Exit() override; // vtable+0xe4 + MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 + void VTable0x70(float p_float) override; // vtable+0x70 + MxLong HandleClick() override; // vtable+0xcc + MxLong HandleControl(LegoControlManagerNotificationParam&) override; // vtable+0xd4 + void Exit() override; // vtable+0xe4 void FUN_1007e990(); diff --git a/LEGO1/lego/legoomni/include/jetskirace.h b/LEGO1/lego/legoomni/include/jetskirace.h index 0d45fc4f..5a895faf 100644 --- a/LEGO1/lego/legoomni/include/jetskirace.h +++ b/LEGO1/lego/legoomni/include/jetskirace.h @@ -48,12 +48,12 @@ class JetskiRace : public LegoRace { return !strcmp(p_name, JetskiRace::ClassName()) || LegoRace::IsA(p_name); } - MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 - void ReadyWorld() override; // vtable+0x50 - MxBool Escape() override; // vtable+0x64 - MxLong HandleClick(LegoEventNotificationParam&) override; // vtable+0x6c - MxLong HandlePathStruct(LegoPathStructEvent&) override; // vtable+0x70 - MxLong HandleEndAction(MxEndActionNotificationParam&) override; // vtable+0x74 + MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 + void ReadyWorld() override; // vtable+0x50 + MxBool Escape() override; // vtable+0x64 + MxLong HandleClick(LegoEventNotificationParam&) override; // vtable+0x6c + MxLong HandlePathStruct(LegoPathStructNotificationParam&) override; // vtable+0x70 + MxLong HandleEndAction(MxEndActionNotificationParam&) override; // vtable+0x74 }; // SYNTHETIC: LEGO1 0x1000f530 diff --git a/LEGO1/lego/legoomni/include/jukebox.h b/LEGO1/lego/legoomni/include/jukebox.h index 5ae7ba34..8f01a120 100644 --- a/LEGO1/lego/legoomni/include/jukebox.h +++ b/LEGO1/lego/legoomni/include/jukebox.h @@ -6,7 +6,7 @@ #include "legostate.h" #include "legoworld.h" -class LegoControlManagerEvent; +class LegoControlManagerNotificationParam; // VTABLE: LEGO1 0x100d4a90 // SIZE 0x10 @@ -79,7 +79,7 @@ class JukeBox : public LegoWorld { // JukeBox::`scalar deleting destructor' private: - MxBool HandleControl(LegoControlManagerEvent& p_param); + MxBool HandleControl(LegoControlManagerNotificationParam& p_param); LegoGameState::Area m_destLocation; // 0xf8 JukeBoxState* m_state; // 0xfc diff --git a/LEGO1/lego/legoomni/include/legocontrolmanager.h b/LEGO1/lego/legoomni/include/legocontrolmanager.h index 22cd2c58..8cbb8342 100644 --- a/LEGO1/lego/legoomni/include/legocontrolmanager.h +++ b/LEGO1/lego/legoomni/include/legocontrolmanager.h @@ -10,9 +10,9 @@ class MxControlPresenter; // VTABLE: LEGO1 0x100d6a98 // SIZE 0x2c -class LegoControlManagerEvent : public LegoEventNotificationParam { +class LegoControlManagerNotificationParam : public LegoEventNotificationParam { public: - inline LegoControlManagerEvent() : LegoEventNotificationParam() + inline LegoControlManagerNotificationParam() : LegoEventNotificationParam() { m_clickedObjectId = -1; m_clickedAtom = NULL; @@ -34,10 +34,10 @@ class LegoControlManagerEvent : public LegoEventNotificationParam { }; // SYNTHETIC: LEGO1 0x10028bf0 -// LegoControlManagerEvent::`scalar deleting destructor' +// LegoControlManagerNotificationParam::`scalar deleting destructor' // SYNTHETIC: LEGO1 0x10028c60 -// LegoControlManagerEvent::~LegoControlManagerEvent +// LegoControlManagerNotificationParam::~LegoControlManagerNotificationParam // VTABLE: LEGO1 0x100d6a80 class LegoControlManager : public MxCore { @@ -84,13 +84,13 @@ class LegoControlManager : public MxCore { // LegoControlManager::`scalar deleting destructor' private: - undefined4 m_unk0x08; // 0x08 - undefined4 m_unk0x0c; // 0x0c - MxBool m_unk0x10; // 0x10 - MxPresenter* m_unk0x14; // 0x14 - LegoControlManagerEvent m_event; // 0x18 - MxPresenterList* m_presenterList; // 0x44 - LegoNotifyList m_notifyList; // 0x48 + undefined4 m_unk0x08; // 0x08 + undefined4 m_unk0x0c; // 0x0c + MxBool m_unk0x10; // 0x10 + MxPresenter* m_unk0x14; // 0x14 + LegoControlManagerNotificationParam m_event; // 0x18 + MxPresenterList* m_presenterList; // 0x44 + LegoNotifyList m_notifyList; // 0x48 }; #endif // LEGOCONTROLMANAGER_H diff --git a/LEGO1/lego/legoomni/include/legopathstruct.h b/LEGO1/lego/legoomni/include/legopathstruct.h index 35307529..a53bc4af 100644 --- a/LEGO1/lego/legoomni/include/legopathstruct.h +++ b/LEGO1/lego/legoomni/include/legopathstruct.h @@ -11,9 +11,10 @@ class LegoWorld; // VTABLE: LEGO1 0x100d6230 // SIZE 0x10 -class LegoPathStructEvent : public MxNotificationParam { +class LegoPathStructNotificationParam : public MxNotificationParam { public: - LegoPathStructEvent(NotificationId p_type, MxCore* p_sender, MxU8 p_trigger, MxS16 p_data) : MxNotificationParam() + LegoPathStructNotificationParam(NotificationId p_type, MxCore* p_sender, MxU8 p_trigger, MxS16 p_data) + : MxNotificationParam() { m_type = p_type; m_sender = p_sender; @@ -24,7 +25,7 @@ class LegoPathStructEvent : public MxNotificationParam { // FUNCTION: LEGO1 0x1001bac0 MxNotificationParam* Clone() const override { - return new LegoPathStructEvent(m_type, m_sender, m_trigger, m_data); + return new LegoPathStructNotificationParam(m_type, m_sender, m_trigger, m_data); } // vtable+0x04 inline MxU8 GetTrigger() { return m_trigger; } @@ -99,10 +100,10 @@ class LegoPathStruct : public LegoPathStructBase { }; // SYNTHETIC: LEGO1 0x1001bb80 -// LegoPathStructEvent::`scalar deleting destructor' +// LegoPathStructNotificationParam::`scalar deleting destructor' // SYNTHETIC: LEGO1 0x1001bbf0 -// LegoPathStructEvent::~LegoPathStructEvent +// LegoPathStructNotificationParam::~LegoPathStructNotificationParam // SYNTHETIC: LEGO1 0x10047440 // LegoPathStructBase::`scalar deleting destructor' diff --git a/LEGO1/lego/legoomni/include/legorace.h b/LEGO1/lego/legoomni/include/legorace.h index 84d3689a..388fa26a 100644 --- a/LEGO1/lego/legoomni/include/legorace.h +++ b/LEGO1/lego/legoomni/include/legorace.h @@ -13,7 +13,7 @@ class LegoEventNotificationParam; class LegoPathActor; class MxEndActionNotificationParam; class MxNotificationParam; -class LegoPathStructEvent; +class LegoPathStructNotificationParam; // VTABLE: LEGO1 0x100d5e30 // SIZE 0x2c @@ -114,11 +114,11 @@ class LegoRace : public LegoWorld { // FUNCTION: LEGO1 0x1000dae0 MxBool VTable0x5c() override { return TRUE; } // vtable+0x5c - MxBool Escape() override; // vtable+0x64 - void Enable(MxBool p_enable) override; // vtable+0x68 - virtual MxLong HandleClick(LegoEventNotificationParam&) = 0; // vtable+0x6c - virtual MxLong HandlePathStruct(LegoPathStructEvent&); // vtable+0x70 - virtual MxLong HandleEndAction(MxEndActionNotificationParam&); // vtable+0x74 + MxBool Escape() override; // vtable+0x64 + void Enable(MxBool p_enable) override; // vtable+0x68 + virtual MxLong HandleClick(LegoEventNotificationParam&) = 0; // vtable+0x6c + virtual MxLong HandlePathStruct(LegoPathStructNotificationParam&); // vtable+0x70 + virtual MxLong HandleEndAction(MxEndActionNotificationParam&); // vtable+0x74 // FUNCTION: LEGO1 0x1000dab0 virtual MxLong HandleType0Notification(MxNotificationParam&) { return 0; } // vtable+0x78 diff --git a/LEGO1/lego/legoomni/include/legovariables.h b/LEGO1/lego/legoomni/include/legovariables.h index 582c5b58..a40289a0 100644 --- a/LEGO1/lego/legoomni/include/legovariables.h +++ b/LEGO1/lego/legoomni/include/legovariables.h @@ -3,6 +3,8 @@ #include "mxvariable.h" +extern const char* g_varMOTOSPEED; +extern const char* g_varMOTOFUEL; extern const char* g_varAMBULSPEED; extern const char* g_varAMBULFUEL; extern const char* g_varTOWFUEL; diff --git a/LEGO1/lego/legoomni/include/motocycle.h b/LEGO1/lego/legoomni/include/motorcycle.h similarity index 57% rename from LEGO1/lego/legoomni/include/motocycle.h rename to LEGO1/lego/legoomni/include/motorcycle.h index 3e94fce0..3fcb51fe 100644 --- a/LEGO1/lego/legoomni/include/motocycle.h +++ b/LEGO1/lego/legoomni/include/motorcycle.h @@ -1,5 +1,5 @@ -#ifndef MOTOCYCLE_H -#define MOTOCYCLE_H +#ifndef MOTORCYCLE_H +#define MOTORCYCLE_H #include "decomp.h" #include "islepathactor.h" @@ -23,22 +23,22 @@ class Motocycle : public IslePathActor { return !strcmp(p_name, Motocycle::ClassName()) || IslePathActor::IsA(p_name); } - MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 - void VTable0x70(float p_float) override; // vtable+0x70 - MxLong HandleClick() override; // vtable+0xcc - MxLong HandleControl(LegoControlManagerEvent& p_param) override; // vtable+0xd4 - MxLong HandlePathStruct(LegoPathStructEvent&) override; // vtable+0xdc - void Exit() override; // vtable+0xe4 + MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 + void VTable0x70(float p_time) override; // vtable+0x70 + MxLong HandleClick() override; // vtable+0xcc + MxLong HandleControl(LegoControlManagerNotificationParam& p_param) override; // vtable+0xd4 + MxLong HandlePathStruct(LegoPathStructNotificationParam&) override; // vtable+0xdc + void Exit() override; // vtable+0xe4 - void FUN_10035e10(); + void ActivateSceneActions(); // SYNTHETIC: LEGO1 0x100359d0 // Motocycle::`scalar deleting destructor' private: - undefined m_unk0x160[4]; - MxFloat m_unk0x164; - undefined m_unk0x168[4]; + undefined m_unk0x160[4]; // 0x160 + MxFloat m_fuel; // 0x164 + MxFloat m_time; // 0x168 }; -#endif // MOTOCYCLE_H +#endif // MOTORCYCLE_H diff --git a/LEGO1/lego/legoomni/include/mxcontrolpresenter.h b/LEGO1/lego/legoomni/include/mxcontrolpresenter.h index 49f9e975..1c251184 100644 --- a/LEGO1/lego/legoomni/include/mxcontrolpresenter.h +++ b/LEGO1/lego/legoomni/include/mxcontrolpresenter.h @@ -4,7 +4,7 @@ #include "decomp.h" #include "mxcompositepresenter.h" -class LegoControlManagerEvent; +class LegoControlManagerNotificationParam; class MxVideoPresenter; // VTABLE: LEGO1 0x100d7b88 @@ -39,7 +39,7 @@ class MxControlPresenter : public MxCompositePresenter { virtual void VTable0x68(MxBool p_unk0x50); // vtable+0x68 virtual void VTable0x6c(MxS16 p_unk0x4e); // vtable+0x6c - MxBool FUN_10044480(LegoControlManagerEvent* p_event, MxPresenter* p_presenter); + MxBool FUN_10044480(LegoControlManagerNotificationParam* p_param, MxPresenter* p_presenter); MxBool FUN_10044270(MxS32 p_x, MxS32 p_y, MxVideoPresenter* p_presenter); inline MxS16 GetUnknown0x4e() { return m_unk0x4e; } diff --git a/LEGO1/lego/legoomni/include/pizza.h b/LEGO1/lego/legoomni/include/pizza.h index 433b6f0f..664252b7 100644 --- a/LEGO1/lego/legoomni/include/pizza.h +++ b/LEGO1/lego/legoomni/include/pizza.h @@ -99,9 +99,9 @@ class Pizza : public IsleActor { } MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 - undefined4 HandleClick() override; // vtable+0x68 - undefined4 HandleEndAction(MxEndActionNotificationParam&) override; // vtable+0x74 - undefined4 VTable0x80(MxParam&) override; // vtable+0x80 + MxLong HandleClick() override; // vtable+0x68 + MxLong HandleEndAction(MxEndActionNotificationParam&) override; // vtable+0x74 + MxLong HandlePathStruct(LegoPathStructNotificationParam&) override; // vtable+0x80 void CreateState(); void FUN_10038220(MxU32 p_objectId); diff --git a/LEGO1/lego/legoomni/include/pizzeria.h b/LEGO1/lego/legoomni/include/pizzeria.h index 2008f629..2a94abf6 100644 --- a/LEGO1/lego/legoomni/include/pizzeria.h +++ b/LEGO1/lego/legoomni/include/pizzeria.h @@ -68,7 +68,7 @@ class Pizzeria : public IsleActor { } MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 - undefined4 HandleClick() override; // vtable+0x68 + MxLong HandleClick() override; // vtable+0x68 void CreateState(); diff --git a/LEGO1/lego/legoomni/include/police.h b/LEGO1/lego/legoomni/include/police.h index 83394b1a..88de1d6e 100644 --- a/LEGO1/lego/legoomni/include/police.h +++ b/LEGO1/lego/legoomni/include/police.h @@ -7,7 +7,7 @@ #include "legoworld.h" #include "radio.h" -class LegoControlManagerEvent; +class LegoControlManagerNotificationParam; class LegoEventNotificationParam; class MxDSAction; @@ -79,7 +79,7 @@ class Police : public LegoWorld { // Police::`scalar deleting destructor' private: - MxLong HandleControl(LegoControlManagerEvent& p_param); + MxLong HandleControl(LegoControlManagerNotificationParam& p_param); MxLong HandleEndAction(MxEndActionNotificationParam& p_param); MxLong HandleKeyPress(LegoEventNotificationParam& p_param); diff --git a/LEGO1/lego/legoomni/include/radio.h b/LEGO1/lego/legoomni/include/radio.h index cd411036..0de03d1e 100644 --- a/LEGO1/lego/legoomni/include/radio.h +++ b/LEGO1/lego/legoomni/include/radio.h @@ -4,7 +4,7 @@ #include "legostate.h" #include "mxcore.h" -class LegoControlManagerEvent; +class LegoControlManagerNotificationParam; class MxAtomId; class MxEndActionNotificationParam; @@ -84,7 +84,7 @@ class Radio : public MxCore { MxBool m_audioEnabled; // 0x0d MxLong HandleEndAction(MxEndActionNotificationParam& p_param); - MxLong HandleControl(LegoControlManagerEvent& p_param); + MxLong HandleControl(LegoControlManagerNotificationParam& p_param); }; #endif // RADIO_H diff --git a/LEGO1/lego/legoomni/include/registrationbook.h b/LEGO1/lego/legoomni/include/registrationbook.h index fb561453..956dda06 100644 --- a/LEGO1/lego/legoomni/include/registrationbook.h +++ b/LEGO1/lego/legoomni/include/registrationbook.h @@ -7,7 +7,7 @@ class InfocenterState; class MxControlPresenter; class MxEndActionNotificationParam; class MxStillPresenter; -class LegoControlManagerEvent; +class LegoControlManagerNotificationParam; // VTABLE: LEGO1 0x100d9928 // SIZE 0x2d0 @@ -64,7 +64,7 @@ class RegistrationBook : public LegoWorld { MxLong HandleEndAction(MxEndActionNotificationParam& p_param); MxLong HandleKeyPress(MxU8 p_key); - MxLong HandleControl(LegoControlManagerEvent& p_param); + MxLong HandleControl(LegoControlManagerNotificationParam& p_param); MxLong HandleNotification19(MxParam& p_param); void FUN_100775c0(MxS16 p_playerIndex); void WriteInfocenterLetters(MxS16); diff --git a/LEGO1/lego/legoomni/include/score.h b/LEGO1/lego/legoomni/include/score.h index a11492a0..b38f5359 100644 --- a/LEGO1/lego/legoomni/include/score.h +++ b/LEGO1/lego/legoomni/include/score.h @@ -5,7 +5,7 @@ #include "legostate.h" #include "legoworld.h" -class LegoControlManagerEvent; +class LegoControlManagerNotificationParam; class MxEndActionNotificationParam; // VTABLE: LEGO1 0x100d53f8 @@ -80,7 +80,7 @@ class Score : public LegoWorld { void Paint(); MxLong FUN_10001510(MxEndActionNotificationParam& p_param); - MxLong FUN_100016d0(LegoControlManagerEvent& p_param); + MxLong FUN_100016d0(LegoControlManagerNotificationParam& p_param); void FillArea(MxU32 i_activity, MxU32 i_actor, MxS16 score); protected: diff --git a/LEGO1/lego/legoomni/include/skateboard.h b/LEGO1/lego/legoomni/include/skateboard.h index fa78c2e8..9b5a04a8 100644 --- a/LEGO1/lego/legoomni/include/skateboard.h +++ b/LEGO1/lego/legoomni/include/skateboard.h @@ -26,11 +26,11 @@ class SkateBoard : public IslePathActor { return !strcmp(p_name, SkateBoard::ClassName()) || IslePathActor::IsA(p_name); } - MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 - MxLong HandleClick() override; // vtable+0xcc - MxLong HandleNotification0() override; // vtable+0xd0 - MxLong HandleControl(LegoControlManagerEvent& p_param) override; // vtable+0xd4 - void Exit() override; // vtable+0xe4 + MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 + MxLong HandleClick() override; // vtable+0xcc + MxLong HandleNotification0() override; // vtable+0xd0 + MxLong HandleControl(LegoControlManagerNotificationParam& p_param) override; // vtable+0xd4 + void Exit() override; // vtable+0xe4 inline void SetUnknown0x160(MxBool p_unk0x160) { m_unk0x160 = p_unk0x160; } diff --git a/LEGO1/lego/legoomni/include/towtrack.h b/LEGO1/lego/legoomni/include/towtrack.h index 3b3faafe..fc908883 100644 --- a/LEGO1/lego/legoomni/include/towtrack.h +++ b/LEGO1/lego/legoomni/include/towtrack.h @@ -82,14 +82,14 @@ class TowTrack : public IslePathActor { return !strcmp(p_name, TowTrack::ClassName()) || IslePathActor::IsA(p_name); } - MxLong Notify(MxParam& p_param) override; // vtable+0x04 - MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 - void VTable0x70(float p_float) override; // vtable+0x70 - MxLong HandleClick() override; // vtable+0xcc - MxLong HandleControl(LegoControlManagerEvent& p_param) override; // vtable+0xd4 - MxLong HandleEndAnim(LegoEndAnimNotificationParam& p_param) override; // vtable+0xd8 - MxLong HandlePathStruct(LegoPathStructEvent& p_param) override; // vtable+0xdc - void Exit() override; // vtable+0xe4 + MxLong Notify(MxParam& p_param) override; // vtable+0x04 + MxResult Create(MxDSAction& p_dsAction) override; // vtable+0x18 + void VTable0x70(float p_float) override; // vtable+0x70 + MxLong HandleClick() override; // vtable+0xcc + MxLong HandleControl(LegoControlManagerNotificationParam& p_param) override; // vtable+0xd4 + MxLong HandleEndAnim(LegoEndAnimNotificationParam& p_param) override; // vtable+0xd8 + MxLong HandlePathStruct(LegoPathStructNotificationParam& p_param) override; // vtable+0xdc + void Exit() override; // vtable+0xe4 void CreateState(); void FUN_1004dab0(); diff --git a/LEGO1/lego/legoomni/src/actors/ambulance.cpp b/LEGO1/lego/legoomni/src/actors/ambulance.cpp index e4ea9b3b..a044e431 100644 --- a/LEGO1/lego/legoomni/src/actors/ambulance.cpp +++ b/LEGO1/lego/legoomni/src/actors/ambulance.cpp @@ -139,16 +139,16 @@ MxLong Ambulance::Notify(MxParam& p_param) result = HandleEndAction((MxEndActionNotificationParam&) p_param); break; case c_notificationButtonDown: - result = HandleButtonDown((LegoControlManagerEvent&) p_param); + result = HandleButtonDown((LegoControlManagerNotificationParam&) p_param); break; case c_notificationClick: result = HandleClick(); break; case c_notificationControl: - result = HandleControl((LegoControlManagerEvent&) p_param); + result = HandleControl((LegoControlManagerNotificationParam&) p_param); break; case c_notificationPathStruct: - result = HandlePathStruct((LegoPathStructEvent&) p_param); + result = HandlePathStruct((LegoPathStructNotificationParam&) p_param); break; } @@ -243,7 +243,7 @@ MxLong Ambulance::HandleEndAction(MxEndActionNotificationParam& p_param) // FUNCTION: LEGO1 0x100367c0 // FUNCTION: BETA10 0x100230bf -MxLong Ambulance::HandleButtonDown(LegoControlManagerEvent& p_param) +MxLong Ambulance::HandleButtonDown(LegoControlManagerNotificationParam& p_param) { if (m_unk0x170 == 1) { LegoROI* roi = PickROI(p_param.GetX(), p_param.GetY()); @@ -266,7 +266,7 @@ MxLong Ambulance::HandleButtonDown(LegoControlManagerEvent& p_param) // FUNCTION: LEGO1 0x10036860 // FUNCTION: BETA10 0x100231bf -MxLong Ambulance::HandlePathStruct(LegoPathStructEvent& p_param) +MxLong Ambulance::HandlePathStruct(LegoPathStructNotificationParam& p_param) { // 0x168 corresponds to the path at the gas station if (p_param.GetData() == 0x168) { @@ -437,7 +437,7 @@ void Ambulance::Leave() } // FUNCTION: LEGO1 0x10036f90 -MxLong Ambulance::HandleControl(LegoControlManagerEvent& p_param) +MxLong Ambulance::HandleControl(LegoControlManagerNotificationParam& p_param) { MxLong result = 0; diff --git a/LEGO1/lego/legoomni/src/actors/bike.cpp b/LEGO1/lego/legoomni/src/actors/bike.cpp index 11096d0c..5fe2452e 100644 --- a/LEGO1/lego/legoomni/src/actors/bike.cpp +++ b/LEGO1/lego/legoomni/src/actors/bike.cpp @@ -77,7 +77,7 @@ MxLong Bike::HandleClick() } // FUNCTION: LEGO1 0x10076aa0 -MxLong Bike::HandleControl(LegoControlManagerEvent& p_param) +MxLong Bike::HandleControl(LegoControlManagerNotificationParam& p_param) { MxLong result = 0; diff --git a/LEGO1/lego/legoomni/src/actors/dunebuggy.cpp b/LEGO1/lego/legoomni/src/actors/dunebuggy.cpp index 290c3690..9c5fca9f 100644 --- a/LEGO1/lego/legoomni/src/actors/dunebuggy.cpp +++ b/LEGO1/lego/legoomni/src/actors/dunebuggy.cpp @@ -38,14 +38,14 @@ MxLong DuneBuggy::HandleClick() } // STUB: LEGO1 0x100681b0 -MxLong DuneBuggy::HandleControl(LegoControlManagerEvent& p_param) +MxLong DuneBuggy::HandleControl(LegoControlManagerNotificationParam& p_param) { // TODO return 0; } // STUB: LEGO1 0x10068270 -MxLong DuneBuggy::HandlePathStruct(LegoPathStructEvent& p_param) +MxLong DuneBuggy::HandlePathStruct(LegoPathStructNotificationParam& p_param) { // TODO return 0; diff --git a/LEGO1/lego/legoomni/src/actors/helicopter.cpp b/LEGO1/lego/legoomni/src/actors/helicopter.cpp index 4b69588a..1626f7be 100644 --- a/LEGO1/lego/legoomni/src/actors/helicopter.cpp +++ b/LEGO1/lego/legoomni/src/actors/helicopter.cpp @@ -152,7 +152,7 @@ MxLong Helicopter::HandleClick() } // FUNCTION: LEGO1 0x100035e0 -MxLong Helicopter::HandleControl(LegoControlManagerEvent& p_param) +MxLong Helicopter::HandleControl(LegoControlManagerNotificationParam& p_param) { MxU32 ret = 0; MxAtomId script; diff --git a/LEGO1/lego/legoomni/src/actors/isleactor.cpp b/LEGO1/lego/legoomni/src/actors/isleactor.cpp index 7c8681ff..5bd1f503 100644 --- a/LEGO1/lego/legoomni/src/actors/isleactor.cpp +++ b/LEGO1/lego/legoomni/src/actors/isleactor.cpp @@ -37,19 +37,19 @@ MxLong IsleActor::Notify(MxParam& p_param) result = HandleEndAction((MxEndActionNotificationParam&) p_param); break; case c_notificationButtonUp: - result = HandleButtonUp((MxNotificationParam&) p_param); + result = HandleButtonUp((LegoControlManagerNotificationParam&) p_param); break; case c_notificationButtonDown: - result = HandleButtonDown((MxNotificationParam&) p_param); + result = HandleButtonDown((LegoControlManagerNotificationParam&) p_param); break; case c_notificationClick: result = HandleClick(); break; case c_notificationEndAnim: - result = VTable0x70(); + result = HandleEndAnim(); break; case c_notificationPathStruct: - result = VTable0x80(p_param); + result = HandlePathStruct((LegoPathStructNotificationParam&) p_param); break; } diff --git a/LEGO1/lego/legoomni/src/actors/islepathactor.cpp b/LEGO1/lego/legoomni/src/actors/islepathactor.cpp index 43d6c91d..2ab12451 100644 --- a/LEGO1/lego/legoomni/src/actors/islepathactor.cpp +++ b/LEGO1/lego/legoomni/src/actors/islepathactor.cpp @@ -58,13 +58,13 @@ MxLong IslePathActor::Notify(MxParam& p_param) result = HandleClick(); break; case c_notificationControl: - result = HandleControl((LegoControlManagerEvent&) p_param); + result = HandleControl((LegoControlManagerNotificationParam&) p_param); break; case c_notificationEndAnim: result = HandleEndAnim((LegoEndAnimNotificationParam&) p_param); break; case c_notificationPathStruct: - result = HandlePathStruct((LegoPathStructEvent&) p_param); + result = HandlePathStruct((LegoPathStructNotificationParam&) p_param); break; } diff --git a/LEGO1/lego/legoomni/src/actors/jetski.cpp b/LEGO1/lego/legoomni/src/actors/jetski.cpp index fa6ad80b..a65268ac 100644 --- a/LEGO1/lego/legoomni/src/actors/jetski.cpp +++ b/LEGO1/lego/legoomni/src/actors/jetski.cpp @@ -37,7 +37,7 @@ MxLong Jetski::HandleClick() } // STUB: LEGO1 0x1007e8e0 -MxLong Jetski::HandleControl(LegoControlManagerEvent& p_param) +MxLong Jetski::HandleControl(LegoControlManagerNotificationParam& p_param) { // TODO return 0; diff --git a/LEGO1/lego/legoomni/src/actors/motorcycle.cpp b/LEGO1/lego/legoomni/src/actors/motorcycle.cpp index 3209f15e..31100203 100644 --- a/LEGO1/lego/legoomni/src/actors/motorcycle.cpp +++ b/LEGO1/lego/legoomni/src/actors/motorcycle.cpp @@ -1,58 +1,163 @@ -#include "motocycle.h" +#include "motorcycle.h" + +#include "isle.h" +#include "isle_actions.h" +#include "jukebox_actions.h" +#include "legoanimationmanager.h" +#include "legocontrolmanager.h" +#include "legonavcontroller.h" +#include "legopathstruct.h" +#include "legoutils.h" +#include "legovariables.h" +#include "legoworld.h" +#include "misc.h" +#include "mxmisc.h" +#include "mxtimer.h" +#include "mxtransitionmanager.h" +#include "mxvariabletable.h" DECOMP_SIZE_ASSERT(Motocycle, 0x16c) // FUNCTION: LEGO1 0x100357b0 Motocycle::Motocycle() { - this->m_maxLinearVel = 40.0; - this->m_unk0x150 = 1.75; - this->m_unk0x148 = 1; - this->m_unk0x164 = 1.0; + m_maxLinearVel = 40.0; + m_unk0x150 = 1.75; + m_unk0x148 = 1; + m_fuel = 1.0; } -// STUB: LEGO1 0x10035a40 +// FUNCTION: LEGO1 0x10035a40 MxResult Motocycle::Create(MxDSAction& p_dsAction) { - // TODO - return SUCCESS; + MxResult result = IslePathActor::Create(p_dsAction); + m_world = CurrentWorld(); + + if (m_world) { + m_world->Add(this); + } + + VariableTable()->SetVariable(g_varMOTOFUEL, "1.0"); + m_fuel = 1.0; + m_time = Timer()->GetTime(); + return result; } -// STUB: LEGO1 0x10035ad0 -void Motocycle::VTable0x70(float p_float) +// FUNCTION: LEGO1 0x10035ad0 +void Motocycle::VTable0x70(float p_time) { - // TODO + IslePathActor::VTable0x70(p_time); + + if (UserActor() == this) { + char buf[200]; + float speed = abs(m_worldSpeed); + float maxLinearVel = NavController()->GetMaxLinearVel(); + + sprintf(buf, "%g", speed / maxLinearVel); + VariableTable()->SetVariable(g_varMOTOSPEED, buf); + + m_fuel += (p_time - m_time) * -3.333333333e-06f; + if (m_fuel < 0) { + m_fuel = 0; + } + + m_time = p_time; + + sprintf(buf, "%g", m_fuel); + VariableTable()->SetVariable(g_varMOTOFUEL, buf); + } } -// STUB: LEGO1 0x10035bc0 +// FUNCTION: LEGO1 0x10035bc0 void Motocycle::Exit() { - // TODO + IslePathActor::Exit(); + GameState()->m_currentArea = LegoGameState::e_motocycle; + RemoveFromCurrentWorld(*g_isleScript, IsleScript::c_MotoBikeDashboard_Bitmap); + RemoveFromCurrentWorld(*g_isleScript, IsleScript::c_MotoBikeArms_Ctl); + RemoveFromCurrentWorld(*g_isleScript, IsleScript::c_MotoBikeInfo_Ctl); + RemoveFromCurrentWorld(*g_isleScript, IsleScript::c_MotoBikeSpeedMeter); + RemoveFromCurrentWorld(*g_isleScript, IsleScript::c_MotoBikeFuelMeter); + ControlManager()->Unregister(this); } -// STUB: LEGO1 0x10035c50 +// FUNCTION: LEGO1 0x10035c50 MxLong Motocycle::HandleClick() { - // TODO + if (!FUN_1003ef60()) { + return 1; + } + + FUN_10015820(TRUE, 0); + + ((Isle*) CurrentWorld())->SetDestLocation(LegoGameState::Area::e_motocycle); + TransitionManager()->StartTransition(MxTransitionManager::TransitionType::e_mosaic, 50, FALSE, TRUE); + + if (GameState()->GetActorId() != UserActor()->GetActorId()) { + ((IslePathActor*) UserActor())->Exit(); + } + + m_time = Timer()->GetTime(); + + Enter(); + InvokeAction(Extra::ActionType::e_start, *g_isleScript, IsleScript::c_MotoBikeDashboard, NULL); + GetCurrentAction().SetObjectId(-1); + + Vector3 position = m_roi->GetWorldPosition(); + AnimationManager()->FUN_10064670(&position); + AnimationManager()->FUN_10064740(&position); + ControlManager()->Register(this); + return 1; +} + +// FUNCTION: LEGO1 0x10035d70 +MxLong Motocycle::HandleControl(LegoControlManagerNotificationParam& p_param) +{ + MxLong result = 0; + + if (p_param.GetUnknown0x28() == 1) { + switch (p_param.GetClickedObjectId()) { + case IsleScript::c_MotoBikeArms_Ctl: + Exit(); + GameState()->m_currentArea = LegoGameState::e_unk66; + result = 1; + break; + case IsleScript::c_MotoBikeInfo_Ctl: + ((Isle*) CurrentWorld())->SetDestLocation(LegoGameState::e_infomain); + TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE); + Exit(); + result = 1; + break; + } + } + + return result; +} + +// FUNCTION: LEGO1 0x10035df0 +MxLong Motocycle::HandlePathStruct(LegoPathStructNotificationParam& p_param) +{ + // 0x168 corresponds to the path at the gas station + if (p_param.GetData() == 0x168) { + m_fuel = 1.0f; + } + return 0; } -// STUB: LEGO1 0x10035d70 -MxLong Motocycle::HandleControl(LegoControlManagerEvent& p_param) +// FUNCTION: LEGO1 0x10035e10 +void Motocycle::ActivateSceneActions() { - // TODO - return 0; -} + PlayMusic(JukeboxScript::c_PoliceStation_Music); -// STUB: LEGO1 0x10035df0 -MxLong Motocycle::HandlePathStruct(LegoPathStructEvent& p_param) -{ - // TODO - return 0; -} + Act1State* act1state = (Act1State*) GameState()->GetState("Act1State"); + if (!act1state->m_unk0x022) { + act1state->m_unk0x022 = TRUE; -// STUB: LEGO1 0x10035e10 -void Motocycle::FUN_10035e10() -{ - // TODO + MxMatrix mat(UserActor()->GetROI()->GetLocal2World()); + mat.TranslateBy(mat[2][0] * 2.5, mat[2][1] + 0.7, mat[2][2] * 2.5); + + AnimationManager() + ->FUN_10060dc0(IsleScript::c_sns006in_RunAnim, &mat, TRUE, FALSE, NULL, FALSE, TRUE, TRUE, TRUE); + } } diff --git a/LEGO1/lego/legoomni/src/actors/pizza.cpp b/LEGO1/lego/legoomni/src/actors/pizza.cpp index 76588406..1ff18396 100644 --- a/LEGO1/lego/legoomni/src/actors/pizza.cpp +++ b/LEGO1/lego/legoomni/src/actors/pizza.cpp @@ -72,14 +72,14 @@ void Pizza::FUN_10038380() } // STUB: LEGO1 0x100383f0 -undefined4 Pizza::HandleClick() +MxLong Pizza::HandleClick() { // TODO return 0; } // STUB: LEGO1 0x100384f0 -undefined4 Pizza::VTable0x80(MxParam&) +MxLong Pizza::HandlePathStruct(LegoPathStructNotificationParam&) { // TODO return 0; @@ -93,7 +93,7 @@ MxResult Pizza::Tickle() } // STUB: LEGO1 0x10038b10 -undefined4 Pizza::HandleEndAction(MxEndActionNotificationParam&) +MxLong Pizza::HandleEndAction(MxEndActionNotificationParam&) { // TODO return 0; diff --git a/LEGO1/lego/legoomni/src/actors/pizzeria.cpp b/LEGO1/lego/legoomni/src/actors/pizzeria.cpp index 68484768..3b61ddb7 100644 --- a/LEGO1/lego/legoomni/src/actors/pizzeria.cpp +++ b/LEGO1/lego/legoomni/src/actors/pizzeria.cpp @@ -46,7 +46,7 @@ void Pizzeria::CreateState() } // FUNCTION: LEGO1 0x10017a50 -undefined4 Pizzeria::HandleClick() +MxLong Pizzeria::HandleClick() { if (FUN_1003ef60() && m_pizzaMissionState->m_unk0x0c == 0) { if (UserActor()->GetActorId() != GameState()->GetActorId()) { diff --git a/LEGO1/lego/legoomni/src/actors/radio.cpp b/LEGO1/lego/legoomni/src/actors/radio.cpp index bc7adc69..6c3ff702 100644 --- a/LEGO1/lego/legoomni/src/actors/radio.cpp +++ b/LEGO1/lego/legoomni/src/actors/radio.cpp @@ -91,7 +91,7 @@ MxLong Radio::Notify(MxParam& p_param) result = HandleEndAction((MxEndActionNotificationParam&) p_param); break; case c_notificationControl: - result = HandleControl((LegoControlManagerEvent&) p_param); + result = HandleControl((LegoControlManagerNotificationParam&) p_param); break; } } @@ -139,7 +139,7 @@ void Radio::Stop() } // FUNCTION: LEGO1 0x1002cbc0 -MxLong Radio::HandleControl(LegoControlManagerEvent& p_param) +MxLong Radio::HandleControl(LegoControlManagerNotificationParam& p_param) { MxDSAction action; // Unused MxS32 objectId = p_param.GetClickedObjectId(); diff --git a/LEGO1/lego/legoomni/src/actors/skateboard.cpp b/LEGO1/lego/legoomni/src/actors/skateboard.cpp index 2c2e6c85..3ca0bfc2 100644 --- a/LEGO1/lego/legoomni/src/actors/skateboard.cpp +++ b/LEGO1/lego/legoomni/src/actors/skateboard.cpp @@ -106,7 +106,7 @@ MxLong SkateBoard::HandleClick() } // FUNCTION: LEGO1 0x10010230 -MxLong SkateBoard::HandleControl(LegoControlManagerEvent& p_param) +MxLong SkateBoard::HandleControl(LegoControlManagerNotificationParam& p_param) { MxU32 result = 0; diff --git a/LEGO1/lego/legoomni/src/actors/towtrack.cpp b/LEGO1/lego/legoomni/src/actors/towtrack.cpp index ba51a309..05cf5fcb 100644 --- a/LEGO1/lego/legoomni/src/actors/towtrack.cpp +++ b/LEGO1/lego/legoomni/src/actors/towtrack.cpp @@ -89,7 +89,7 @@ MxLong TowTrack::HandleEndAnim(LegoEndAnimNotificationParam& p_param) } // STUB: LEGO1 0x1004d330 -MxLong TowTrack::HandlePathStruct(LegoPathStructEvent& p_param) +MxLong TowTrack::HandlePathStruct(LegoPathStructNotificationParam& p_param) { // TODO return 0; @@ -109,7 +109,7 @@ void TowTrack::Exit() } // STUB: LEGO1 0x1004d9e0 -MxLong TowTrack::HandleControl(LegoControlManagerEvent& p_param) +MxLong TowTrack::HandleControl(LegoControlManagerNotificationParam& p_param) { // TODO return 0; diff --git a/LEGO1/lego/legoomni/src/common/legoobjectfactory.cpp b/LEGO1/lego/legoomni/src/common/legoobjectfactory.cpp index 265a69dc..fca0c0cb 100644 --- a/LEGO1/lego/legoomni/src/common/legoobjectfactory.cpp +++ b/LEGO1/lego/legoomni/src/common/legoobjectfactory.cpp @@ -62,7 +62,7 @@ #include "legoworld.h" #include "legoworldpresenter.h" #include "misc.h" -#include "motocycle.h" +#include "motorcycle.h" #include "mxcompositemediapresenter.h" #include "mxcontrolpresenter.h" #include "pizza.h" diff --git a/LEGO1/lego/legoomni/src/common/legoutils.cpp b/LEGO1/lego/legoomni/src/common/legoutils.cpp index c2f5077f..8699ffc1 100644 --- a/LEGO1/lego/legoomni/src/common/legoutils.cpp +++ b/LEGO1/lego/legoomni/src/common/legoutils.cpp @@ -367,7 +367,7 @@ void PlayCamAnim(LegoPathActor* p_actor, MxBool p_unused, MxU32 p_location, MxBo MxLong result = 0; if (world != NULL) { - LegoPathStructEvent param(c_notificationPathStruct, p_actor, LegoPathStruct::c_camAnim, p_location); + LegoPathStructNotificationParam param(c_notificationPathStruct, p_actor, LegoPathStruct::c_camAnim, p_location); result = world->Notify(param); } diff --git a/LEGO1/lego/legoomni/src/common/legovariables.cpp b/LEGO1/lego/legoomni/src/common/legovariables.cpp index 52e78930..6815285d 100644 --- a/LEGO1/lego/legoomni/src/common/legovariables.cpp +++ b/LEGO1/lego/legoomni/src/common/legovariables.cpp @@ -16,6 +16,14 @@ DECOMP_SIZE_ASSERT(CursorVariable, 0x24) DECOMP_SIZE_ASSERT(WhoAmIVariable, 0x24) DECOMP_SIZE_ASSERT(CustomizeAnimFileVariable, 0x24) +// GLOBAL: LEGO1 0x100f3994 +// STRING: LEGO1 0x100f3988 +const char* g_varMOTOSPEED = "motoSPEED"; + +// GLOBAL: LEGO1 0x100f3998 +// STRING: LEGO1 0x100f397c +const char* g_varMOTOFUEL = "motoFUEL"; + // GLOBAL: LEGO1 0x100f39b8 // STRING: LEGO1 0x100f39ac const char* g_varAMBULSPEED = "ambulSPEED"; diff --git a/LEGO1/lego/legoomni/src/common/mxcontrolpresenter.cpp b/LEGO1/lego/legoomni/src/common/mxcontrolpresenter.cpp index 340836f0..70a7aece 100644 --- a/LEGO1/lego/legoomni/src/common/mxcontrolpresenter.cpp +++ b/LEGO1/lego/legoomni/src/common/mxcontrolpresenter.cpp @@ -175,27 +175,27 @@ MxBool MxControlPresenter::FUN_10044270(MxS32 p_x, MxS32 p_y, MxVideoPresenter* } // FUNCTION: LEGO1 0x10044480 -MxBool MxControlPresenter::FUN_10044480(LegoControlManagerEvent* p_event, MxPresenter* p_presenter) +MxBool MxControlPresenter::FUN_10044480(LegoControlManagerNotificationParam* p_param, MxPresenter* p_presenter) { if (IsEnabled()) { - switch (p_event->GetNotification()) { + switch (p_param->GetNotification()) { case c_notificationButtonUp: if (m_unk0x4c == 0 || m_unk0x4c == 2 || m_unk0x4c == 3) { - p_event->SetClickedObjectId(m_action->GetObjectId()); - p_event->SetClickedAtom(m_action->GetAtomId().GetInternal()); + p_param->SetClickedObjectId(m_action->GetObjectId()); + p_param->SetClickedAtom(m_action->GetAtomId().GetInternal()); VTable0x6c(0); - p_event->SetNotification(c_notificationControl); - p_event->SetUnknown0x28(m_unk0x4e); + p_param->SetNotification(c_notificationControl); + p_param->SetUnknown0x28(m_unk0x4e); return TRUE; } break; case c_notificationButtonDown: - if (FUN_10044270(p_event->GetX(), p_event->GetY(), (MxVideoPresenter*) p_presenter)) { - p_event->SetClickedObjectId(m_action->GetObjectId()); - p_event->SetClickedAtom(m_action->GetAtomId().GetInternal()); + if (FUN_10044270(p_param->GetX(), p_param->GetY(), (MxVideoPresenter*) p_presenter)) { + p_param->SetClickedObjectId(m_action->GetObjectId()); + p_param->SetClickedAtom(m_action->GetAtomId().GetInternal()); VTable0x6c(m_unk0x56); - p_event->SetNotification(c_notificationControl); - p_event->SetUnknown0x28(m_unk0x4e); + p_param->SetNotification(c_notificationControl); + p_param->SetUnknown0x28(m_unk0x4e); return TRUE; } break; diff --git a/LEGO1/lego/legoomni/src/control/legocontrolmanager.cpp b/LEGO1/lego/legoomni/src/control/legocontrolmanager.cpp index 6e433a15..4a16d930 100644 --- a/LEGO1/lego/legoomni/src/control/legocontrolmanager.cpp +++ b/LEGO1/lego/legoomni/src/control/legocontrolmanager.cpp @@ -10,7 +10,7 @@ #include "mxticklemanager.h" DECOMP_SIZE_ASSERT(LegoControlManager, 0x60) -DECOMP_SIZE_ASSERT(LegoControlManagerEvent, 0x2c) +DECOMP_SIZE_ASSERT(LegoControlManagerNotificationParam, 0x2c) // FUNCTION: LEGO1 0x10028520 LegoControlManager::LegoControlManager() diff --git a/LEGO1/lego/legoomni/src/paths/legopathstruct.cpp b/LEGO1/lego/legoomni/src/paths/legopathstruct.cpp index 93a17e38..1a39478e 100644 --- a/LEGO1/lego/legoomni/src/paths/legopathstruct.cpp +++ b/LEGO1/lego/legoomni/src/paths/legopathstruct.cpp @@ -51,7 +51,7 @@ MxBool LegoPathStruct::HandleTrigger(LegoPathActor* p_actor, MxBool p_direction, case c_d: { p_actor->VTable0x58(p_data); - LegoPathStructEvent param(c_notificationPathStruct, p_actor, m_name[2], p_data); + LegoPathStructNotificationParam param(c_notificationPathStruct, p_actor, m_name[2], p_data); p_actor->Notify(param); LegoWorld* world = CurrentWorld(); @@ -80,7 +80,7 @@ MxBool LegoPathStruct::HandleTrigger(LegoPathActor* p_actor, MxBool p_direction, case c_s: { LegoWorld* world = CurrentWorld(); if (world != NULL) { - LegoPathStructEvent param(c_notificationPathStruct, p_actor, m_name[2], p_data); + LegoPathStructNotificationParam param(c_notificationPathStruct, p_actor, m_name[2], p_data); if (world->Notify(param) != 0) { break; @@ -93,7 +93,7 @@ MxBool LegoPathStruct::HandleTrigger(LegoPathActor* p_actor, MxBool p_direction, case c_w: { LegoWorld* world = CurrentWorld(); if (world != NULL) { - LegoPathStructEvent param(c_notificationPathStruct, p_actor, m_name[2], p_data); + LegoPathStructNotificationParam param(c_notificationPathStruct, p_actor, m_name[2], p_data); NotificationManager()->Send(world, param); } break; diff --git a/LEGO1/lego/legoomni/src/race/carrace.cpp b/LEGO1/lego/legoomni/src/race/carrace.cpp index 53db021e..5552df4d 100644 --- a/LEGO1/lego/legoomni/src/race/carrace.cpp +++ b/LEGO1/lego/legoomni/src/race/carrace.cpp @@ -32,7 +32,7 @@ MxLong CarRace::HandleEndAction(MxEndActionNotificationParam&) } // STUB: LEGO1 0x100170e0 -MxLong CarRace::HandlePathStruct(LegoPathStructEvent&) +MxLong CarRace::HandlePathStruct(LegoPathStructNotificationParam&) { // TODO return 0; diff --git a/LEGO1/lego/legoomni/src/race/jetskirace.cpp b/LEGO1/lego/legoomni/src/race/jetskirace.cpp index 120ba4d8..3b39e584 100644 --- a/LEGO1/lego/legoomni/src/race/jetskirace.cpp +++ b/LEGO1/lego/legoomni/src/race/jetskirace.cpp @@ -26,7 +26,7 @@ MxLong JetskiRace::HandleClick(LegoEventNotificationParam&) } // STUB: LEGO1 0x100166a0 -MxLong JetskiRace::HandlePathStruct(LegoPathStructEvent&) +MxLong JetskiRace::HandlePathStruct(LegoPathStructNotificationParam&) { return 0; } diff --git a/LEGO1/lego/legoomni/src/race/legorace.cpp b/LEGO1/lego/legoomni/src/race/legorace.cpp index ccb6ceda..2113be16 100644 --- a/LEGO1/lego/legoomni/src/race/legorace.cpp +++ b/LEGO1/lego/legoomni/src/race/legorace.cpp @@ -36,7 +36,7 @@ LegoRace::LegoRace() } // FUNCTION: LEGO1 0x10015b70 -MxLong LegoRace::HandlePathStruct(LegoPathStructEvent&) +MxLong LegoRace::HandlePathStruct(LegoPathStructNotificationParam&) { return 0; } @@ -102,7 +102,7 @@ MxLong LegoRace::Notify(MxParam& p_param) result = HandleClick((LegoEventNotificationParam&) p_param); break; case c_notificationPathStruct: - result = HandlePathStruct((LegoPathStructEvent&) p_param); + result = HandlePathStruct((LegoPathStructNotificationParam&) p_param); break; case c_notificationTransitioned: GameState()->SwitchArea(m_destLocation); diff --git a/LEGO1/lego/legoomni/src/worlds/elevatorbottom.cpp b/LEGO1/lego/legoomni/src/worlds/elevatorbottom.cpp index 20ab4309..768f5333 100644 --- a/LEGO1/lego/legoomni/src/worlds/elevatorbottom.cpp +++ b/LEGO1/lego/legoomni/src/worlds/elevatorbottom.cpp @@ -60,7 +60,7 @@ MxLong ElevatorBottom::Notify(MxParam& p_param) if (m_worldStarted) { switch (((MxNotificationParam&) p_param).GetNotification()) { case c_notificationControl: - ret = HandleControl((LegoControlManagerEvent&) p_param); + ret = HandleControl((LegoControlManagerNotificationParam&) p_param); break; case c_notificationTransitioned: GameState()->SwitchArea(m_destLocation); @@ -80,7 +80,7 @@ void ElevatorBottom::ReadyWorld() } // FUNCTION: LEGO1 0x100181d0 -MxLong ElevatorBottom::HandleControl(LegoControlManagerEvent& p_param) +MxLong ElevatorBottom::HandleControl(LegoControlManagerNotificationParam& p_param) { MxLong result = 0; diff --git a/LEGO1/lego/legoomni/src/worlds/gasstation.cpp b/LEGO1/lego/legoomni/src/worlds/gasstation.cpp index aadf6b1c..a2bcb82c 100644 --- a/LEGO1/lego/legoomni/src/worlds/gasstation.cpp +++ b/LEGO1/lego/legoomni/src/worlds/gasstation.cpp @@ -111,10 +111,10 @@ MxLong GasStation::Notify(MxParam& p_param) result = HandleKeyPress((((LegoEventNotificationParam&) p_param)).GetKey()); break; case c_notificationButtonDown: - result = HandleButtonDown(((LegoControlManagerEvent&) p_param)); + result = HandleButtonDown(((LegoControlManagerNotificationParam&) p_param)); break; case c_notificationControl: - result = HandleControl((LegoControlManagerEvent&) p_param); + result = HandleControl((LegoControlManagerNotificationParam&) p_param); break; case c_notificationTransitioned: GameState()->SwitchArea(m_destLocation); @@ -306,14 +306,14 @@ MxLong GasStation::HandleKeyPress(MxS8 p_key) } // STUB: LEGO1 0x10005960 -MxLong GasStation::HandleButtonDown(LegoControlManagerEvent& p_param) +MxLong GasStation::HandleButtonDown(LegoControlManagerNotificationParam& p_param) { // TODO return 0; } // FUNCTION: LEGO1 0x10005b20 -MxLong GasStation::HandleControl(LegoControlManagerEvent& p_param) +MxLong GasStation::HandleControl(LegoControlManagerNotificationParam& p_param) { if (p_param.GetUnknown0x28() == 1) { MxDSAction action; diff --git a/LEGO1/lego/legoomni/src/worlds/hospital.cpp b/LEGO1/lego/legoomni/src/worlds/hospital.cpp index f29fe3df..550818f3 100644 --- a/LEGO1/lego/legoomni/src/worlds/hospital.cpp +++ b/LEGO1/lego/legoomni/src/worlds/hospital.cpp @@ -120,10 +120,10 @@ MxLong Hospital::Notify(MxParam& p_param) result = HandleKeyPress((((LegoEventNotificationParam&) p_param)).GetKey()); break; case c_notificationButtonDown: - result = HandleButtonDown(((LegoControlManagerEvent&) p_param)); + result = HandleButtonDown(((LegoControlManagerNotificationParam&) p_param)); break; case c_notificationControl: - result = HandleControl((LegoControlManagerEvent&) p_param); + result = HandleControl((LegoControlManagerNotificationParam&) p_param); break; case c_notificationTransitioned: if (m_destLocation != LegoGameState::e_undefined) { @@ -396,7 +396,7 @@ MxLong Hospital::HandleEndAction(MxEndActionNotificationParam& p_param) } // FUNCTION: LEGO1 0x10075710 -MxLong Hospital::HandleButtonDown(LegoControlManagerEvent& p_param) +MxLong Hospital::HandleButtonDown(LegoControlManagerNotificationParam& p_param) { if (m_unk0x100 == 1) { LegoROI* roi = PickROI(p_param.GetX(), p_param.GetY()); @@ -552,7 +552,7 @@ MxLong Hospital::HandleButtonDown(LegoControlManagerEvent& p_param) } // FUNCTION: LEGO1 0x10075f90 -MxBool Hospital::HandleControl(LegoControlManagerEvent& p_param) +MxBool Hospital::HandleControl(LegoControlManagerNotificationParam& p_param) { if (p_param.GetUnknown0x28() == 1) { switch (p_param.GetClickedObjectId()) { diff --git a/LEGO1/lego/legoomni/src/worlds/infocenter.cpp b/LEGO1/lego/legoomni/src/worlds/infocenter.cpp index a2ae514f..d88fe79b 100644 --- a/LEGO1/lego/legoomni/src/worlds/infocenter.cpp +++ b/LEGO1/lego/legoomni/src/worlds/infocenter.cpp @@ -254,7 +254,7 @@ MxLong Infocenter::Notify(MxParam& p_param) ); break; case c_notificationControl: - result = HandleControl((LegoControlManagerEvent&) p_param); + result = HandleControl((LegoControlManagerNotificationParam&) p_param); break; case c_notificationTransitioned: StopBookAnimation(); @@ -952,7 +952,7 @@ MxU8 Infocenter::HandleButtonUp(MxS32 p_x, MxS32 p_y) } // FUNCTION: LEGO1 0x10070370 -MxU8 Infocenter::HandleControl(LegoControlManagerEvent& p_param) +MxU8 Infocenter::HandleControl(LegoControlManagerNotificationParam& p_param) { if (p_param.GetUnknown0x28() == 1) { m_infoManDialogueTimer = 0; diff --git a/LEGO1/lego/legoomni/src/worlds/infocenterdoor.cpp b/LEGO1/lego/legoomni/src/worlds/infocenterdoor.cpp index 4bf5d796..0673de11 100644 --- a/LEGO1/lego/legoomni/src/worlds/infocenterdoor.cpp +++ b/LEGO1/lego/legoomni/src/worlds/infocenterdoor.cpp @@ -69,7 +69,7 @@ MxLong InfocenterDoor::Notify(MxParam& p_param) } break; case c_notificationControl: - result = HandleControl((LegoControlManagerEvent&) p_param); + result = HandleControl((LegoControlManagerNotificationParam&) p_param); break; case c_notificationTransitioned: GameState()->SwitchArea(m_destLocation); @@ -90,7 +90,7 @@ void InfocenterDoor::ReadyWorld() } // FUNCTION: LEGO1 0x10037a90 -MxLong InfocenterDoor::HandleControl(LegoControlManagerEvent& p_param) +MxLong InfocenterDoor::HandleControl(LegoControlManagerNotificationParam& p_param) { MxLong result = 0; diff --git a/LEGO1/lego/legoomni/src/worlds/isle.cpp b/LEGO1/lego/legoomni/src/worlds/isle.cpp index b15cfc70..2f60a19a 100644 --- a/LEGO1/lego/legoomni/src/worlds/isle.cpp +++ b/LEGO1/lego/legoomni/src/worlds/isle.cpp @@ -23,7 +23,7 @@ #include "legovariables.h" #include "legovideomanager.h" #include "misc.h" -#include "motocycle.h" +#include "motorcycle.h" #include "mxactionnotificationparam.h" #include "mxbackgroundaudiomanager.h" #include "mxmisc.h" @@ -152,7 +152,7 @@ MxLong Isle::Notify(MxParam& p_param) } break; case c_notificationControl: - result = HandleControl((LegoControlManagerEvent&) p_param); + result = HandleControl((LegoControlManagerNotificationParam&) p_param); break; case c_notificationEndAnim: switch (m_act1state->m_unk0x018) { @@ -168,7 +168,7 @@ MxLong Isle::Notify(MxParam& p_param) } break; case c_notificationPathStruct: - result = HandlePathStruct((LegoPathStructEvent&) p_param); + result = HandlePathStruct((LegoPathStructNotificationParam&) p_param); break; case c_notificationType20: Enable(TRUE); @@ -287,7 +287,7 @@ void Isle::ReadyWorld() } // FUNCTION: LEGO1 0x10031030 -MxLong Isle::HandleControl(LegoControlManagerEvent& p_param) +MxLong Isle::HandleControl(LegoControlManagerNotificationParam& p_param) { if (p_param.GetUnknown0x28() == 1) { MxDSAction action; @@ -469,7 +469,7 @@ void Isle::UpdateGlobe() } // FUNCTION: LEGO1 0x100315f0 -MxLong Isle::HandlePathStruct(LegoPathStructEvent& p_param) +MxLong Isle::HandlePathStruct(LegoPathStructNotificationParam& p_param) { MxLong result = 0; @@ -1006,7 +1006,7 @@ MxLong Isle::HandleTransitionEnd() FUN_10032d30(IsleScript::c_MotoBikeDashboard_Bitmap, JukeboxScript::c_MusicTheme1, NULL, TRUE); if (!m_act1state->m_unk0x01f) { - m_motocycle->FUN_10035e10(); + m_motocycle->ActivateSceneActions(); } break; case LegoGameState::e_copter: diff --git a/LEGO1/lego/legoomni/src/worlds/jukebox.cpp b/LEGO1/lego/legoomni/src/worlds/jukebox.cpp index 57c30be3..ca27142d 100644 --- a/LEGO1/lego/legoomni/src/worlds/jukebox.cpp +++ b/LEGO1/lego/legoomni/src/worlds/jukebox.cpp @@ -76,7 +76,7 @@ MxLong JukeBox::Notify(MxParam& p_param) if (m_worldStarted) { switch (((MxNotificationParam&) p_param).GetNotification()) { case c_notificationControl: - result = HandleControl((LegoControlManagerEvent&) p_param); + result = HandleControl((LegoControlManagerNotificationParam&) p_param); break; case c_notificationTransitioned: GameState()->SwitchArea(m_destLocation); @@ -123,7 +123,7 @@ void JukeBox::ReadyWorld() // FUNCTION: LEGO1 0x1005da70 // FUNCTION: BETA10 0x10037f6d -MxBool JukeBox::HandleControl(LegoControlManagerEvent& p_param) +MxBool JukeBox::HandleControl(LegoControlManagerNotificationParam& p_param) { MxStillPresenter* presenter; diff --git a/LEGO1/lego/legoomni/src/worlds/police.cpp b/LEGO1/lego/legoomni/src/worlds/police.cpp index 1af480a8..e5e09a1c 100644 --- a/LEGO1/lego/legoomni/src/worlds/police.cpp +++ b/LEGO1/lego/legoomni/src/worlds/police.cpp @@ -83,7 +83,7 @@ MxLong Police::Notify(MxParam& p_param) result = HandleKeyPress(((LegoEventNotificationParam&) p_param)); break; case c_notificationControl: - result = HandleControl((LegoControlManagerEvent&) p_param); + result = HandleControl((LegoControlManagerNotificationParam&) p_param); break; case c_notificationTransitioned: GameState()->SwitchArea(m_destLocation); @@ -103,7 +103,7 @@ void Police::ReadyWorld() } // FUNCTION: LEGO1 0x1005e550 -MxLong Police::HandleControl(LegoControlManagerEvent& p_param) +MxLong Police::HandleControl(LegoControlManagerNotificationParam& p_param) { if (p_param.GetUnknown0x28() == 1) { switch (p_param.GetClickedObjectId()) { diff --git a/LEGO1/lego/legoomni/src/worlds/registrationbook.cpp b/LEGO1/lego/legoomni/src/worlds/registrationbook.cpp index eb2e916c..430abcc7 100644 --- a/LEGO1/lego/legoomni/src/worlds/registrationbook.cpp +++ b/LEGO1/lego/legoomni/src/worlds/registrationbook.cpp @@ -115,7 +115,7 @@ MxLong RegistrationBook::Notify(MxParam& p_param) m_registerDialogueTimer = Timer()->GetTime(); break; case c_notificationControl: - result = HandleControl((LegoControlManagerEvent&) p_param); + result = HandleControl((LegoControlManagerNotificationParam&) p_param); break; case c_notificationPathStruct: result = HandleNotification19(p_param); @@ -210,7 +210,7 @@ MxLong RegistrationBook::HandleKeyPress(MxU8 p_key) } // FUNCTION: LEGO1 0x100774a0 -MxLong RegistrationBook::HandleControl(LegoControlManagerEvent& p_param) +MxLong RegistrationBook::HandleControl(LegoControlManagerNotificationParam& p_param) { MxS16 unk0x28 = p_param.GetUnknown0x28(); diff --git a/LEGO1/lego/legoomni/src/worlds/score.cpp b/LEGO1/lego/legoomni/src/worlds/score.cpp index 95c19bcc..aba65f4a 100644 --- a/LEGO1/lego/legoomni/src/worlds/score.cpp +++ b/LEGO1/lego/legoomni/src/worlds/score.cpp @@ -105,7 +105,7 @@ MxLong Score::Notify(MxParam& p_param) ret = 1; break; case c_notificationControl: - ret = FUN_100016d0((LegoControlManagerEvent&) p_param); + ret = FUN_100016d0((LegoControlManagerNotificationParam&) p_param); break; case c_notificationTransitioned: DeleteObjects(g_infoscorScript, InfoscorScript::c_LegoBox1_Flc, InfoscorScript::c_LegoBox3_Flc); @@ -166,7 +166,7 @@ void Score::ReadyWorld() } // FUNCTION: LEGO1 0x100016d0 -MxLong Score::FUN_100016d0(LegoControlManagerEvent& p_param) +MxLong Score::FUN_100016d0(LegoControlManagerNotificationParam& p_param) { MxS16 unk0x28 = p_param.GetUnknown0x28();