mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-24 08:54:15 +00:00
begin LegoLocomotionAnimPresenter (#474)
* LegoLocomotionAnimPresenter * Fix game startup * Fixes * Add size assert --------- Co-authored-by: Christian Semmler <mail@csemmler.com>
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#include "mxcompositepresenter.h"
|
||||
#include "mxdsanim.h"
|
||||
#include "mxstreamchunk.h"
|
||||
#include "mxvideomanager.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(LegoAnimPresenter, 0xc0)
|
||||
DECOMP_SIZE_ASSERT(LegoAnimClassBase, 0x08)
|
||||
@@ -161,11 +162,10 @@ void LegoAnimPresenter::DoneTickle()
|
||||
// TODO
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x1006b8d0
|
||||
// FUNCTION: LEGO1 0x1006b8d0
|
||||
MxResult LegoAnimPresenter::AddToManager()
|
||||
{
|
||||
// TODO
|
||||
return SUCCESS;
|
||||
return MxVideoPresenter::AddToManager();
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1006b8e0
|
||||
|
||||
@@ -1,63 +1,115 @@
|
||||
#include "legolocomotionanimpresenter.h"
|
||||
|
||||
#include "legoomni.h"
|
||||
#include "legoworld.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(LegoLocomotionAnimPresenter, 0xd8)
|
||||
|
||||
// FUNCTION: LEGO1 0x1006cdd0
|
||||
LegoLocomotionAnimPresenter::LegoLocomotionAnimPresenter()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x1006d0b0
|
||||
void LegoLocomotionAnimPresenter::Init()
|
||||
// FUNCTION: LEGO1 0x1006d050
|
||||
LegoLocomotionAnimPresenter::~LegoLocomotionAnimPresenter()
|
||||
{
|
||||
// TODO
|
||||
Destroy(TRUE);
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x1006d140
|
||||
// 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_unk0x68 = 0;
|
||||
Init();
|
||||
|
||||
m_criticalSection.Leave();
|
||||
|
||||
if (!p_fromDestructor) {
|
||||
LegoAnimPresenter::Destroy();
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1006d140
|
||||
MxResult LegoLocomotionAnimPresenter::VTable0x88(MxStreamChunk* p_chunk)
|
||||
{
|
||||
// TODO
|
||||
return SUCCESS;
|
||||
MxResult result = LegoAnimPresenter::VTable0x88(p_chunk);
|
||||
return result == SUCCESS ? SUCCESS : result;
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x1006d160
|
||||
MxResult LegoLocomotionAnimPresenter::AddToManager()
|
||||
{
|
||||
// TODO
|
||||
return SUCCESS;
|
||||
return MxVideoPresenter::AddToManager();
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x1006d5b0
|
||||
// FUNCTION: LEGO1 0x1006d5b0
|
||||
void LegoLocomotionAnimPresenter::Destroy()
|
||||
{
|
||||
// TODO
|
||||
Destroy(FALSE);
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x1006d5c0
|
||||
// FUNCTION: LEGO1 0x1006d5c0
|
||||
void LegoLocomotionAnimPresenter::PutFrame()
|
||||
{
|
||||
// TODO
|
||||
// Empty
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x1006d5d0
|
||||
// FUNCTION: LEGO1 0x1006d5d0
|
||||
void LegoLocomotionAnimPresenter::ReadyTickle()
|
||||
{
|
||||
// TODO
|
||||
LegoAnimPresenter::ReadyTickle();
|
||||
|
||||
if (m_currentWorld != NULL && m_currentTickleState == e_starting) {
|
||||
m_currentWorld->VTable0x58(this);
|
||||
if (m_compositePresenter != NULL) {
|
||||
SendToCompositePresenter(Lego());
|
||||
}
|
||||
|
||||
m_unk0xd4++;
|
||||
}
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x1006d610
|
||||
void LegoLocomotionAnimPresenter::StartingTickle()
|
||||
{
|
||||
// TODO
|
||||
EndAction();
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x1006d660
|
||||
// FUNCTION: LEGO1 0x1006d660
|
||||
void LegoLocomotionAnimPresenter::StreamingTickle()
|
||||
{
|
||||
// TODO
|
||||
if (m_unk0xd4 == 0) {
|
||||
EndAction();
|
||||
}
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x1006d670
|
||||
// FUNCTION: LEGO1 0x1006d670
|
||||
void LegoLocomotionAnimPresenter::EndAction()
|
||||
{
|
||||
// TODO
|
||||
if (m_action) {
|
||||
MxVideoPresenter::EndAction();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user