//
// LevelEditorLayer::removeObject from 0x79082c to 0x7908c4 (152 bytes)
//
// 8 xrefs:
// > LevelEditorLayer::removeSpecial @ 0x790818
// > LevelEditorLayer::removeAllObjects @ 0x790944
// > LevelEditorLayer::removeAllObjectsOfType @ 0x790afc
// > LevelEditorLayer::breakApartTextObject @ 0x7a16d8
// > EditorUI::deleteObject @ 0x7c1c20
// > EditorUI::spriteFromObjectString @ 0xbde1d0
// > EditorUI::spriteFromObjectString @ 0xbde48c
// > ??> @ 0x5d400
//
// 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 12:53:29 +0000
//
__int64 __fastcall LevelEditorLayer::removeObject(__int64 this, GameObject *a2, char a3)
{
__int64 v3; // x19
int v5; // w1
cocos2d::CCArray *v6; // x0
UndoObject *v7; // x0
if ( a2 )
{
v3 = this;
if ( !a3 )
{
v5 = *(_DWORD *)(this + 14712);
v6 = *(cocos2d::CCArray **)(this + 14264);
*(_DWORD *)(v3 + 14712) = v5 + 1;
cocos2d::CCArray::removeAllObjects(v6);
v7 = (UndoObject *)UndoObject::create(a2, 1);
LevelEditorLayer::addToUndoList((cocos2d::CCArray **)v3, v7, 0);
}
(*(void (__fastcall **)(GameObject *, __int64))(*(_QWORD *)a2 + 1312LL))(a2, 1);
GJBaseGameLayer::removeObjectFromSection((GJBaseGameLayer *)v3, a2);
LevelEditorLayer::removeSpecial((LevelEditorLayer *)v3, a2);
*(_BYTE *)(v3 + 14938) = 1;
return 1;
}
return this;
}