From 94ebc77c29a67075eb44a7a4fed08dea92ce5072 Mon Sep 17 00:00:00 2001 From: disinvite Date: Tue, 3 Dec 2024 17:18:50 -0500 Subject: [PATCH] Second batch --- LEGO1/lego/legoomni/src/actors/buildingentity.cpp | 5 ++++- LEGO1/lego/legoomni/src/actors/isleactor.cpp | 4 +++- LEGO1/lego/legoomni/src/actors/islepathactor.cpp | 4 +++- LEGO1/lego/legoomni/src/actors/jukeboxentity.cpp | 5 ++++- LEGO1/lego/legoomni/src/actors/radio.cpp | 4 +++- LEGO1/lego/legoomni/src/actors/towtrack.cpp | 4 +++- LEGO1/lego/legoomni/src/entity/act2policestation.cpp | 5 ++++- LEGO1/lego/legoomni/src/entity/legocameracontroller.cpp | 1 + LEGO1/lego/legoomni/src/worlds/elevatorbottom.cpp | 4 +++- LEGO1/lego/legoomni/src/worlds/gasstation.cpp | 4 +++- LEGO1/lego/legoomni/src/worlds/historybook.cpp | 4 +++- LEGO1/lego/legoomni/src/worlds/infocenter.cpp | 4 +++- LEGO1/lego/legoomni/src/worlds/infocenterdoor.cpp | 4 +++- LEGO1/lego/legoomni/src/worlds/isle.cpp | 5 ++++- LEGO1/lego/legoomni/src/worlds/jukebox.cpp | 4 +++- LEGO1/lego/legoomni/src/worlds/police.cpp | 4 +++- LEGO1/lego/legoomni/src/worlds/registrationbook.cpp | 4 +++- LEGO1/lego/legoomni/src/worlds/score.cpp | 5 ++++- 18 files changed, 57 insertions(+), 17 deletions(-) diff --git a/LEGO1/lego/legoomni/src/actors/buildingentity.cpp b/LEGO1/lego/legoomni/src/actors/buildingentity.cpp index 6ddd84d8..0f0423ee 100644 --- a/LEGO1/lego/legoomni/src/actors/buildingentity.cpp +++ b/LEGO1/lego/legoomni/src/actors/buildingentity.cpp @@ -19,9 +19,12 @@ BuildingEntity::~BuildingEntity() } // FUNCTION: LEGO1 0x100150a0 +// FUNCTION: BETA10 0x10024e37 MxLong BuildingEntity::Notify(MxParam& p_param) { - if (((MxNotificationParam&) p_param).GetNotification() == c_notificationClick) { + MxNotificationParam& param = (MxNotificationParam&) p_param; + + if (param.GetNotification() == c_notificationClick) { return HandleClick((LegoEventNotificationParam&) p_param); } diff --git a/LEGO1/lego/legoomni/src/actors/isleactor.cpp b/LEGO1/lego/legoomni/src/actors/isleactor.cpp index 5bd1f503..6f718b55 100644 --- a/LEGO1/lego/legoomni/src/actors/isleactor.cpp +++ b/LEGO1/lego/legoomni/src/actors/isleactor.cpp @@ -25,11 +25,13 @@ MxResult IsleActor::Create(MxDSAction& p_dsAction) } // FUNCTION: LEGO1 0x1002c7b0 +// FUNCTION: BETA10 0x1003622e MxLong IsleActor::Notify(MxParam& p_param) { MxLong result = 0; + MxNotificationParam& param = (MxNotificationParam&) p_param; - switch (((MxNotificationParam&) p_param).GetNotification()) { + switch (param.GetNotification()) { case c_notificationType0: result = VTable0x6c(); break; diff --git a/LEGO1/lego/legoomni/src/actors/islepathactor.cpp b/LEGO1/lego/legoomni/src/actors/islepathactor.cpp index 4aafa214..624fc8a9 100644 --- a/LEGO1/lego/legoomni/src/actors/islepathactor.cpp +++ b/LEGO1/lego/legoomni/src/actors/islepathactor.cpp @@ -46,11 +46,13 @@ void IslePathActor::Destroy(MxBool p_fromDestructor) } // FUNCTION: LEGO1 0x1001a2c0 +// FUNCTION: BETA10 0x100364ca MxLong IslePathActor::Notify(MxParam& p_param) { MxLong result = 0; + MxNotificationParam& param = (MxNotificationParam&) p_param; - switch (((MxNotificationParam&) p_param).GetNotification()) { + switch (param.GetNotification()) { case c_notificationType0: result = HandleNotification0(); break; diff --git a/LEGO1/lego/legoomni/src/actors/jukeboxentity.cpp b/LEGO1/lego/legoomni/src/actors/jukeboxentity.cpp index 2ac6ed54..ecf0bec8 100644 --- a/LEGO1/lego/legoomni/src/actors/jukeboxentity.cpp +++ b/LEGO1/lego/legoomni/src/actors/jukeboxentity.cpp @@ -30,9 +30,12 @@ JukeBoxEntity::~JukeBoxEntity() } // FUNCTION: LEGO1 0x10085e40 +// FUNCTION: BETA10 0x10038c37 MxLong JukeBoxEntity::Notify(MxParam& p_param) { - if (((MxNotificationParam&) p_param).GetNotification() == c_notificationClick) { + MxNotificationParam& param = (MxNotificationParam&) p_param; + + if (param.GetNotification() == c_notificationClick) { if (!FUN_1003ef60()) { return 1; } diff --git a/LEGO1/lego/legoomni/src/actors/radio.cpp b/LEGO1/lego/legoomni/src/actors/radio.cpp index 3a22ed16..4b84a430 100644 --- a/LEGO1/lego/legoomni/src/actors/radio.cpp +++ b/LEGO1/lego/legoomni/src/actors/radio.cpp @@ -81,12 +81,14 @@ Radio::~Radio() } // FUNCTION: LEGO1 0x1002ca30 +// FUNCTION: BETA10 0x100f19e8 MxLong Radio::Notify(MxParam& p_param) { MxLong result = 0; if (m_unk0x0c) { - switch (((MxNotificationParam&) p_param).GetNotification()) { + MxNotificationParam& param = (MxNotificationParam&) p_param; + switch (param.GetNotification()) { case c_notificationEndAction: result = HandleEndAction((MxEndActionNotificationParam&) p_param); break; diff --git a/LEGO1/lego/legoomni/src/actors/towtrack.cpp b/LEGO1/lego/legoomni/src/actors/towtrack.cpp index 65ab9105..c329094d 100644 --- a/LEGO1/lego/legoomni/src/actors/towtrack.cpp +++ b/LEGO1/lego/legoomni/src/actors/towtrack.cpp @@ -113,11 +113,13 @@ void TowTrack::CreateState() } // FUNCTION: LEGO1 0x1004cc80 +// FUNCTION: BETA10 0x100f6de2 MxLong TowTrack::Notify(MxParam& p_param) { MxLong result = 0; + MxNotificationParam& param = (MxNotificationParam&) p_param; - switch (((MxNotificationParam&) p_param).GetNotification()) { + switch (param.GetNotification()) { case c_notificationType0: result = HandleNotification0(); break; diff --git a/LEGO1/lego/legoomni/src/entity/act2policestation.cpp b/LEGO1/lego/legoomni/src/entity/act2policestation.cpp index 0d95454f..0a0f7811 100644 --- a/LEGO1/lego/legoomni/src/entity/act2policestation.cpp +++ b/LEGO1/lego/legoomni/src/entity/act2policestation.cpp @@ -9,9 +9,12 @@ DECOMP_SIZE_ASSERT(Act2PoliceStation, 0x68) // FUNCTION: LEGO1 0x1004e0e0 +// FUNCTION: BETA10 0x100137c0 MxLong Act2PoliceStation::Notify(MxParam& p_param) { - if (((MxNotificationParam&) p_param).GetNotification() == c_notificationClick) { + MxNotificationParam& param = (MxNotificationParam&) p_param; + + if (param.GetNotification() == c_notificationClick) { MxNotificationParam param(c_notificationType23, NULL); NotificationManager()->Send(CurrentWorld(), param); return 1; diff --git a/LEGO1/lego/legoomni/src/entity/legocameracontroller.cpp b/LEGO1/lego/legoomni/src/entity/legocameracontroller.cpp index bd757bd5..b9d76039 100644 --- a/LEGO1/lego/legoomni/src/entity/legocameracontroller.cpp +++ b/LEGO1/lego/legoomni/src/entity/legocameracontroller.cpp @@ -38,6 +38,7 @@ MxResult LegoCameraController::Create() } // FUNCTION: LEGO1 0x10012020 +// FUNCTION: BETA10 0x10067852 MxLong LegoCameraController::Notify(MxParam& p_param) { switch (((MxNotificationParam&) p_param).GetNotification()) { diff --git a/LEGO1/lego/legoomni/src/worlds/elevatorbottom.cpp b/LEGO1/lego/legoomni/src/worlds/elevatorbottom.cpp index 8fefddf4..d8f7a05b 100644 --- a/LEGO1/lego/legoomni/src/worlds/elevatorbottom.cpp +++ b/LEGO1/lego/legoomni/src/worlds/elevatorbottom.cpp @@ -52,13 +52,15 @@ MxResult ElevatorBottom::Create(MxDSAction& p_dsAction) } // FUNCTION: LEGO1 0x10018150 +// FUNCTION: BETA10 0x10027d60 MxLong ElevatorBottom::Notify(MxParam& p_param) { + MxNotificationParam& param = (MxNotificationParam&) p_param; MxLong ret = 0; LegoWorld::Notify(p_param); if (m_worldStarted) { - switch (((MxNotificationParam&) p_param).GetNotification()) { + switch (param.GetNotification()) { case c_notificationControl: ret = HandleControl((LegoControlManagerNotificationParam&) p_param); break; diff --git a/LEGO1/lego/legoomni/src/worlds/gasstation.cpp b/LEGO1/lego/legoomni/src/worlds/gasstation.cpp index ebdf7d4a..43d03cc7 100644 --- a/LEGO1/lego/legoomni/src/worlds/gasstation.cpp +++ b/LEGO1/lego/legoomni/src/worlds/gasstation.cpp @@ -100,13 +100,15 @@ MxResult GasStation::Create(MxDSAction& p_dsAction) } // FUNCTION: LEGO1 0x10004a60 +// FUNCTION: BETA10 0x10028883 MxLong GasStation::Notify(MxParam& p_param) { + MxNotificationParam& param = (MxNotificationParam&) p_param; MxResult result = 0; LegoWorld::Notify(p_param); if (m_worldStarted) { - switch (((MxNotificationParam&) p_param).GetNotification()) { + switch (param.GetNotification()) { case c_notificationEndAction: result = HandleEndAction((MxEndActionNotificationParam&) p_param); break; diff --git a/LEGO1/lego/legoomni/src/worlds/historybook.cpp b/LEGO1/lego/legoomni/src/worlds/historybook.cpp index 39f30d14..cf325825 100644 --- a/LEGO1/lego/legoomni/src/worlds/historybook.cpp +++ b/LEGO1/lego/legoomni/src/worlds/historybook.cpp @@ -68,12 +68,14 @@ MxResult HistoryBook::Create(MxDSAction& p_dsAction) } // FUNCTION: LEGO1 0x10082680 +// FUNCTION: BETA10 0x1002b907 MxLong HistoryBook::Notify(MxParam& p_param) { + MxNotificationParam& param = (MxNotificationParam&) p_param; LegoWorld::Notify(p_param); if (m_worldStarted) { - switch (((MxNotificationParam&) p_param).GetNotification()) { + switch (param.GetNotification()) { case c_notificationButtonUp: m_destLocation = LegoGameState::Area::e_infoscor; TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE); diff --git a/LEGO1/lego/legoomni/src/worlds/infocenter.cpp b/LEGO1/lego/legoomni/src/worlds/infocenter.cpp index 1e248c07..55f0abc8 100644 --- a/LEGO1/lego/legoomni/src/worlds/infocenter.cpp +++ b/LEGO1/lego/legoomni/src/worlds/infocenter.cpp @@ -225,13 +225,15 @@ MxResult Infocenter::Create(MxDSAction& p_dsAction) } // FUNCTION: LEGO1 0x1006ef10 +// FUNCTION: BETA10 0x1002eaca MxLong Infocenter::Notify(MxParam& p_param) { + MxNotificationParam& param = (MxNotificationParam&) p_param; MxLong result = 0; LegoWorld::Notify(p_param); if (m_worldStarted) { - switch (((MxNotificationParam&) p_param).GetNotification()) { + switch (param.GetNotification()) { case c_notificationType0: result = HandleNotification0((MxNotificationParam&) p_param); break; diff --git a/LEGO1/lego/legoomni/src/worlds/infocenterdoor.cpp b/LEGO1/lego/legoomni/src/worlds/infocenterdoor.cpp index 506b21f5..085d76d7 100644 --- a/LEGO1/lego/legoomni/src/worlds/infocenterdoor.cpp +++ b/LEGO1/lego/legoomni/src/worlds/infocenterdoor.cpp @@ -55,13 +55,15 @@ MxResult InfocenterDoor::Create(MxDSAction& p_dsAction) } // FUNCTION: LEGO1 0x100379e0 +// FUNCTION: BETA10 0x10032227 MxLong InfocenterDoor::Notify(MxParam& p_param) { + MxNotificationParam& param = (MxNotificationParam&) p_param; MxLong result = 0; LegoWorld::Notify(p_param); if (m_worldStarted) { - switch (((MxNotificationParam&) p_param).GetNotification()) { + switch (param.GetNotification()) { case c_notificationEndAction: if (((MxEndActionNotificationParam&) p_param).GetAction()->GetAtomId() == m_atomId) { BackgroundAudioManager()->RaiseVolume(); diff --git a/LEGO1/lego/legoomni/src/worlds/isle.cpp b/LEGO1/lego/legoomni/src/worlds/isle.cpp index a01aece9..e7db6a03 100644 --- a/LEGO1/lego/legoomni/src/worlds/isle.cpp +++ b/LEGO1/lego/legoomni/src/worlds/isle.cpp @@ -129,13 +129,15 @@ MxResult Isle::Create(MxDSAction& p_dsAction) } // FUNCTION: LEGO1 0x10030c10 +// FUNCTION: BETA10 0x10032b63 MxLong Isle::Notify(MxParam& p_param) { MxLong result = 0; + MxNotificationParam& param = (MxNotificationParam&) p_param; LegoWorld::Notify(p_param); if (m_worldStarted) { - switch (((MxNotificationParam&) p_param).GetNotification()) { + switch (param.GetNotification()) { case c_notificationEndAction: result = HandleEndAction((MxEndActionNotificationParam&) p_param); break; @@ -468,6 +470,7 @@ void Isle::UpdateGlobe() } // FUNCTION: LEGO1 0x100315f0 +// FUNCTION: BETA10 0x10033e46 MxLong Isle::HandlePathStruct(LegoPathStructNotificationParam& p_param) { MxLong result = 0; diff --git a/LEGO1/lego/legoomni/src/worlds/jukebox.cpp b/LEGO1/lego/legoomni/src/worlds/jukebox.cpp index fe476499..e7193307 100644 --- a/LEGO1/lego/legoomni/src/worlds/jukebox.cpp +++ b/LEGO1/lego/legoomni/src/worlds/jukebox.cpp @@ -68,13 +68,15 @@ MxResult JukeBox::Create(MxDSAction& p_dsAction) } // FUNCTION: LEGO1 0x1005d980 +// FUNCTION: BETA10 0x10037daf MxLong JukeBox::Notify(MxParam& p_param) { MxLong result = 0; + MxNotificationParam& param = (MxNotificationParam&) p_param; LegoWorld::Notify(p_param); if (m_worldStarted) { - switch (((MxNotificationParam&) p_param).GetNotification()) { + switch (param.GetNotification()) { case c_notificationControl: result = HandleControl((LegoControlManagerNotificationParam&) p_param); break; diff --git a/LEGO1/lego/legoomni/src/worlds/police.cpp b/LEGO1/lego/legoomni/src/worlds/police.cpp index 43bd67bf..7bf48e9b 100644 --- a/LEGO1/lego/legoomni/src/worlds/police.cpp +++ b/LEGO1/lego/legoomni/src/worlds/police.cpp @@ -69,13 +69,15 @@ MxResult Police::Create(MxDSAction& p_dsAction) } // FUNCTION: LEGO1 0x1005e480 +// FUNCTION: BETA10 0x100f04a3 MxLong Police::Notify(MxParam& p_param) { MxLong result = 0; + MxNotificationParam& param = (MxNotificationParam&) p_param; LegoWorld::Notify(p_param); if (m_worldStarted) { - switch (((MxNotificationParam&) p_param).GetNotification()) { + switch (param.GetNotification()) { case c_notificationEndAction: result = HandleEndAction((MxEndActionNotificationParam&) p_param); break; diff --git a/LEGO1/lego/legoomni/src/worlds/registrationbook.cpp b/LEGO1/lego/legoomni/src/worlds/registrationbook.cpp index a1451cb6..950e0b2e 100644 --- a/LEGO1/lego/legoomni/src/worlds/registrationbook.cpp +++ b/LEGO1/lego/legoomni/src/worlds/registrationbook.cpp @@ -108,13 +108,15 @@ MxResult RegistrationBook::Create(MxDSAction& p_dsAction) } // FUNCTION: LEGO1 0x100770e0 +// FUNCTION: BETA10 0x100f2d98 MxLong RegistrationBook::Notify(MxParam& p_param) { + MxNotificationParam& param = (MxNotificationParam&) p_param; MxLong result = 0; LegoWorld::Notify(p_param); if (m_worldStarted) { - switch (((MxNotificationParam&) p_param).GetNotification()) { + switch (param.GetNotification()) { case c_notificationEndAction: result = HandleEndAction((MxEndActionNotificationParam&) p_param); break; diff --git a/LEGO1/lego/legoomni/src/worlds/score.cpp b/LEGO1/lego/legoomni/src/worlds/score.cpp index 3ecae676..e58d57aa 100644 --- a/LEGO1/lego/legoomni/src/worlds/score.cpp +++ b/LEGO1/lego/legoomni/src/worlds/score.cpp @@ -84,13 +84,16 @@ void Score::DeleteScript() } // FUNCTION: LEGO1 0x10001410 +// FUNCTION: BETA10 0x100f4398 MxLong Score::Notify(MxParam& p_param) { MxLong ret = 0; + MxNotificationParam& param = (MxNotificationParam&) p_param; + LegoWorld::Notify(p_param); if (m_worldStarted) { - switch (((MxNotificationParam&) p_param).GetNotification()) { + switch (param.GetNotification()) { case c_notificationStartAction: Paint(); ret = 1;