mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-20 23:01:16 +00:00
Move destroy function to list class
This commit is contained in:
parent
c8f67bb2bb
commit
2a099a04d2
@ -11,4 +11,11 @@ MxS8 MxDSActionList::Compare(MxDSAction *p_var0, MxDSAction *p_var1)
|
||||
if (p_var1 <= p_var0)
|
||||
return 1;
|
||||
return -1;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100c9cb0
|
||||
void MxDSActionList::Destroy(MxDSAction *p_action)
|
||||
{
|
||||
if (p_action)
|
||||
delete p_action;
|
||||
}
|
||||
@ -12,12 +12,15 @@ class MxDSActionList : public MxList<MxDSAction>
|
||||
{
|
||||
public:
|
||||
MxDSActionList() {
|
||||
unk18 = 0;
|
||||
this->m_unk18 = 0;
|
||||
}
|
||||
|
||||
virtual MxS8 Compare(MxDSAction *, MxDSAction *); // +0x14
|
||||
|
||||
undefined unk18;
|
||||
static void Destroy(MxDSAction *p_action);
|
||||
|
||||
private:
|
||||
undefined m_unk18;
|
||||
};
|
||||
|
||||
typedef MxListCursorChild<MxDSAction> MxDSActionListCursor;
|
||||
|
||||
@ -5,14 +5,7 @@ MxDSMultiAction::MxDSMultiAction()
|
||||
{
|
||||
this->SetType(MxDSType_MultiAction);
|
||||
this->m_actions = new MxDSActionList;
|
||||
this->m_actions->SetDestroy(MxDSMultiAction::DestroyListElement);
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100c9cb0
|
||||
void MxDSMultiAction::DestroyListElement(MxDSAction *p_action)
|
||||
{
|
||||
if (p_action)
|
||||
delete p_action;
|
||||
this->m_actions->SetDestroy(MxDSActionList::Destroy);
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100ca060
|
||||
|
||||
@ -31,8 +31,6 @@ class MxDSMultiAction : public MxDSAction
|
||||
private:
|
||||
MxU32 m_sizeOnDisk;
|
||||
MxDSActionList *m_actions;
|
||||
|
||||
static void DestroyListElement(MxDSAction *p_action);
|
||||
};
|
||||
|
||||
#endif // MXDSMULTIACTION_H
|
||||
|
||||
Loading…
Reference in New Issue
Block a user