Fix DeleteObjects

This commit is contained in:
Nathan M Gilbert 2023-10-22 19:55:14 +00:00
parent 67034bcb20
commit e399d9898d
2 changed files with 7 additions and 4 deletions

View File

@ -411,12 +411,15 @@ MxResult DeleteObject(MxDSAction &p_dsAction)
}
// OFFSET: LEGO1 0x100159e0
void DeleteObjects(MxAtomId *p_id, MxU32 p_first, MxU32 p_last)
void DeleteObjects(MxAtomId *p_id, MxS32 p_first, MxS32 p_last)
{
MxDSAction action;
action.SetAtomId(*p_id);
while(p_first <= p_last) {
action.SetUnknown24(p_first++);
action.SetUnknown24(-2);
MxS32 l_first = p_first;
MxS32 l_last = p_last;
while(l_first <= l_last) {
action.SetObjectId(l_first++);
DeleteObject(action);
}
}

View File

@ -101,5 +101,5 @@ MxVideoManager *MVideoManager();
MxAtomIdCounterSet *AtomIdCounterSet();
MxObjectFactory *ObjectFactory();
void DeleteObject(MxDSAction &ds);
void DeleteObjects(MxAtomId *p_id, MxU32 p_first, MxU32 p_last);
void DeleteObjects(MxAtomId *p_id, MxS32 p_first, MxS32 p_last);
#endif // MXOMNI_H