diff --git a/LEGO1/legoactioncontrolpresenter.cpp b/LEGO1/legoactioncontrolpresenter.cpp index 88c3143f..5f4867ea 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