2023-06-29 04:10:08 -04:00
|
|
|
#include "legolocomotionanimpresenter.h"
|
|
|
|
|
2024-01-21 09:58:15 -05:00
|
|
|
#include "legoomni.h"
|
|
|
|
#include "legoworld.h"
|
|
|
|
|
|
|
|
DECOMP_SIZE_ASSERT(LegoLocomotionAnimPresenter, 0xd8)
|
|
|
|
|
2023-12-06 07:10:45 -05:00
|
|
|
// FUNCTION: LEGO1 0x1006cdd0
|
2023-06-29 04:10:08 -04:00
|
|
|
LegoLocomotionAnimPresenter::LegoLocomotionAnimPresenter()
|
|
|
|
{
|
2023-10-24 19:38:27 -04:00
|
|
|
Init();
|
2023-06-29 04:10:08 -04:00
|
|
|
}
|
|
|
|
|
2024-01-21 09:58:15 -05:00
|
|
|
// FUNCTION: LEGO1 0x1006d050
|
|
|
|
LegoLocomotionAnimPresenter::~LegoLocomotionAnimPresenter()
|
|
|
|
{
|
|
|
|
Destroy(TRUE);
|
|
|
|
}
|
|
|
|
|
|
|
|
// FUNCTION: LEGO1 0x1006d0b0
|
2023-06-29 04:10:08 -04:00
|
|
|
void LegoLocomotionAnimPresenter::Init()
|
|
|
|
{
|
2024-01-21 09:58:15 -05:00
|
|
|
m_unk0xc0 = 0;
|
|
|
|
m_unk0xc4 = 0;
|
|
|
|
m_unk0xcc = -1;
|
|
|
|
m_unk0xd0 = -1;
|
|
|
|
m_unk0xc8 = 0;
|
|
|
|
m_unk0xd4 = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// FUNCTION: LEGO1 0x1006d0e0
|
|
|
|
void LegoLocomotionAnimPresenter::Destroy(MxBool p_fromDestructor)
|
|
|
|
{
|
|
|
|
m_criticalSection.Enter();
|
|
|
|
|
|
|
|
if (m_unk0xc4) {
|
|
|
|
delete[] m_unk0xc4;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (m_unk0xc8) {
|
|
|
|
delete m_unk0xc8;
|
|
|
|
}
|
|
|
|
|
|
|
|
m_unk0x68 = 0;
|
|
|
|
Init();
|
|
|
|
|
|
|
|
m_criticalSection.Leave();
|
|
|
|
|
|
|
|
if (!p_fromDestructor) {
|
|
|
|
LegoAnimPresenter::Destroy();
|
|
|
|
}
|
2023-06-29 04:10:08 -04:00
|
|
|
}
|
2024-01-20 18:04:46 -05:00
|
|
|
|
2024-01-21 09:58:15 -05:00
|
|
|
// FUNCTION: LEGO1 0x1006d140
|
2024-02-25 09:14:39 -05:00
|
|
|
MxResult LegoLocomotionAnimPresenter::CreateAnim(MxStreamChunk* p_chunk)
|
2024-01-20 18:04:46 -05:00
|
|
|
{
|
2024-02-25 09:14:39 -05:00
|
|
|
MxResult result = LegoAnimPresenter::CreateAnim(p_chunk);
|
2024-01-21 09:58:15 -05:00
|
|
|
return result == SUCCESS ? SUCCESS : result;
|
2024-01-20 18:04:46 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
// STUB: LEGO1 0x1006d160
|
|
|
|
MxResult LegoLocomotionAnimPresenter::AddToManager()
|
|
|
|
{
|
2024-01-21 09:58:15 -05:00
|
|
|
return MxVideoPresenter::AddToManager();
|
2024-01-20 18:04:46 -05:00
|
|
|
}
|
|
|
|
|
2024-01-21 09:58:15 -05:00
|
|
|
// FUNCTION: LEGO1 0x1006d5b0
|
2024-01-20 18:04:46 -05:00
|
|
|
void LegoLocomotionAnimPresenter::Destroy()
|
|
|
|
{
|
2024-01-21 09:58:15 -05:00
|
|
|
Destroy(FALSE);
|
2024-01-20 18:04:46 -05:00
|
|
|
}
|
|
|
|
|
2024-01-21 09:58:15 -05:00
|
|
|
// FUNCTION: LEGO1 0x1006d5c0
|
2024-01-20 18:04:46 -05:00
|
|
|
void LegoLocomotionAnimPresenter::PutFrame()
|
|
|
|
{
|
2024-01-21 09:58:15 -05:00
|
|
|
// Empty
|
2024-01-20 18:04:46 -05:00
|
|
|
}
|
|
|
|
|
2024-01-21 09:58:15 -05:00
|
|
|
// FUNCTION: LEGO1 0x1006d5d0
|
2024-01-20 18:04:46 -05:00
|
|
|
void LegoLocomotionAnimPresenter::ReadyTickle()
|
|
|
|
{
|
2024-01-21 09:58:15 -05:00
|
|
|
LegoAnimPresenter::ReadyTickle();
|
|
|
|
|
|
|
|
if (m_currentWorld != NULL && m_currentTickleState == e_starting) {
|
2024-01-26 16:00:02 -05:00
|
|
|
m_currentWorld->Add(this);
|
2024-01-21 09:58:15 -05:00
|
|
|
if (m_compositePresenter != NULL) {
|
|
|
|
SendToCompositePresenter(Lego());
|
|
|
|
}
|
|
|
|
|
|
|
|
m_unk0xd4++;
|
|
|
|
}
|
2024-01-20 18:04:46 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
// STUB: LEGO1 0x1006d610
|
|
|
|
void LegoLocomotionAnimPresenter::StartingTickle()
|
|
|
|
{
|
|
|
|
// TODO
|
2024-01-21 09:58:15 -05:00
|
|
|
EndAction();
|
2024-01-20 18:04:46 -05:00
|
|
|
}
|
|
|
|
|
2024-01-21 09:58:15 -05:00
|
|
|
// FUNCTION: LEGO1 0x1006d660
|
2024-01-20 18:04:46 -05:00
|
|
|
void LegoLocomotionAnimPresenter::StreamingTickle()
|
|
|
|
{
|
2024-01-21 09:58:15 -05:00
|
|
|
if (m_unk0xd4 == 0) {
|
|
|
|
EndAction();
|
|
|
|
}
|
2024-01-20 18:04:46 -05:00
|
|
|
}
|
|
|
|
|
2024-01-21 09:58:15 -05:00
|
|
|
// FUNCTION: LEGO1 0x1006d670
|
2024-01-20 18:04:46 -05:00
|
|
|
void LegoLocomotionAnimPresenter::EndAction()
|
|
|
|
{
|
2024-01-21 09:58:15 -05:00
|
|
|
if (m_action) {
|
|
|
|
MxVideoPresenter::EndAction();
|
|
|
|
}
|
2024-01-20 18:04:46 -05:00
|
|
|
}
|