From a82eb65f489b7b146747c2fdf52162a2db0d7eb1 Mon Sep 17 00:00:00 2001 From: Christian Semmler Date: Fri, 2 Feb 2024 15:52:54 -0500 Subject: [PATCH] Fixes --- LEGO1/lego/legoomni/src/common/legogamestate.cpp | 7 +++++-- LEGO1/lego/legoomni/src/control/legocontrolmanager.cpp | 5 ++--- LEGO1/lego/legoomni/src/infocenter/infocenter.cpp | 2 +- LEGO1/omni/src/common/mxmediapresenter.cpp | 3 +-- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/LEGO1/lego/legoomni/src/common/legogamestate.cpp b/LEGO1/lego/legoomni/src/common/legogamestate.cpp index 3c6b34a9..864bb258 100644 --- a/LEGO1/lego/legoomni/src/common/legogamestate.cpp +++ b/LEGO1/lego/legoomni/src/common/legogamestate.cpp @@ -6,6 +6,7 @@ #include "legostate.h" #include "legoutil.h" #include "legovideomanager.h" +#include "legoworld.h" #include "mxbackgroundaudiomanager.h" #include "mxobjectfactory.h" #include "mxstring.h" @@ -447,6 +448,7 @@ void LegoGameState::SwitchArea(MxU32 p_area) MxAtomId* script = g_isleScript; LegoWorld* world; + switch (p_area) { case 1: break; @@ -465,6 +467,7 @@ void LegoGameState::SwitchArea(MxU32 p_area) case 6: case 7: world = FindWorld(*g_isleScript, 0); + if (world == NULL) { InvokeAction(Extra::ActionType::e_opendisk, *g_isleScript, 0, NULL); } @@ -472,10 +475,10 @@ void LegoGameState::SwitchArea(MxU32 p_area) #ifdef COMPAT_MODE { MxNotificationParam param(c_notificationType20, NULL); - NotificationManager()->Send((MxCore*) world, ¶m); + NotificationManager()->Send(world, ¶m); } #else - NotificationManager()->Send((MxCore*) world, &MxNotificationParam(c_notificationType20, NULL)); + NotificationManager()->Send(world, &MxNotificationParam(c_notificationType20, NULL)); #endif } break; diff --git a/LEGO1/lego/legoomni/src/control/legocontrolmanager.cpp b/LEGO1/lego/legoomni/src/control/legocontrolmanager.cpp index 59b677a6..01d5bb3a 100644 --- a/LEGO1/lego/legoomni/src/control/legocontrolmanager.cpp +++ b/LEGO1/lego/legoomni/src/control/legocontrolmanager.cpp @@ -128,11 +128,10 @@ MxControlPresenter* LegoControlManager::FUN_100294e0(MxS32 p_x, MxS32 p_y) { if (m_presenterList) { MxPresenterListCursor cursor(m_presenterList); - + MxPresenter* control; MxVideoPresenter* presenter = (MxVideoPresenter*) VideoManager()->GetPresenterAt(p_x, p_y); - if (presenter) { - MxPresenter* control; + if (presenter) { while (cursor.Next(control)) { if (((MxControlPresenter*) control)->FUN_10044270(p_x, p_y, presenter)) { return (MxControlPresenter*) control; diff --git a/LEGO1/lego/legoomni/src/infocenter/infocenter.cpp b/LEGO1/lego/legoomni/src/infocenter/infocenter.cpp index 5b8017f8..1a86ef99 100644 --- a/LEGO1/lego/legoomni/src/infocenter/infocenter.cpp +++ b/LEGO1/lego/legoomni/src/infocenter/infocenter.cpp @@ -104,7 +104,7 @@ MxResult Infocenter::Create(MxDSAction& p_dsAction) for (MxS16 i = 0; i < count; i++) { MxStillPresenter* still = m_infocenterState->GetInfocenterBufferElement(i); if (still) { - still->Enable(FALSE); + still->Enable(TRUE); still->SetTickleState(MxPresenter::e_repeating); still->VTable0x88(((7 - count) / 2 + i), 45); } diff --git a/LEGO1/omni/src/common/mxmediapresenter.cpp b/LEGO1/omni/src/common/mxmediapresenter.cpp index 17caece5..48450b58 100644 --- a/LEGO1/omni/src/common/mxmediapresenter.cpp +++ b/LEGO1/omni/src/common/mxmediapresenter.cpp @@ -229,8 +229,7 @@ void MxMediaPresenter::RepeatingTickle() // FUNCTION: LEGO1 0x100b5ef0 void MxMediaPresenter::DoneTickle() { - m_previousTickleStates |= 1 << m_currentTickleState; - m_currentTickleState = e_idle; + ProgressTickleState(e_idle); EndAction(); }