Move destroy function to list class

This commit is contained in:
Christian Semmler 2023-09-20 09:32:57 -04:00
parent c8f67bb2bb
commit 2a099a04d2
4 changed files with 13 additions and 12 deletions

View File

@ -12,3 +12,10 @@ MxS8 MxDSActionList::Compare(MxDSAction *p_var0, MxDSAction *p_var1)
return 1; return 1;
return -1; return -1;
} }
// OFFSET: LEGO1 0x100c9cb0
void MxDSActionList::Destroy(MxDSAction *p_action)
{
if (p_action)
delete p_action;
}

View File

@ -12,12 +12,15 @@ class MxDSActionList : public MxList<MxDSAction>
{ {
public: public:
MxDSActionList() { MxDSActionList() {
unk18 = 0; this->m_unk18 = 0;
} }
virtual MxS8 Compare(MxDSAction *, MxDSAction *); // +0x14 virtual MxS8 Compare(MxDSAction *, MxDSAction *); // +0x14
undefined unk18; static void Destroy(MxDSAction *p_action);
private:
undefined m_unk18;
}; };
typedef MxListCursorChild<MxDSAction> MxDSActionListCursor; typedef MxListCursorChild<MxDSAction> MxDSActionListCursor;

View File

@ -5,14 +5,7 @@ MxDSMultiAction::MxDSMultiAction()
{ {
this->SetType(MxDSType_MultiAction); this->SetType(MxDSType_MultiAction);
this->m_actions = new MxDSActionList; this->m_actions = new MxDSActionList;
this->m_actions->SetDestroy(MxDSMultiAction::DestroyListElement); this->m_actions->SetDestroy(MxDSActionList::Destroy);
}
// OFFSET: LEGO1 0x100c9cb0
void MxDSMultiAction::DestroyListElement(MxDSAction *p_action)
{
if (p_action)
delete p_action;
} }
// OFFSET: LEGO1 0x100ca060 // OFFSET: LEGO1 0x100ca060

View File

@ -31,8 +31,6 @@ class MxDSMultiAction : public MxDSAction
private: private:
MxU32 m_sizeOnDisk; MxU32 m_sizeOnDisk;
MxDSActionList *m_actions; MxDSActionList *m_actions;
static void DestroyListElement(MxDSAction *p_action);
}; };
#endif // MXDSMULTIACTION_H #endif // MXDSMULTIACTION_H