WIP Destroy

This commit is contained in:
Christian Semmler 2024-04-22 10:05:54 -04:00
parent c01fd9b260
commit dc294e43bd
2 changed files with 63 additions and 6 deletions

View File

@ -93,6 +93,7 @@ class LegoAnimPresenter : public MxVideoPresenter {
void FUN_10069b10();
void FUN_1006a3c0(LegoAnimPresenterMap& p_map, LegoTreeNode* p_node, LegoROI* p_roi);
void FUN_1006a4f0(LegoAnimPresenterMap& p_map, LegoAnimNodeData* p_data, const LegoChar* p_und, LegoROI* p_roi);
void FUN_1006aa60();
void FUN_1006ab70();
LegoBool FUN_1006aba0();
MxBool FUN_1006abb0(LegoTreeNode* p_node, LegoROI* p_roi);
@ -111,14 +112,14 @@ class LegoAnimPresenter : public MxVideoPresenter {
MxAtomId m_animAtom; // 0x84
undefined4 m_unk0x88; // 0x88
LegoROI** m_unk0x8c; // 0x8c
const char** m_unk0x90; // 0x90
char** m_unk0x90; // 0x90
MxU8 m_unk0x94; // 0x94
undefined m_unk0x95; // 0x95
MxBool m_unk0x96; // 0x96
undefined m_unk0x97; // 0x97
undefined4 m_unk0x98; // 0x98
MxS16 m_unk0x9c; // 0x9c
undefined4 m_unk0xa0; // 0xa0
undefined4* m_unk0xa0; // 0xa0
undefined4 m_unk0xa4; // 0xa4
Mx3DPointFloat m_unk0xa8; // 0xa8
};

View File

@ -5,6 +5,7 @@
#include "legovideomanager.h"
#include "legoworld.h"
#include "misc.h"
#include "mxautolock.h"
#include "mxcompositepresenter.h"
#include "mxdsanim.h"
#include "mxmisc.h"
@ -51,14 +52,63 @@ void LegoAnimPresenter::Init()
m_unk0x90 = NULL;
m_unk0x94 = 0;
m_unk0x96 = TRUE;
m_unk0xa0 = 0;
m_unk0xa0 = NULL;
}
// STUB: LEGO1 0x10068770
// FUNCTION: LEGO1 0x10068770
// FUNCTION: BETA10 0x1004e833
void LegoAnimPresenter::Destroy(MxBool p_fromDestructor)
{
// TODO
MxVideoPresenter::Destroy(p_fromDestructor);
{
AUTOLOCK(m_criticalSection);
if (m_anim != NULL) {
delete m_anim;
}
if (m_roiMap != NULL) {
delete[] m_roiMap;
}
if (m_unk0x70 != NULL) {
delete m_unk0x70;
}
if (m_unk0x74 != NULL) {
FUN_1006aa60();
delete m_unk0x74;
}
if (m_unk0x78 != NULL) {
delete m_unk0x78;
}
// m_unk0x98 TODO
if (m_unk0x90 != NULL) {
for (MxS32 i = 0; i < m_unk0x94; i++) {
if (m_unk0x90[i] != NULL) {
delete[] m_unk0x90[i];
}
}
delete[] m_unk0x90;
}
if (m_unk0x8c != NULL) {
delete[] m_unk0x8c;
}
if (m_unk0xa0 != NULL) {
delete m_unk0xa0; // TODO
}
Init();
}
if (!p_fromDestructor) {
MxVideoPresenter::Destroy(p_fromDestructor);
}
}
// FUNCTION: LEGO1 0x10068fb0
@ -449,6 +499,12 @@ void LegoAnimPresenter::FUN_1006a4f0(
}
}
// STUB: LEGO1 0x1006aa60
void LegoAnimPresenter::FUN_1006aa60()
{
// TODO
}
// STUB: LEGO1 0x1006ab70
void LegoAnimPresenter::FUN_1006ab70()
{