{"type": "func", "start": 3818840, "end": 3819040, "name": "EditorUI::onDeleteSelected", "pseudocode": "// \n// EditorUI::onDeleteSelected from 0x3a4558 to 0x3a4620 (200 bytes)\n// \n// 1 xrefs:\n// > EditorUI::keyDown @ 0x3a6eb4\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\nvoid EditorUI::onDeleteSelected(EditorUI *a1, cocos2d::CCObject *a2)\n{\n  cocos2d::CCArray *v3; // r0\n  unsigned int v4; // r5\n  cocos2d::CCArray *v5; // r6\n  GameObject *v6; // r7\n  unsigned int v7; // r5\n  int v8; // r7\n  unsigned int v9; // r1\n  GameObject *v10; // r1\n  UndoObject *v11; // r0\n  GameObject *m_selectedObject; // r1\n\n  v3 = (cocos2d::CCArray *)cocos2d::CCArray::count(a1->m_selectedObjects);\n  if ( v3 )\n  {\n    v4 = 0;\n    v5 = (cocos2d::CCArray *)cocos2d::CCArray::create(v3);\n    while ( v4 < cocos2d::CCArray::count(a1->m_selectedObjects) )\n    {\n      v6 = (GameObject *)cocos2d::CCArray::objectAtIndex(a1->m_selectedObjects, v4);\n      if ( EditorUI::shouldDeleteObject(a1, v6) )\n        cocos2d::CCArray::addObject(v5, v6);\n      ++v4;\n    }\n    v7 = 0;\n    v8 = 0;\n    while ( v7 < cocos2d::CCArray::count(v5) )\n    {\n      v9 = v7++;\n      v10 = (GameObject *)cocos2d::CCArray::objectAtIndex(v5, v9);\n      if ( v10->m_objectID == 747 )\n        v8 = 1;\n      EditorUI::deleteObject(a1, v10, 1);\n    }\n    v11 = UndoObject::createWithArray(v5, DeleteMulti);\n    LevelEditorLayer::addToUndoList(a1->m_editorLayer, v11, 0);\n    if ( v8 )\n      EditorUI::deselectTargetPortals(a1);\n  }\n  else\n  {\n    m_selectedObject = a1->m_selectedObject;\n    if ( m_selectedObject && EditorUI::shouldDeleteObject(a1, m_selectedObject) )\n      EditorUI::deleteObject(a1, a1->m_selectedObject, 0);\n  }\n  EditorUI::updateSpecialUIElements(a1);\n  EditorUI::updateButtons(a1);\n  EditorUI::tryUpdateTimeMarkers(a1);\n}", "assembly": "; \n; EditorUI::onDeleteSelected from 0x3a4558 to 0x3a4620 (200 bytes)\n; \n; 1 xrefs:\n; > EditorUI::keyDown @ 0x3a6eb4\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\nPUSH.W          {R4-R8,LR}                                             ; +0x0, 0x3a4558\nMOV             R4, R0                                                 ; +0x4, 0x3a455c\nLDR.W           R0, [R0,#0x260]; this                                  ; +0x6, 0x3a455e\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0xa, 0x3a4562\nMOV             R5, R0                                                 ; +0xe, 0x3a4566\nCMP             R0, #0                                                 ; +0x10, 0x3a4568\nBEQ             loc_3A45F0                                             ; +0x12, 0x3a456a\nBL              _ZN7cocos2d7CCArray6createEv; cocos2d::CCArray::create(void) ; +0x14, 0x3a456c\nMOVS            R5, #0                                                 ; +0x18, 0x3a4570\nMOV             R6, R0                                                 ; +0x1a, 0x3a4572\nLDR.W           R0, [R4,#0x260]; this                                  ; +0x1c, 0x3a4574\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x20, 0x3a4578\nCMP             R5, R0                                                 ; +0x24, 0x3a457c\nBCS             loc_3A45A2                                             ; +0x26, 0x3a457e\nMOV             R1, R5; unsigned int                                   ; +0x28, 0x3a4580\nLDR.W           R0, [R4,#0x260]; this                                  ; +0x2a, 0x3a4582\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x2e, 0x3a4586\nMOV             R7, R0                                                 ; +0x32, 0x3a458a\nMOV             R0, R4; this                                           ; +0x34, 0x3a458c\nMOV             R1, R7; GameObject *                                   ; +0x36, 0x3a458e\nBL              _ZN8EditorUI18shouldDeleteObjectEP10GameObject; EditorUI::shouldDeleteObject(GameObject *) ; +0x38, 0x3a4590\nCBZ             R0, loc_3A459E                                         ; +0x3c, 0x3a4594\nMOV             R0, R6; this                                           ; +0x3e, 0x3a4596\nMOV             R1, R7; cocos2d::CCObject *                            ; +0x40, 0x3a4598\nBL              _ZN7cocos2d7CCArray9addObjectEPNS_8CCObjectE; cocos2d::CCArray::addObject(cocos2d::CCObject *) ; +0x42, 0x3a459a\nADDS            R5, #1                                                 ; +0x46, 0x3a459e\nB               loc_3A4574                                             ; +0x48, 0x3a45a0\nMOVS            R5, #0                                                 ; +0x4a, 0x3a45a2\nMOVW            R8, #0x2EB                                             ; +0x4c, 0x3a45a4\nMOV             R7, R5                                                 ; +0x50, 0x3a45a8\nMOV             R0, R6; this                                           ; +0x52, 0x3a45aa\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x54, 0x3a45ac\nCMP             R5, R0                                                 ; +0x58, 0x3a45b0\nMOV             R0, R6; this                                           ; +0x5a, 0x3a45b2\nBCS             loc_3A45D4                                             ; +0x5c, 0x3a45b4\nMOV             R1, R5; unsigned int                                   ; +0x5e, 0x3a45b6\nADDS            R5, #1                                                 ; +0x60, 0x3a45b8\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x62, 0x3a45ba\nMOVS            R2, #1; bool                                           ; +0x66, 0x3a45be\nLDR.W           R3, [R0,#0x374]                                        ; +0x68, 0x3a45c0\nMOV             R1, R0; GameObject *                                   ; +0x6c, 0x3a45c4\nMOV             R0, R4; this                                           ; +0x6e, 0x3a45c6\nCMP             R3, R8                                                 ; +0x70, 0x3a45c8\nIT EQ                                                                  ; +0x72, 0x3a45ca\nMOVEQ           R7, #1                                                 ; +0x74, 0x3a45cc\nBL              _ZN8EditorUI12deleteObjectEP10GameObjectb; EditorUI::deleteObject(GameObject *,bool) ; +0x76, 0x3a45ce\nB               loc_3A45AA                                             ; +0x7a, 0x3a45d2\nMOVS            R1, #4                                                 ; +0x7c, 0x3a45d4\nBL              _ZN10UndoObject15createWithArrayEPN7cocos2d7CCArrayE11UndoCommand; UndoObject::createWithArray(cocos2d::CCArray *,UndoCommand) ; +0x7e, 0x3a45d6\nMOVS            R2, #0; bool                                           ; +0x82, 0x3a45da\nMOV             R1, R0; UndoObject *                                   ; +0x84, 0x3a45dc\nLDR.W           R0, [R4,#0x340]; this                                  ; +0x86, 0x3a45de\nBL              _ZN16LevelEditorLayer13addToUndoListEP10UndoObjectb; LevelEditorLayer::addToUndoList(UndoObject *,bool) ; +0x8a, 0x3a45e2\nCBZ             R7, loc_3A460A                                         ; +0x8e, 0x3a45e6\nMOV             R0, R4; this                                           ; +0x90, 0x3a45e8\nBL              _ZN8EditorUI21deselectTargetPortalsEv; EditorUI::deselectTargetPortals(void) ; +0x92, 0x3a45ea\nB               loc_3A460A                                             ; +0x96, 0x3a45ee\nLDR.W           R1, [R4,#0x374]; GameObject *                          ; +0x98, 0x3a45f0\nCBZ             R1, loc_3A460A                                         ; +0x9c, 0x3a45f4\nMOV             R0, R4; this                                           ; +0x9e, 0x3a45f6\nBL              _ZN8EditorUI18shouldDeleteObjectEP10GameObject; EditorUI::shouldDeleteObject(GameObject *) ; +0xa0, 0x3a45f8\nCBZ             R0, loc_3A460A                                         ; +0xa4, 0x3a45fc\nMOV             R0, R4; this                                           ; +0xa6, 0x3a45fe\nLDR.W           R1, [R4,#0x374]; GameObject *                          ; +0xa8, 0x3a4600\nMOV             R2, R5; bool                                           ; +0xac, 0x3a4604\nBL              _ZN8EditorUI12deleteObjectEP10GameObjectb; EditorUI::deleteObject(GameObject *,bool) ; +0xae, 0x3a4606\nMOV             R0, R4; this                                           ; +0xb2, 0x3a460a\nBL              _ZN8EditorUI23updateSpecialUIElementsEv; EditorUI::updateSpecialUIElements(void) ; +0xb4, 0x3a460c\nMOV             R0, R4; this                                           ; +0xb8, 0x3a4610\nBL              _ZN8EditorUI13updateButtonsEv; EditorUI::updateButtons(void) ; +0xba, 0x3a4612\nMOV             R0, R4; this                                           ; +0xbe, 0x3a4616\nPOP.W           {R4-R8,LR}                                             ; +0xc0, 0x3a4618\nB.W             _ZN8EditorUI20tryUpdateTimeMarkersEv; EditorUI::tryUpdateTimeMarkers(void) ; +0xc4, 0x3a461c", "xrefs": ["EditorUI::keyDown @ 0x3a6eb4"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}