mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-23 08:24:16 +00:00
Bootstrap MxDSMultiAction (#133)
* Bootstrap MxDSMultiAction * Move destroy function to list class * Fix unk14 call
This commit is contained in:

committed by
GitHub

parent
b743f99d20
commit
99c27a6a50
@@ -5,12 +5,42 @@ DECOMP_SIZE_ASSERT(MxDSMultiAction, 0x9c)
|
||||
// OFFSET: LEGO1 0x100c9b90
|
||||
MxDSMultiAction::MxDSMultiAction()
|
||||
{
|
||||
// TODO
|
||||
this->SetType(MxDSType_MultiAction);
|
||||
this->m_actions = new MxDSActionList;
|
||||
this->m_actions->SetDestroy(MxDSActionList::Destroy);
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100ca060 STUB
|
||||
// OFFSET: LEGO1 0x100ca060
|
||||
MxDSMultiAction::~MxDSMultiAction()
|
||||
{
|
||||
// TODO
|
||||
if (this->m_actions)
|
||||
delete this->m_actions;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100ca5e0
|
||||
undefined4 MxDSMultiAction::unk14()
|
||||
{
|
||||
undefined4 result = MxDSAction::unk14();
|
||||
|
||||
MxDSActionListCursor cursor(this->m_actions);
|
||||
MxDSAction *action;
|
||||
while (cursor.Next(action))
|
||||
result += action->unk14();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100ca6c0
|
||||
MxU32 MxDSMultiAction::GetSizeOnDisk()
|
||||
{
|
||||
MxU32 totalSizeOnDisk = MxDSAction::GetSizeOnDisk() + 16;
|
||||
|
||||
MxDSActionListCursor cursor(this->m_actions);
|
||||
MxDSAction *action;
|
||||
while (cursor.Next(action))
|
||||
totalSizeOnDisk += action->GetSizeOnDisk();
|
||||
|
||||
this->m_sizeOnDisk = totalSizeOnDisk - MxDSAction::GetSizeOnDisk();
|
||||
|
||||
return totalSizeOnDisk;
|
||||
}
|
Reference in New Issue
Block a user