//
// EditorUI::onDeleteSelected from 0x48c828 to 0x48c924 (252 bytes)
//
// 1 xrefs:
// > EditorUI::handleEditorAction @ 0x6f1ad4
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:49:31 +0000
//
int __fastcall EditorUI::onDeleteSelected(EditorUI *this, cocos2d::CCObject *a2)
{
EditorSFXManager *v3; // r0
EditorSFXManager *v4; // r0
unsigned int v5; // r6
cocos2d::CCArray *v6; // r0
cocos2d::CCArray *v7; // r5
cocos2d::CCObject *v8; // r7
unsigned int v9; // r6
int v10; // r7
unsigned int v11; // r1
GameObject *v12; // r1
UndoObject *v13; // r0
GameObject *v14; // r1
v3 = (EditorSFXManager *)cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 167));
if ( v3 )
{
v4 = (EditorSFXManager *)EditorSFXManager::sharedState(v3);
EditorSFXManager::playAction(v4, 102);
v5 = 0;
v6 = (cocos2d::CCArray *)EditorBuildStats::noteAction((EditorBuildStats *)(*((_DWORD *)this + 236) + 12104));
v7 = (cocos2d::CCArray *)cocos2d::CCArray::create(v6);
while ( v5 < cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 167)) )
{
v8 = (cocos2d::CCObject *)cocos2d::CCArray::objectAtIndex(*((cocos2d::CCArray **)this + 167), v5);
if ( EditorUI::shouldDeleteObject(this, v8) )
cocos2d::CCArray::addObject(v7, v8);
++v5;
}
v9 = 0;
v10 = 0;
while ( v9 < cocos2d::CCArray::count(v7) )
{
v11 = v9++;
v12 = (GameObject *)cocos2d::CCArray::objectAtIndex(v7, v11);
if ( *((_DWORD *)v12 + 223) == 747 )
v10 = 1;
EditorUI::deleteObject(this, v12, 1);
}
*(_DWORD *)(*((_DWORD *)this + 236) + 12112) += cocos2d::CCArray::count(v7);
v13 = UndoObject::createWithArray(v7, 4);
LevelEditorLayer::addToUndoList(*((cocos2d::CCArray ***)this + 236), v13, 0);
if ( v10 )
EditorUI::deselectTargetPortals(this);
}
else
{
v14 = *((GameObject **)this + 249);
if ( v14 && EditorUI::shouldDeleteObject(this, v14) )
{
EditorBuildStats::noteAction((EditorBuildStats *)(*((_DWORD *)this + 236) + 12104));
EditorUI::deleteObject(this, *((GameObject **)this + 249), 0);
}
}
EditorUI::updateSpecialUIElements((cocos2d::CCArray **)this);
return EditorUI::updateButtons((cocos2d::CCArray **)this);
}