Use List template

This commit is contained in:
Nathan 2024-03-15 15:53:13 -04:00
parent a351a15a07
commit 7e652415f4
2 changed files with 106 additions and 90 deletions

View File

@ -4,6 +4,7 @@
#include "animstate.h" #include "animstate.h"
#include "decomp.h" #include "decomp.h"
#include "mxcore.h" #include "mxcore.h"
#include "traninfo.h"
// SIZE 0x18 // SIZE 0x18
struct Character { struct Character {
@ -12,68 +13,6 @@ struct Character {
MxBool m_active; // 0x14 MxBool m_active; // 0x14
}; };
void LegoUnknown100d8ca8Handler();
void LegoUnknown100d8cd8Handler();
// VTABLE: LEGO1 0x100d8ca8
// SIZE 0x10
class LegoUnknown100d8ca8 : public MxCore {
public:
inline LegoUnknown100d8ca8()
{
m_unk0x8 = 0;
SetHandler(LegoUnknown100d8ca8Handler);
}
// FUNCTION: LEGO1 0x1005fdf0
virtual MxU8 VTable0x14() { return 0; }
inline void SetHandler(void (*p_handler)()) { m_unk0xc = p_handler; }
// SYNTHETIC: LEGO1 0x1005ffb0
// LegoUnknown100d8ca8::`scalar deleting destructor'
private:
MxU32 m_unk0x8; // 0x08
void (*m_unk0xc)(); // 0x0c
};
// VTABLE: LEGO1 0x100d8cc0
// SIZE 0x18
class LegoUnknown100d8cc0 : public LegoUnknown100d8ca8 {
public:
inline LegoUnknown100d8cc0() { m_unk0x10 = m_unk0x14 = 0; }
// SYNTHETIC: LEGO1 0x10060020
// LegoUnknown100d8cc0::`scalar deleting destructor'
private:
MxU32 m_unk0x10; // 0x10
MxU32 m_unk0x14; // 0x14
};
// VTABLE: LEGO1 0x100d8cd8
// SIZE 0x18
class LegoUnknown100d8cd8 : public LegoUnknown100d8cc0 {
public:
inline LegoUnknown100d8cd8(MxBool p_mode) { SetHandler(p_mode); }
inline void SetHandler(MxBool p_mode)
{
LegoUnknown100d8ca8::SetHandler(p_mode ? LegoUnknown100d8cd8Handler : LegoUnknown100d8ca8Handler);
}
// SYNTHETIC: LEGO1 0x100600d0
// LegoUnknown100d8cd8::`scalar deleting destructor'
};
// VTABLE: LEGO1 0x100d8c90
// SIZE 0x18
class LegoUnknown100d8c90 : public LegoUnknown100d8cd8 {
public:
inline LegoUnknown100d8c90() : LegoUnknown100d8cd8(FALSE) {}
// SYNTHETIC: LEGO1 0x1005fef0
// LegoUnknown100d8c90::`scalar deleting destructor'
};
// VTABLE: LEGO1 0x100d8c18 // VTABLE: LEGO1 0x100d8c18
// SIZE 0x500 // SIZE 0x500
class LegoAnimationManager : public MxCore { class LegoAnimationManager : public MxCore {
@ -125,8 +64,8 @@ class LegoAnimationManager : public MxCore {
MxU32 m_unk0x10; // 0x10 MxU32 m_unk0x10; // 0x10
AnimInfo* m_anims; // 0x14 AnimInfo* m_anims; // 0x14
undefined m_unk0x018[8]; // 0x18 undefined m_unk0x018[8]; // 0x18
LegoUnknown100d8c90* m_tranInfoList; // 0x20 TranInfoList* m_tranInfoList; // 0x20
LegoUnknown100d8c90* m_tranInfoList2; // 0x24 TranInfoList* m_tranInfoList2; // 0x24
undefined4 m_unk0x28[2]; // 0x28 undefined4 m_unk0x28[2]; // 0x28
undefined4 m_unk0x30[2]; // 0x30 undefined4 m_unk0x30[2]; // 0x30
undefined m_unk0x38; // 0x38 undefined m_unk0x38; // 0x38

View File

@ -0,0 +1,77 @@
#ifndef TRANINFO_H
#define TRANINFO_H
#include "mxlist.h"
#include "mxtypes.h"
// SIZE 0x78
struct TranInfo { // See FUN_100609f0 for construction
undefined m_unk0x00[0x78]; // 0x00
};
// VTABLE: LEGO1 0x100d8c90
// SIZE 0x18
class TranInfoList : public MxPtrList<TranInfo> {
public:
TranInfoList(MxBool p_ownership = FALSE) : MxPtrList<TranInfo>(p_ownership) {}
};
// VTABLE: LEGO1 0x100d8ca8
// class MxCollection<TranInfo *>
// VTABLE: LEGO1 0x100d8cc0
// class MxList<TranInfo *>
// VTABLE: LEGO1 0x100d8cd8
// class MxPtrList<TranInfo>
// VTABLE: LEGO1 0x100d8cf0
// class MxListCursor<TranInfo *>
// VTABLE: LEGO1 0x100d8d08
// class MxPtrListCursor<TranInfo>
// VTABLE: LEGO1 0x100d8d20
// SIZE 0x10
class TranInfoListCursor : public MxPtrListCursor<TranInfo> {
public:
TranInfoListCursor(TranInfoList* p_list) : MxPtrListCursor<TranInfo>(p_list) {}
};
// TEMPLATE: LEGO1 0x1005fdf0
// MxCollection<TranInfo *>::Compare
// TEMPLATE: LEGO1 0x1005fe50
// MxCollection<TranInfo *>::Destroy
// SYNTHETIC: LEGO1 0x1005fef0
// TranInfoList::`scalar deleting destructor'
// SYNTHETIC: LEGO1 0x1005ffb0
// MxCollection<TranInfo *>::`scalar deleting destructor'
// SYNTHETIC: LEGO1 0x10060020
// MxList<TranInfo *>::`scalar deleting destructor'
// SYNTHETIC: LEGO1 0x100600d0
// MxPtrList<TranInfo>::`scalar deleting destructor'
// SYNTHETIC: LEGO1 0x100612f0
// TranInfoListCursor::`scalar deleting destructor'
// SYNTHETIC: LEGO1 0x10061360
// MxPtrListCursor<TranInfo>::~MxPtrListCursor<TranInfo>
// SYNTHETIC: LEGO1 0x100613b0
// MxListCursor<TranInfo *>::`scalar deleting destructor'
// SYNTHETIC: LEGO1 0x10061420
// MxPtrListCursor<TranInfo>::`scalar deleting destructor'
// TEMPLATE: LEGO1 0x10061490
// MxListCursor<TranInfo *>::~MxListCursor<TranInfo *>
// TEMPLATE: LEGO1 0x100614e0
// TranInfoListCursor::~TranInfoListCursor
#endif // TranInfoLIST_H