From 4c0de81b6a4d82d094ea890188fd13c783fd12cf Mon Sep 17 00:00:00 2001 From: Misha <106913236+MishaProductions@users.noreply.github.com> Date: Sun, 7 Jan 2024 17:03:04 -0500 Subject: [PATCH] Update legoactioncontrolpresenter.cpp (#416) --- LEGO1/legoactioncontrolpresenter.cpp | 31 ++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/LEGO1/legoactioncontrolpresenter.cpp b/LEGO1/legoactioncontrolpresenter.cpp index 88c3143f20..5f4867ea74 100644 --- a/LEGO1/legoactioncontrolpresenter.cpp +++ b/LEGO1/legoactioncontrolpresenter.cpp @@ -4,22 +4,45 @@ #include "extra.h" #include "legoomni.h" #include "legoutil.h" +#include "mxcompositepresenter.h" #include "mxmediapresenter.h" #include "mxomni.h" +#include "mxstreamchunk.h" #include "mxticklemanager.h" DECOMP_SIZE_ASSERT(LegoActionControlPresenter, 0x68) -// STUB: LEGO1 0x10043ce0 +// FUNCTION: LEGO1 0x10043ce0 void LegoActionControlPresenter::ReadyTickle() { - // TODO + MxStreamChunk* chunk = NextChunk(); + + if (chunk) { + ParseExtra(); + m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState; + m_currentTickleState = TickleState_Starting; + + m_subscriber->FUN_100b8390(chunk); + if (m_compositePresenter) { + if (m_action->GetDuration() == -1 || m_action->GetFlags() & 1) { + m_compositePresenter->VTable0x60(this); + } + } + } } -// STUB: LEGO1 0x10043d40 +// FUNCTION: LEGO1 0x10043d40 void LegoActionControlPresenter::RepeatingTickle() { - // TODO + if (IsEnabled()) { + if (m_unk0x50 == 0) { + ParseExtra(); + } + + InvokeAction(m_unk0x50, MxAtomId(m_unk0x54.GetData(), LookupMode_LowerCase2), m_unk0x64, NULL); + m_previousTickleStates |= 1 << (unsigned char) m_currentTickleState; + m_currentTickleState = TickleState_Done; + } } // FUNCTION: LEGO1 0x10043df0