Update legoactioncontrolpresenter.cpp (#416)

This commit is contained in:
Misha 2024-01-07 17:03:04 -05:00 committed by GitHub
parent fbe7f8bbb0
commit 4c0de81b6a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4,22 +4,45 @@
#include "extra.h" #include "extra.h"
#include "legoomni.h" #include "legoomni.h"
#include "legoutil.h" #include "legoutil.h"
#include "mxcompositepresenter.h"
#include "mxmediapresenter.h" #include "mxmediapresenter.h"
#include "mxomni.h" #include "mxomni.h"
#include "mxstreamchunk.h"
#include "mxticklemanager.h" #include "mxticklemanager.h"
DECOMP_SIZE_ASSERT(LegoActionControlPresenter, 0x68) DECOMP_SIZE_ASSERT(LegoActionControlPresenter, 0x68)
// STUB: LEGO1 0x10043ce0 // FUNCTION: LEGO1 0x10043ce0
void LegoActionControlPresenter::ReadyTickle() 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() 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 // FUNCTION: LEGO1 0x10043df0