MxPtrList custom destructor and more offsets

Co-authored-by: Christian Semmler <mail@csemmler.com>
This commit is contained in:
disinvite 2023-11-18 23:55:08 -05:00
parent a07a9ec34d
commit 3def0a0eb7
4 changed files with 47 additions and 1 deletions

View File

@ -11,6 +11,8 @@
// VTABLE 0x100d6338
// SIZE 0x18
class LegoPathControllerList : public MxPtrList<LegoPathController> {
public:
LegoPathControllerList() : MxPtrList<LegoPathController>(Destroy) {}
virtual MxS8 Compare(LegoPathController*, LegoPathController*) override; // vtable+0x14
static void Destroy(LegoPathController*);
};

View File

@ -13,7 +13,7 @@ class MxListCursor;
template <class T>
class MxPtrList : public MxList<T*> {
public:
MxPtrList() { m_customDestructor = Destroy; }
MxPtrList(void (*p_destroy)(T*) = Destroy) { m_customDestructor = p_destroy; }
};
template <class T>

View File

@ -18,6 +18,36 @@ void MxRegionLeftRightList::Destroy(MxRegionLeftRight* p_leftRight)
delete p_leftRight;
}
// OFFSET: LEGO1 0x100c32e0 TEMPLATE
// MxCollection<MxRegionTopBottom *>::Compare
// OFFSET: LEGO1 0x100c3340 TEMPLATE
// MxCollection<MxRegionTopBottom *>::Destroy
// OFFSET: LEGO1 0x100c34d0 TEMPLATE
// MxCollection<MxRegionTopBottom *>::`scalar deleting destructor'
// OFFSET: LEGO1 0x100c3540 TEMPLATE
// MxList<MxRegionTopBottom *>::`scalar deleting destructor'
// OFFSET: LEGO1 0x100c35f0 TEMPLATE
// MxPtrList<MxRegionTopBottom>::`scalar deleting destructor'
// OFFSET: LEGO1 0x100c4d80 TEMPLATE
// MxCollection<MxRegionLeftRight *>::Compare
// OFFSET: LEGO1 0x100c4de0 TEMPLATE
// MxCollection<MxRegionLeftRight *>::Destroy
// OFFSET: LEGO1 0x100c4f50 TEMPLATE
// MxCollection<MxRegionLeftRight *>::`scalar deleting destructor'
// OFFSET: LEGO1 0x100c4fc0 TEMPLATE
// MxList<MxRegionLeftRight *>::`scalar deleting destructor'
// OFFSET: LEGO1 0x100c5070 TEMPLATE
// MxPtrList<MxRegionLeftRight>::`scalar deleting destructor'
// OFFSET: LEGO1 0x100c54f0 TEMPLATE
// MxListCursor<MxRegionLeftRight *>::MxListCursor<MxRegionLeftRight *>

View File

@ -6,6 +6,12 @@
struct MxRegionTopBottom;
struct MxRegionLeftRight;
// VTABLE 0x100dcb10 TEMPLATE
// class MxCollection<MxRegionTopBottom *>
// VTABLE 0x100dcb28 TEMPLATE
// class MxList<MxRegionTopBottom *>
// VTABLE 0x100dcb40 TEMPLATE
// class MxPtrList<MxRegionTopBottom>
@ -13,6 +19,7 @@ struct MxRegionLeftRight;
// SIZE 0x18
class MxRegionList : public MxPtrList<MxRegionTopBottom> {
public:
MxRegionList() : MxPtrList<MxRegionTopBottom>(Destroy) {}
static void Destroy(MxRegionTopBottom*);
};
@ -22,6 +29,12 @@ typedef MxListCursorChildChild<MxRegionTopBottom*> MxRegionListCursor;
// VTABLE 0x100dcc10
typedef MxListCursorChildChild<MxRegionLeftRight*> MxRegionLeftRightListCursor;
// VTABLE 0x100dcc40 TEMPLATE
// class MxCollection<MxRegionLeftRight *>
// VTABLE 0x100dcc58 TEMPLATE
// class MxList<MxRegionLeftRight *>
// VTABLE 0x100dcc70 TEMPLATE
// class MxPtrList<MxRegionLeftRight>
@ -29,6 +42,7 @@ typedef MxListCursorChildChild<MxRegionLeftRight*> MxRegionLeftRightListCursor;
// SIZE 0x18
class MxRegionLeftRightList : public MxPtrList<MxRegionLeftRight> {
public:
MxRegionLeftRightList() : MxPtrList<MxRegionLeftRight>(Destroy) {}
static void Destroy(MxRegionLeftRight*);
};