From 58b5a2b96d8ff3b9a192f4b13a5ba76c39a3e607 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Fri, 30 May 2025 21:23:54 +0200 Subject: [PATCH] Allow entering helicopter build minigame (#204) * LegoCarBuild: cast c_notificationType0 to MxNotificationParam * MxBackgroundAuioManager gets a MxWavePresenter --- LEGO1/lego/legoomni/include/legocarbuild.h | 2 +- LEGO1/lego/legoomni/src/audio/mxbackgroundaudiomanager.cpp | 4 ++-- LEGO1/lego/legoomni/src/build/legocarbuild.cpp | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/LEGO1/lego/legoomni/include/legocarbuild.h b/LEGO1/lego/legoomni/include/legocarbuild.h index 9d7bc511..1baef66d 100644 --- a/LEGO1/lego/legoomni/include/legocarbuild.h +++ b/LEGO1/lego/legoomni/include/legocarbuild.h @@ -145,7 +145,7 @@ public: undefined4 FUN_100246e0(MxLong p_x, MxLong p_y); MxS32 FUN_10024850(MxLong p_x, MxLong p_y); undefined4 FUN_10024890(MxParam* p_param); - undefined4 FUN_10024c20(LegoEventNotificationParam* p_param); + undefined4 FUN_10024c20(MxNotificationParam* p_param); void FUN_10024ef0(); void FUN_10024f30(); void FUN_10024f50(); diff --git a/LEGO1/lego/legoomni/src/audio/mxbackgroundaudiomanager.cpp b/LEGO1/lego/legoomni/src/audio/mxbackgroundaudiomanager.cpp index 040a7e42..8b90d39b 100644 --- a/LEGO1/lego/legoomni/src/audio/mxbackgroundaudiomanager.cpp +++ b/LEGO1/lego/legoomni/src/audio/mxbackgroundaudiomanager.cpp @@ -3,7 +3,6 @@ #include "legomain.h" #include "misc.h" #include "mxaudiopresenter.h" -#include "mxcompositepresenter.h" #include "mxdssound.h" #include "mxmisc.h" #include "mxnotificationmanager.h" @@ -11,6 +10,7 @@ #include "mxstreamer.h" #include "mxticklemanager.h" #include "mxutilities.h" +#include "mxwavepresenter.h" DECOMP_SIZE_ASSERT(MxBackgroundAudioManager, 0x150) @@ -356,7 +356,7 @@ MxResult MxBackgroundAudioManager::SetPendingPresenter( m_pendingPresenter = (MxAudioPresenter*) p_presenter; m_targetVolume = ((MxDSSound*) m_pendingPresenter->GetAction())->GetVolume(); - ((MxCompositePresenter*) m_pendingPresenter)->VTable0x60(NULL); + ((MxWavePresenter*) m_pendingPresenter)->SetVolume(0); m_speed = p_speed; m_tickleState = p_tickleState; diff --git a/LEGO1/lego/legoomni/src/build/legocarbuild.cpp b/LEGO1/lego/legoomni/src/build/legocarbuild.cpp index 79a3194d..bc731fee 100644 --- a/LEGO1/lego/legoomni/src/build/legocarbuild.cpp +++ b/LEGO1/lego/legoomni/src/build/legocarbuild.cpp @@ -659,7 +659,7 @@ MxLong LegoCarBuild::Notify(MxParam& p_param) if (m_worldStarted) { switch (param.GetNotification()) { case c_notificationType0: - FUN_10024c20((LegoEventNotificationParam*) &p_param); + FUN_10024c20((MxNotificationParam*) &p_param); result = 1; break; case c_notificationEndAction: @@ -1150,7 +1150,7 @@ undefined4 LegoCarBuild::FUN_10024890(MxParam* p_param) // FUNCTION: LEGO1 0x10024c20 // FUNCTION: BETA10 0x1006db21 -undefined4 LegoCarBuild::FUN_10024c20(LegoEventNotificationParam* p_param) +undefined4 LegoCarBuild::FUN_10024c20(MxNotificationParam* p_param) { LegoEntity* entity; assert(m_buildState);