//
// EditorUI::onDeleteSelectedType from 0x1401b0e60 to 0x1401b0f21 (193 bytes)
//
// 5 xrefs:
// > EditorUI::handleEditorAction @ 0x1401c3b00
// > EditorUI::setupDeleteMenu @ 0x1401f46c3
// > ??> @ 0x1408a151c
// > ??> @ 0x1408a152c
// > ??> @ 0x140919eec
//
// This function is hookable on this platform (idp: pc, 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:27:55 +0000
//
void __fastcall EditorUI::onDeleteSelectedType(__int64 a1)
{
__int64 v1; // rbx
unsigned int v3; // ebx
__int64 v4; // rcx
int v5; // edi
__int64 v6; // r8
int v7; // ecx
int v8; // eax
int v9; // ecx
v1 = *(_QWORD *)(a1 + 1568);
if ( v1 )
{
v3 = *(_DWORD *)(v1 + 1036);
EditorUI::deselectAll();
v4 = *(_QWORD *)(a1 + 1512);
v5 = *(_DWORD *)(v4 + 14928) - *(_DWORD *)(v4 + 14932);
LevelEditorLayer::removeAllObjectsOfType(v4, v3);
*(_DWORD *)(*(_QWORD *)(a1 + 1512) + 15416LL) += v5
+ *(_DWORD *)(*(_QWORD *)(a1 + 1512) + 14932LL)
- *(_DWORD *)(*(_QWORD *)(a1 + 1512) + 14928LL);
v6 = *(_QWORD *)(a1 + 1512) + 15408LL;
v7 = *(_DWORD *)(*(_QWORD *)(a1 + 1512) + 15504LL);
if ( v7 >= 0 )
{
v8 = *(_DWORD *)(*(_QWORD *)(a1 + 1512) + 15440LL) - v7;
v9 = 0;
if ( v8 > 1 )
{
do
{
if ( v9 >= 7 )
break;
v8 = (unsigned int)v8 >> 1;
++v9;
}
while ( (unsigned int)v8 > 1 );
}
++*(_DWORD *)(v6 + 4LL * v9 + 64);
}
*(_DWORD *)(v6 + 96) = *(_DWORD *)(v6 + 32);
EditorUI::updateButtons(a1);
}
}