//
// EditorUI::shouldDeleteObject from 0x1400e6300 to 0x1400e6427 (295 bytes)
//
// 5 xrefs:
// > EditorUI::onDelete @ 0x1400e5e95
// > EditorUI::onDelete @ 0x1400e5f73
// > EditorUI::onDeleteSelected @ 0x1400e64a5
// > EditorUI::onDeleteSelected @ 0x1400e66b4
// > ??> @ 0x1406c8cf4
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
// Hidden C++ exception states: #wind=2
bool EditorUI::shouldDeleteObject(EditorUI *a1, GameObject *a2)
{
GameManager *v3; // rcx
int IntGameVariable; // eax
int v5; // eax
int v6; // eax
GameManager *v7; // rcx
void *v9; // [rsp+30h] [rbp+8h]
void *v10; // [rsp+30h] [rbp+8h]
if ( !a2 || a2->m_objectID == 749 )
return 0;
v3 = (GameManager *)qword_1406C2ED8;
if ( !qword_1406C2ED8 )
{
v9 = operator new(0x668u);
qword_1406C2ED8 = sub_14017AB00(v9);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);
v3 = (GameManager *)qword_1406C2ED8;
}
IntGameVariable = GameManager::getIntGameVariable(v3, "0005");
if ( !IntGameVariable )
return 1;
v5 = IntGameVariable - 1;
if ( !v5 )
return a2->getType(a2) == Decoration;
v6 = v5 - 1;
if ( !v6 )
return a2->getType(a2) == Solid || a2->getType(a2) == Slope;
if ( v6 != 1 )
return 0;
v7 = (GameManager *)qword_1406C2ED8;
if ( !qword_1406C2ED8 )
{
v10 = operator new(0x668u);
qword_1406C2ED8 = sub_14017AB00(v10);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);
v7 = (GameManager *)qword_1406C2ED8;
}
return a2->m_objectID == GameManager::getIntGameVariable(v7, "0006");
}