//
// LevelEditorLayer::removeAllObjects from 0x1000b1f40 to 0x1000b2051 (273 bytes)
//
// 2 xrefs:
// > EditorUI::onDeleteAll @ 0x10000ff90
// > EditorUI::FLAlert_Clicked @ 0x100010248
//
// 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 12:20:20 +0000
//
__int64 __fastcall LevelEditorLayer::removeAllObjects(__int64 a1)
{
__int64 v2; // rdi
unsigned int v3; // eax
__int64 v4; // r14
unsigned int *v5; // rax
__int64 *v6; // r15
unsigned __int64 v7; // r12
__int64 v8; // r14
__int64 result; // rax
*(_BYTE *)(a1 + 14808) = 1;
v2 = *(_QWORD *)(a1 + 14248);
if ( v2 )
EditorUI::deselectAll(v2);
v3 = sub_1007FEF90(*(_QWORD *)(a1 + 3280));
v4 = sub_1007FEC20(v3);
sub_1007FEF70(v4, *(_QWORD *)(a1 + 3280));
if ( v4 )
{
v5 = *(unsigned int **)(v4 + 56);
if ( *v5 )
{
v6 = *((__int64 **)v5 + 2);
v7 = (unsigned __int64)&v6[*v5 - 1];
do
{
v8 = *v6;
if ( !*v6 )
break;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v8 + 1312LL))(*v6, 1);
GJBaseGameLayer::removeObjectFromSection(a1, v8);
LevelEditorLayer::removeSpecial(a1, v8);
*(_BYTE *)(a1 + 14938) = 1;
++v6;
}
while ( (unsigned __int64)v6 <= v7 );
}
}
sub_1007FF190(*(_QWORD *)(a1 + 14264));
sub_1007FF190(*(_QWORD *)(a1 + 14256));
*(_DWORD *)(a1 + 14280) = 0;
result = (unsigned int)(int)(float)((float)((float)rand() * 4.6566129e-10) * 1000.0);
*(_DWORD *)(a1 + 14276) = result;
*(_DWORD *)(a1 + 14272) = result;
*(_BYTE *)(a1 + 14938) = 1;
*(_BYTE *)(a1 + 14808) = 0;
return result;
}