mirror of
https://github.com/isledecomp/isle.git
synced 2024-12-20 21:12:43 -05:00
1b1d2ecde6
* Refactor LegoOmni into LegoMain/Scripts * Fix guard
121 lines
2.2 KiB
C++
121 lines
2.2 KiB
C++
#include "legolocomotionanimpresenter.h"
|
|
|
|
#include "legomain.h"
|
|
#include "legoworld.h"
|
|
#include "misc.h"
|
|
|
|
DECOMP_SIZE_ASSERT(LegoLocomotionAnimPresenter, 0xd8)
|
|
|
|
// FUNCTION: LEGO1 0x1006cdd0
|
|
LegoLocomotionAnimPresenter::LegoLocomotionAnimPresenter()
|
|
{
|
|
Init();
|
|
}
|
|
|
|
// FUNCTION: LEGO1 0x1006d050
|
|
LegoLocomotionAnimPresenter::~LegoLocomotionAnimPresenter()
|
|
{
|
|
Destroy(TRUE);
|
|
}
|
|
|
|
// FUNCTION: LEGO1 0x1006d0b0
|
|
void LegoLocomotionAnimPresenter::Init()
|
|
{
|
|
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_roiMap = NULL;
|
|
Init();
|
|
|
|
m_criticalSection.Leave();
|
|
|
|
if (!p_fromDestructor) {
|
|
LegoAnimPresenter::Destroy();
|
|
}
|
|
}
|
|
|
|
// FUNCTION: LEGO1 0x1006d140
|
|
MxResult LegoLocomotionAnimPresenter::CreateAnim(MxStreamChunk* p_chunk)
|
|
{
|
|
MxResult result = LegoAnimPresenter::CreateAnim(p_chunk);
|
|
return result == SUCCESS ? SUCCESS : result;
|
|
}
|
|
|
|
// STUB: LEGO1 0x1006d160
|
|
MxResult LegoLocomotionAnimPresenter::AddToManager()
|
|
{
|
|
return MxVideoPresenter::AddToManager();
|
|
}
|
|
|
|
// FUNCTION: LEGO1 0x1006d5b0
|
|
void LegoLocomotionAnimPresenter::Destroy()
|
|
{
|
|
Destroy(FALSE);
|
|
}
|
|
|
|
// FUNCTION: LEGO1 0x1006d5c0
|
|
void LegoLocomotionAnimPresenter::PutFrame()
|
|
{
|
|
// Empty
|
|
}
|
|
|
|
// FUNCTION: LEGO1 0x1006d5d0
|
|
void LegoLocomotionAnimPresenter::ReadyTickle()
|
|
{
|
|
LegoAnimPresenter::ReadyTickle();
|
|
|
|
if (m_currentWorld != NULL && m_currentTickleState == e_starting) {
|
|
m_currentWorld->Add(this);
|
|
if (m_compositePresenter != NULL) {
|
|
SendToCompositePresenter(Lego());
|
|
}
|
|
|
|
m_unk0xd4++;
|
|
}
|
|
}
|
|
|
|
// STUB: LEGO1 0x1006d610
|
|
void LegoLocomotionAnimPresenter::StartingTickle()
|
|
{
|
|
// TODO
|
|
}
|
|
|
|
// FUNCTION: LEGO1 0x1006d660
|
|
void LegoLocomotionAnimPresenter::StreamingTickle()
|
|
{
|
|
if (m_unk0xd4 == 0) {
|
|
EndAction();
|
|
}
|
|
}
|
|
|
|
// FUNCTION: LEGO1 0x1006d670
|
|
void LegoLocomotionAnimPresenter::EndAction()
|
|
{
|
|
if (m_action) {
|
|
MxVideoPresenter::EndAction();
|
|
}
|
|
}
|
|
|
|
// STUB: LEGO1 0x1006d680
|
|
void LegoLocomotionAnimPresenter::FUN_1006d680(LegoAnimActor* p_actor, MxFloat p_value)
|
|
{
|
|
// TODO
|
|
}
|