//
// LevelEditorLayer::removeAllObjects from 0x1000e26c0 to 0x1000e27d1 (273 bytes)
//
// 3 xrefs:
// > EditorUI::onDeleteAll @ 0x100032ceb
// > EditorUI::FLAlert_Clicked @ 0x1000331a3
// > sub_1000331B0 @ 0x100033267
//
// 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
//
void __fastcall LevelEditorLayer::removeAllObjects(LevelEditorLayer *a1)
{
EditorUI *m_editorUI; // rdi
unsigned int v3; // eax
__int64 v4; // r14
unsigned int *v5; // rax
GameObject **v6; // r15
unsigned __int64 v7; // r12
GameObject *v8; // r14
int v9; // eax
a1->m_removingAll = 1;
m_editorUI = a1->m_editorUI;
if ( m_editorUI )
EditorUI::deselectAll(m_editorUI);
v3 = sub_100720070(a1->m_objects);
v4 = sub_10071FD00(v3);
sub_100720050(v4, a1->m_objects);
if ( v4 )
{
v5 = *(unsigned int **)(v4 + 56);
if ( *v5 )
{
v6 = *((GameObject ***)v5 + 2);
v7 = (unsigned __int64)&v6[*v5 - 1];
do
{
v8 = *v6;
if ( !*v6 )
break;
((void (__fastcall *)(GameObject *, __int64))v8->deactivateObject)(*v6, 1);
GJBaseGameLayer::removeObjectFromSection(a1, v8);
LevelEditorLayer::removeSpecial(a1, v8);
a1->m_unk3b22 = 1;
++v6;
}
while ( (unsigned __int64)v6 <= v7 );
}
}
sub_100720270(a1->m_redoObjects);
sub_100720270(a1->m_undoObjects);
a1->m_objectCount.value = 0;
v9 = (int)(float)((float)((float)rand() * 4.6566129e-10) * 1000.0);
a1->m_objectCount.seed = v9;
a1->m_objectCount.random = v9;
a1->m_unk3b22 = 1;
a1->m_removingAll = 0;
}