LegoLocomotionAnimPresenter

This commit is contained in:
Misha 2024-01-21 07:47:10 -05:00
parent b4bc0e51c9
commit d1b5bbb6a4
No known key found for this signature in database
GPG Key ID: 8441D12AEF33FED8
3 changed files with 69 additions and 18 deletions

View File

@ -42,7 +42,7 @@ class LegoAnimPresenter : public MxVideoPresenter {
// 6 more virtual functions here
private:
protected:
void Init();
void Destroy(MxBool p_fromDestructor);

View File

@ -4,6 +4,7 @@
#include "legoloopinganimpresenter.h"
// VTABLE: LEGO1 0x100d9170
// SIZE 0xD8
class LegoLocomotionAnimPresenter : public LegoLoopingAnimPresenter {
public:
LegoLocomotionAnimPresenter();
@ -35,6 +36,14 @@ class LegoLocomotionAnimPresenter : public LegoLoopingAnimPresenter {
private:
void Init();
void Destroy(MxBool p_fromDestructor);
undefined4 m_unk0xc0; // 0xc0
undefined4* m_unk0xc4; // 0xc4
MxCore* m_unk0xc8; // 0xc8
MxS32 m_unk0xcc; // 0xcc
MxS32 m_unk0xd0; // 0xd0
undefined2 m_unk0xd4; // 0xd4
};
#endif // LEGOLOCOMOTIONANIMPRESENTER_H

View File

@ -1,63 +1,105 @@
#include "legolocomotionanimpresenter.h"
#include "legoomni.h"
#include "legoworld.h"
// FUNCTION: LEGO1 0x1006cdd0
LegoLocomotionAnimPresenter::LegoLocomotionAnimPresenter()
{
Init();
}
// STUB: LEGO1 0x1006d0b0
// FUNCTION: LEGO1 0x1006d0b0
void LegoLocomotionAnimPresenter::Init()
{
// TODO
m_unk0xc0 = 0;
m_unk0xc4 = 0;
m_unk0xd4 = 0;
m_unk0xcc = -1;
m_unk0xd0 = -1;
m_unk0xc8 = 0;
}
// STUB: LEGO1 0x1006d140
// 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();
}
}