{"type": "func", "start": 7083688, "end": 7084068, "name": "EditorUI::clickOnPosition", "pseudocode": "// \n// EditorUI::clickOnPosition from 0x6c16a8 to 0x6c1824 (380 bytes)\n// \n// 4 xrefs:\n// > EditorUI::ccTouchMoved @ 0x6c1b20\n// > EditorUI::ccTouchEnded @ 0x6c2dbc\n// > EditorUI::ccTouchBegan @ 0x6c55ac\n// > <???> @ 0x2f6a0\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::clickOnPosition(EditorUI *a1, cocos2d::CCPoint a2)\n{\n  const cocos2d::CCPoint *v2; // x1\n  int m_selectedMode; // w0\n  LevelEditorLayer *m_editorLayer; // x23\n  GameObject *v6; // x0\n  LevelEditorLayer *v7; // x23\n  GameObject *v8; // x21\n  GameObject *m_selectedObject; // x0\n  cocos2d::CCPoint v10; // [xsp+40h] [xbp+40h] BYREF\n  cocos2d::CCPoint v11; // 0:kr00_8.8\n  cocos2d::CCPoint v12; // 0:s0.4,4:s1.4\n  cocos2d::CCPoint v13; // 0:s0.4,4:s1.4\n\n  if ( v2->y >= a1->m_toolbarHeight )\n  {\n    v11 = cocos2d::CCNode::convertToNodeSpace(a1->m_editorLayer->m_objectLayer, v2);\n    cocos2d::CCPoint::operator=(&a1->m_clickAtPosition, v11.x, v11.y);\n    m_selectedMode = a1->m_selectedMode;\n    switch ( m_selectedMode )\n    {\n      case 1:\n        EditorUI::onDelete(a1, nullptr);\n        break;\n      case 2:\n        if ( !EditorUI::onCreate(a1) && !a1->m_swipeEnabled )\n        {\n          m_editorLayer = a1->m_editorLayer;\n          cocos2d::CCPoint::CCPoint(&v10, &a1->m_clickAtPosition);\n          v6 = LevelEditorLayer::objectAtPosition(m_editorLayer, v12);\n          if ( v6 )\n          {\n            a1->m_selectedObjectIndex = v6->m_objectID;\n            EditorUI::updateCreateMenu(a1, 1);\n          }\n        }\n        break;\n      case 3:\n        v7 = a1->m_editorLayer;\n        cocos2d::CCPoint::CCPoint(&v10, &a1->m_clickAtPosition);\n        v8 = LevelEditorLayer::objectAtPosition(v7, v13);\n        if ( v8 )\n        {\n          m_selectedObject = a1->m_selectedObject;\n          if ( !m_selectedObject || m_selectedObject->m_uniqueID != v8->m_uniqueID )\n          {\n            EditorUI::createUndoSelectObject(a1, 0);\n            EditorUI::selectObject(a1, v8, 0);\n          }\n        }\n        EditorUI::updateEditMenu(a1);\n        EditorUI::updateSpecialUIElements(a1);\n        break;\n    }\n    EditorUI::updateButtons(a1);\n  }\n}", "assembly": "; \n; EditorUI::clickOnPosition from 0x6c16a8 to 0x6c1824 (380 bytes)\n; \n; 4 xrefs:\n; > EditorUI::ccTouchMoved @ 0x6c1b20\n; > EditorUI::ccTouchEnded @ 0x6c2dbc\n; > EditorUI::ccTouchBegan @ 0x6c55ac\n; > <???> @ 0x2f6a0\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\nSTP             X29, X30, [SP,#var_50]!                                ; +0x0, 0x6c16a8\nMOV             X29, SP                                                ; +0x4, 0x6c16ac\nSTP             X19, X20, [SP,#0x50+var_40]                            ; +0x8, 0x6c16b0\nADRP            X19, #__stack_chk_guard_ptr@PAGE                       ; +0xc, 0x6c16b4\nMOV             X20, X0                                                ; +0x10, 0x6c16b8\nLDR             S0, [X0,#0x310]                                        ; +0x14, 0x6c16bc\nSTR             X23, [SP,#0x50+var_20]                                 ; +0x18, 0x6c16c0\nLDR             S1, [X1,#4]                                            ; +0x1c, 0x6c16c4\nLDR             X0, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x20, 0x6c16c8\nFCMPE           S1, S0                                                 ; +0x24, 0x6c16cc\nSTP             X21, X22, [SP,#0x50+var_30]                            ; +0x28, 0x6c16d0\nLDR             X0, [X0]                                               ; +0x2c, 0x6c16d4\nSTR             X0, [X29,#0x50+var_8]                                  ; +0x30, 0x6c16d8\nB.PL            loc_6C1708                                             ; +0x34, 0x6c16dc\nLDR             X19, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x38, 0x6c16e0\nLDR             X1, [X29,#0x50+var_8]; cocos2d::CCPoint *              ; +0x3c, 0x6c16e4\nLDR             X0, [X19]                                              ; +0x40, 0x6c16e8\nCMP             X1, X0                                                 ; +0x44, 0x6c16ec\nB.NE            loc_6C1820                                             ; +0x48, 0x6c16f0\nLDP             X19, X20, [SP,#0x50+var_40]                            ; +0x4c, 0x6c16f4\nLDP             X21, X22, [SP,#0x50+var_30]                            ; +0x50, 0x6c16f8\nLDR             X23, [SP,#0x50+var_20]                                 ; +0x54, 0x6c16fc\nLDP             X29, X30, [SP+0x50+var_50],#0x50                       ; +0x58, 0x6c1700\nRET                                                                    ; +0x5c, 0x6c1704\nLDR             X0, [X20,#0x4F8]                                       ; +0x60, 0x6c1708\nADD             X21, X29, #0x50+var_10                                 ; +0x64, 0x6c170c\nMOV             X8, X21                                                ; +0x68, 0x6c1710\nADD             X22, X20, #0x528                                       ; +0x6c, 0x6c1714\nLDR             X0, [X0,#0x1030]; this                                 ; +0x70, 0x6c1718\nBL              _ZN7cocos2d6CCNode18convertToNodeSpaceERKNS_7CCPointE; cocos2d::CCNode::convertToNodeSpace(cocos2d::CCPoint const&) ; +0x74, 0x6c171c\nMOV             X0, X22                                                ; +0x78, 0x6c1720\nMOV             X1, X21                                                ; +0x7c, 0x6c1724\nBL              _ZN7cocos2d7CCPointaSERKS0_; cocos2d::CCPoint::operator=(cocos2d::CCPoint const&) ; +0x80, 0x6c1728\nLDR             W0, [X20,#0x4F0]                                       ; +0x84, 0x6c172c\nCMP             W0, #1                                                 ; +0x88, 0x6c1730\nB.EQ            loc_6C1754                                             ; +0x8c, 0x6c1734\nCMP             W0, #2                                                 ; +0x90, 0x6c1738\nB.EQ            loc_6C1764                                             ; +0x94, 0x6c173c\nCMP             W0, #3                                                 ; +0x98, 0x6c1740\nB.EQ            loc_6C17B4                                             ; +0x9c, 0x6c1744\nMOV             X0, X20; this                                          ; +0xa0, 0x6c1748\nBL              _ZN8EditorUI13updateButtonsEv; EditorUI::updateButtons(void) ; +0xa4, 0x6c174c\nB               loc_6C16E0                                             ; +0xa8, 0x6c1750\nMOV             X0, X20; this                                          ; +0xac, 0x6c1754\nMOV             X1, #0; cocos2d::CCObject *                            ; +0xb0, 0x6c1758\nBL              _ZN8EditorUI8onDeleteEPN7cocos2d8CCObjectE; EditorUI::onDelete(cocos2d::CCObject *) ; +0xb4, 0x6c175c\nB               loc_6C1748                                             ; +0xb8, 0x6c1760\nMOV             X0, X20; this                                          ; +0xbc, 0x6c1764\nBL              _ZN8EditorUI8onCreateEv; EditorUI::onCreate(void)      ; +0xc0, 0x6c1768\nUXTB            W0, W0                                                 ; +0xc4, 0x6c176c\nCBNZ            W0, loc_6C1748                                         ; +0xc8, 0x6c1770\nLDRB            W0, [X20,#0x314]                                       ; +0xcc, 0x6c1774\nCBNZ            W0, loc_6C1748                                         ; +0xd0, 0x6c1778\nMOV             X0, X21; this                                          ; +0xd4, 0x6c177c\nMOV             X1, X22; cocos2d::CCPoint *                            ; +0xd8, 0x6c1780\nLDR             X23, [X20,#0x4F8]                                      ; +0xdc, 0x6c1784\nBL              _ZN7cocos2d7CCPointC1ERKS0_; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const&) ; +0xe0, 0x6c1788\nMOV             X0, X23                                                ; +0xe4, 0x6c178c\nMOV             X1, X21                                                ; +0xe8, 0x6c1790\nBL              _ZN16LevelEditorLayer16objectAtPositionEN7cocos2d7CCPointE; LevelEditorLayer::objectAtPosition(cocos2d::CCPoint) ; +0xec, 0x6c1794\nCBZ             X0, loc_6C1748                                         ; +0xf0, 0x6c1798\nLDR             W1, [X0,#0x3F4]                                        ; +0xf4, 0x6c179c\nMOV             X0, X20; this                                          ; +0xf8, 0x6c17a0\nSTR             W1, [X20,#0x4D0]                                       ; +0xfc, 0x6c17a4\nMOV             W1, #1; bool                                           ; +0x100, 0x6c17a8\nBL              _ZN8EditorUI16updateCreateMenuEb; EditorUI::updateCreateMenu(bool) ; +0x104, 0x6c17ac\nB               loc_6C1748                                             ; +0x108, 0x6c17b0\nMOV             X0, X21; this                                          ; +0x10c, 0x6c17b4\nMOV             X1, X22; cocos2d::CCPoint *                            ; +0x110, 0x6c17b8\nLDR             X23, [X20,#0x4F8]                                      ; +0x114, 0x6c17bc\nBL              _ZN7cocos2d7CCPointC1ERKS0_; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const&) ; +0x118, 0x6c17c0\nMOV             X1, X21                                                ; +0x11c, 0x6c17c4\nMOV             X0, X23                                                ; +0x120, 0x6c17c8\nBL              _ZN16LevelEditorLayer16objectAtPositionEN7cocos2d7CCPointE; LevelEditorLayer::objectAtPosition(cocos2d::CCPoint) ; +0x124, 0x6c17cc\nMOV             X21, X0                                                ; +0x128, 0x6c17d0\nCBZ             X0, loc_6C180C                                         ; +0x12c, 0x6c17d4\nLDR             X0, [X20,#0x530]                                       ; +0x130, 0x6c17d8\nCBZ             X0, loc_6C17F0                                         ; +0x134, 0x6c17dc\nLDR             W1, [X0,#0x384]                                        ; +0x138, 0x6c17e0\nLDR             W0, [X21,#0x384]                                       ; +0x13c, 0x6c17e4\nCMP             W1, W0                                                 ; +0x140, 0x6c17e8\nB.EQ            loc_6C180C                                             ; +0x144, 0x6c17ec\nMOV             X0, X20; this                                          ; +0x148, 0x6c17f0\nMOV             W1, #0; bool                                           ; +0x14c, 0x6c17f4\nBL              _ZN8EditorUI22createUndoSelectObjectEb; EditorUI::createUndoSelectObject(bool) ; +0x150, 0x6c17f8\nMOV             X0, X20; this                                          ; +0x154, 0x6c17fc\nMOV             X1, X21; GameObject *                                  ; +0x158, 0x6c1800\nMOV             W2, #0; bool                                           ; +0x15c, 0x6c1804\nBL              _ZN8EditorUI12selectObjectEP10GameObjectb; EditorUI::selectObject(GameObject *,bool) ; +0x160, 0x6c1808\nMOV             X0, X20; this                                          ; +0x164, 0x6c180c\nBL              _ZN8EditorUI14updateEditMenuEv; EditorUI::updateEditMenu(void) ; +0x168, 0x6c1810\nMOV             X0, X20; this                                          ; +0x16c, 0x6c1814\nBL              _ZN8EditorUI23updateSpecialUIElementsEv; EditorUI::updateSpecialUIElements(void) ; +0x170, 0x6c1818\nB               loc_6C1748                                             ; +0x174, 0x6c181c\nBL              .__stack_chk_fail                                      ; +0x178, 0x6c1820", "xrefs": ["EditorUI::ccTouchMoved @ 0x6c1b20", "EditorUI::ccTouchEnded @ 0x6c2dbc", "EditorUI::ccTouchBegan @ 0x6c55ac", "<???> @ 0x2f6a0"], "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"}