//
// EditorUI::onDeleteSelected from 0x100471018 to 0x1004711c4 (428 bytes)
//
// 3 xrefs:
// > EditorUI::handleEditorAction @ 0x1001631c0
// > EditorUI::setupDeleteMenu @ 0x100186eb0
// > EditorUI::init @ 0x10046f1b0
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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:05:38 +0000
//
__int64 __fastcall EditorUI::onDeleteSelected(__int64 *a1)
{
__n128 v2; // q0
__int64 v3; // x0
_QWORD *v4; // x20
unsigned int v5; // w21
__int64 v6; // x0
char v7; // w22
unsigned int v8; // w21
__int64 v9; // x1
void *v10; // x0
void *v11; // x0
if ( (unsigned int)sub_1002E757C(a1[112]) )
{
v3 = EditorSFXManager::sharedState(v2);
EditorSFXManager::playAction_1(v3, 102);
EditorBuildStats::noteAction(a1[180] + 14704);
v4 = sub_1002E736C();
if ( (unsigned int)sub_1002E757C(a1[112]) )
{
v5 = 0;
do
{
v6 = sub_1002E75A0(a1[112], v5);
if ( (unsigned int)sub_1004763E0(v6, v6) )
sub_1002E74E0((__int64)v4);
++v5;
}
while ( v5 < (unsigned int)sub_1002E757C(a1[112]) );
}
if ( (unsigned int)sub_1002E757C((__int64)v4) )
{
v7 = 0;
v8 = 0;
do
{
v9 = sub_1002E75A0((__int64)v4, v8);
v7 |= *(_DWORD *)(v9 + 1028) == 747;
EditorUI::deleteObject(a1, v9, 1);
++v8;
}
while ( v8 < (unsigned int)sub_1002E757C((__int64)v4) );
*(_DWORD *)(a1[180] + 14712) += sub_1002E757C((__int64)v4);
v10 = UndoObject::createWithArray((__int64)v4, 4);
LevelEditorLayer::addToUndoList(a1[180], (__int64)v10, 0);
if ( (v7 & 1) != 0 )
v2.n128_f64[0] = sub_1001A668C((__int64)a1);
}
else
{
*(_DWORD *)(a1[180] + 14712) += sub_1002E757C((__int64)v4);
v11 = UndoObject::createWithArray((__int64)v4, 4);
LevelEditorLayer::addToUndoList(a1[180], (__int64)v11, 0);
}
}
else if ( a1[187] && (unsigned int)((__int64 (*)(void))sub_1004763E0)() )
{
EditorBuildStats::noteAction(a1[180] + 14704);
EditorUI::deleteObject(a1, a1[187], 0);
}
EditorUI::updateSpecialUIElements(a1, v2);
return EditorUI::updateButtons(a1);
}