From 924d8660a0060ff6a9cd6cf494704bff5eb8267c Mon Sep 17 00:00:00 2001 From: Misha <106913236+MishaProductions@users.noreply.github.com> Date: Mon, 15 Jan 2024 14:56:55 -0500 Subject: [PATCH] LegoWorldPresenter::VTable0x60 --- .../src/entity/legoworldpresenter.cpp | 21 ++++++++++++++++++- .../legoomni/src/infocenter/infocenter.cpp | 5 +++-- LEGO1/omni/include/mxpresenter.h | 2 +- 3 files changed, 24 insertions(+), 4 deletions(-) diff --git a/LEGO1/lego/legoomni/src/entity/legoworldpresenter.cpp b/LEGO1/lego/legoomni/src/entity/legoworldpresenter.cpp index 1becbad4..bc6528b0 100644 --- a/LEGO1/lego/legoomni/src/entity/legoworldpresenter.cpp +++ b/LEGO1/lego/legoomni/src/entity/legoworldpresenter.cpp @@ -10,6 +10,7 @@ #include "mxactionnotificationparam.h" #include "mxautolocker.h" #include "mxdsactionlist.h" +#include "mxdsmediaaction.h" #include "mxdsmultiaction.h" #include "mxnotificationmanager.h" #include "mxobjectfactory.h" @@ -145,9 +146,27 @@ void LegoWorldPresenter::StartingTickle() ProgressTickleState(TickleState_Streaming); } -// STUB: LEGO1 0x10067a70 +// FUNCTION: LEGO1 0x10067a70 void LegoWorldPresenter::VTable0x60(MxPresenter* p_presenter) { + MxCompositePresenter::VTable0x60(p_presenter); + MxDSAction* action = p_presenter->GetAction(); + + if (action->GetDuration() != -1 && (action->GetFlags() & 1) == 0) { + if (!action->IsA("MxDSMediaAction")) { + return; + } + + if (((MxDSMediaAction*) action)->GetSustainTime() != -1) { + return; + } + } + + if (!p_presenter->IsA("LegoAnimPresenter") && !p_presenter->IsA("MxControlPresenter") && + !p_presenter->IsA("MxCompositePresenter")) { + p_presenter->SendToCompositePresenter(Lego()); + ((LegoWorld*) m_entity)->VTable0x58(p_presenter); + } } // STUB: LEGO1 0x10067b00 diff --git a/LEGO1/lego/legoomni/src/infocenter/infocenter.cpp b/LEGO1/lego/legoomni/src/infocenter/infocenter.cpp index 9201adf9..06367b4d 100644 --- a/LEGO1/lego/legoomni/src/infocenter/infocenter.cpp +++ b/LEGO1/lego/legoomni/src/infocenter/infocenter.cpp @@ -15,6 +15,7 @@ Infocenter::~Infocenter() // STUB: LEGO1 0x1006ed90 MxResult Infocenter::Create(MxDSAction& p_dsAction) { + OutputDebugString("infocenter create\n"); return FAILURE; } @@ -22,7 +23,7 @@ MxResult Infocenter::Create(MxDSAction& p_dsAction) MxLong Infocenter::Notify(MxParam& p_param) { // TODO - return 0; + return LegoWorld::Notify(p_param); } // STUB: LEGO1 0x1006f4e0 @@ -41,7 +42,7 @@ void Infocenter::VTable0x68(MxBool p_add) MxResult Infocenter::Tickle() { // TODO - return 0; + return LegoWorld::Tickle(); } // FUNCTION: LEGO1 0x10070d00 diff --git a/LEGO1/omni/include/mxpresenter.h b/LEGO1/omni/include/mxpresenter.h index 55682f11..a2b083ab 100644 --- a/LEGO1/omni/include/mxpresenter.h +++ b/LEGO1/omni/include/mxpresenter.h @@ -127,10 +127,10 @@ class MxPresenter : public MxCore { { m_compositePresenter = p_compositePresenter; } + void SendToCompositePresenter(MxOmni*); protected: __declspec(dllexport) void Init(); - void SendToCompositePresenter(MxOmni*); TickleState m_currentTickleState; // 0x8 MxU32 m_previousTickleStates; // 0x0c