{"type": "func", "start": 4299095420, "end": 4299095792, "name": "EditorUI::activateTransformControl", "pseudocode": "// \n// EditorUI::activateTransformControl from 0x1003efd7c to 0x1003efef0 (372 bytes)\n// \n// 2 xrefs:\n// > EditorUI::keyDown @ 0x1003f9da4\n// > EditorUI::createMoveMenu @ 0x1003f48bc\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 __fastcall EditorUI::activateTransformControl(EditorUI *a1, cocos2d::CCObject *a2)\n{\n  EditorUI *v3; // x0\n  cocos2d::CCPoint *p_m_pivotPoint; // x0\n  double *v5; // x1\n  double v6; // d0\n  GJTransformControl *m_transformControl; // x20\n  float v8; // s0\n  GJTransformControl *v9; // x20\n  float32x2_t *v10; // x0\n  float32x2_t v11; // [xsp+8h] [xbp-18h] BYREF\n  cocos2d::CCPoint v12; // 0:s0.4,4:s1.4\n\n  if ( (unsigned int)sub_10024A36C((__int64)a1->m_selectedObjects) || a1->m_selectedObject )\n  {\n    EditorUI::deactivateScaleControl(a1);\n    EditorUI::deactivateRotationControl(a1);\n    if ( ((unsigned int (__fastcall *)(GJTransformControl *))a1->m_transformControl->isVisible)(a1->m_transformControl) )\n    {\n      EditorUI::deactivateTransformControl(a1);\n    }\n    else if ( !((unsigned int (__fastcall *)(GJTransformControl *))a1->m_transformControl->isVisible)(a1->m_transformControl)\n           || a1->m_canActivateControls )\n    {\n      a1->m_transformState.m_transformReset = 1;\n      EditorUI::updateEditButtonColor(a1, 31, (cocos2d::ccColor3B)-5855578);\n      a1->m_canActivateControls = 0;\n      v3 = (EditorUI *)sub_10024A36C((__int64)a1->m_selectedObjects);\n      if ( (_DWORD)v3 )\n      {\n        EditorUI::getGroupCenter(v3, a1->m_selectedObjects, 0);\n        p_m_pivotPoint = &a1->m_pivotPoint;\n        v5 = (double *)&v11;\n      }\n      else\n      {\n        v5 = (double *)((__int64 (__fastcall *)(GameObject *))a1->m_selectedObject->getPosition)(a1->m_selectedObject);\n        p_m_pivotPoint = &a1->m_pivotPoint;\n      }\n      v6 = sub_1000229D0(p_m_pivotPoint, v5);\n      ((void (__fastcall *)(GJTransformControl *, cocos2d::CCPoint *, double))a1->m_transformControl->setPosition)(\n        a1->m_transformControl,\n        &a1->m_pivotPoint,\n        v6);\n      m_transformControl = a1->m_transformControl;\n      v8 = ((float (__fastcall *)(cocos2d::CCLayer *))a1->m_editorLayer->m_objectLayer->getScale)(a1->m_editorLayer->m_objectLayer);\n      GJTransformControl::scaleButtons(m_transformControl, 1.0 / v8);\n      ((void (__fastcall *)(GJTransformControl *, __int64))a1->m_transformControl->setVisible)(\n        a1->m_transformControl,\n        1);\n      v9 = a1->m_transformControl;\n      v10 = (float32x2_t *)((__int64 (__fastcall *)(GJTransformControl *))v9->getPosition)(v9);\n      v12.x = sub_1000229F0((float32x2_t *)&a1->m_pivotPoint, v10, &v11).f32[0];\n      GJTransformControl::updateAnchorSprite(v9, v12);\n    }\n  }\n}", "assembly": "; \n; EditorUI::activateTransformControl from 0x1003efd7c to 0x1003efef0 (372 bytes)\n; \n; 2 xrefs:\n; > EditorUI::keyDown @ 0x1003f9da4\n; > EditorUI::createMoveMenu @ 0x1003f48bc\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\nSUB             SP, SP, #0x30                                          ; +0x0, 0x1003efd7c\nSTP             X20, X19, [SP,#0x20+var_10]                            ; +0x4, 0x1003efd80\nSTP             X29, X30, [SP,#0x20+var_s0]                            ; +0x8, 0x1003efd84\nADD             X29, SP, #0x20                                         ; +0xc, 0x1003efd88\nMOV             X19, X0                                                ; +0x10, 0x1003efd8c\nLDR             X0, [X0,#0x328]                                        ; +0x14, 0x1003efd90\nBL              sub_10024A36C                                          ; +0x18, 0x1003efd94\nCBNZ            W0, loc_1003EFDA4                                      ; +0x1c, 0x1003efd98\nLDR             X8, [X19,#0x520]                                       ; +0x20, 0x1003efd9c\nCBZ             X8, loc_1003EFEE0                                      ; +0x24, 0x1003efda0\nMOV             X0, X19                                                ; +0x28, 0x1003efda4\nBL              EditorUI__deactivateScaleControl                       ; +0x2c, 0x1003efda8\nMOV             X0, X19                                                ; +0x30, 0x1003efdac\nBL              EditorUI__deactivateRotationControl                    ; +0x34, 0x1003efdb0\nLDR             X0, [X19,#0x2C0]                                       ; +0x38, 0x1003efdb4\nLDR             X8, [X0]                                               ; +0x3c, 0x1003efdb8\nLDR             X8, [X8,#0x150]                                        ; +0x40, 0x1003efdbc\nBLR             X8                                                     ; +0x44, 0x1003efdc0\nCBZ             W0, loc_1003EFDDC                                      ; +0x48, 0x1003efdc4\nMOV             X0, X19                                                ; +0x4c, 0x1003efdc8\nLDP             X29, X30, [SP,#0x20+var_s0]                            ; +0x50, 0x1003efdcc\nLDP             X20, X19, [SP,#0x20+var_10]                            ; +0x54, 0x1003efdd0\nADD             SP, SP, #0x30 ; '0'                                    ; +0x58, 0x1003efdd4\nB               EditorUI__deactivateTransformControl                   ; +0x5c, 0x1003efdd8\nLDR             X0, [X19,#0x2C0]                                       ; +0x60, 0x1003efddc\nLDR             X8, [X0]                                               ; +0x64, 0x1003efde0\nLDR             X8, [X8,#0x150]                                        ; +0x68, 0x1003efde4\nBLR             X8                                                     ; +0x6c, 0x1003efde8\nCBZ             W0, loc_1003EFDFC                                      ; +0x70, 0x1003efdec\nLDRB            W8, [X19,#0x2B0]                                       ; +0x74, 0x1003efdf0\nCMP             W8, #1                                                 ; +0x78, 0x1003efdf4\nB.NE            loc_1003EFEE0                                          ; +0x7c, 0x1003efdf8\nMOV             W8, #1                                                 ; +0x80, 0x1003efdfc\nSTRB            W8, [X19,#0x214]                                       ; +0x84, 0x1003efe00\nMOV             X0, X19                                                ; +0x88, 0x1003efe04\nMOV             W1, #0x1F                                              ; +0x8c, 0x1003efe08\nMOV             W2, #0xA6A6A6                                          ; +0x90, 0x1003efe0c\nBL              EditorUI__updateEditButtonColor                        ; +0x98, 0x1003efe14\nSTRB            WZR, [X19,#0x2B0]                                      ; +0x9c, 0x1003efe18\nLDR             X0, [X19,#0x328]                                       ; +0xa0, 0x1003efe1c\nBL              sub_10024A36C                                          ; +0xa4, 0x1003efe20\nCBZ             W0, loc_1003EFE44                                      ; +0xa8, 0x1003efe24\nLDR             X1, [X19,#0x328]                                       ; +0xac, 0x1003efe28\nADD             X8, SP, #0x20+var_18                                   ; +0xb0, 0x1003efe2c\nMOV             W2, #0                                                 ; +0xb4, 0x1003efe30\nBL              EditorUI__getGroupCenter                               ; +0xb8, 0x1003efe34\nADD             X0, X19, #0x2A8                                        ; +0xbc, 0x1003efe38\nADD             X1, SP, #0x20+var_18                                   ; +0xc0, 0x1003efe3c\nB               loc_1003EFE5C                                          ; +0xc4, 0x1003efe40\nLDR             X0, [X19,#0x520]                                       ; +0xc8, 0x1003efe44\nLDR             X8, [X0]                                               ; +0xcc, 0x1003efe48\nLDR             X8, [X8,#0xC0]                                         ; +0xd0, 0x1003efe4c\nBLR             X8                                                     ; +0xd4, 0x1003efe50\nMOV             X1, X0                                                 ; +0xd8, 0x1003efe54\nADD             X0, X19, #0x2A8                                        ; +0xdc, 0x1003efe58\nBL              sub_1000229D0                                          ; +0xe0, 0x1003efe5c\nLDR             X0, [X19,#0x2C0]                                       ; +0xe4, 0x1003efe60\nLDR             X8, [X0]                                               ; +0xe8, 0x1003efe64\nLDR             X8, [X8,#0xB8]                                         ; +0xec, 0x1003efe68\nADD             X1, X19, #0x2A8                                        ; +0xf0, 0x1003efe6c\nBLR             X8                                                     ; +0xf4, 0x1003efe70\nLDR             X20, [X19,#0x2C0]                                      ; +0xf8, 0x1003efe74\nLDR             X8, [X19,#0x4E8]                                       ; +0xfc, 0x1003efe78\nLDR             X0, [X8,#0xEE0]                                        ; +0x100, 0x1003efe7c\nLDR             X8, [X0]                                               ; +0x104, 0x1003efe80\nLDR             X8, [X8,#0xA8]                                         ; +0x108, 0x1003efe84\nBLR             X8                                                     ; +0x10c, 0x1003efe88\nFMOV            S1, #1.0                                               ; +0x110, 0x1003efe8c\nFDIV            S0, S1, S0                                             ; +0x114, 0x1003efe90\nMOV             X0, X20                                                ; +0x118, 0x1003efe94\nBL              GJTransformControl__scaleButtons                       ; +0x11c, 0x1003efe98\nLDR             X0, [X19,#0x2C0]                                       ; +0x120, 0x1003efe9c\nLDR             X8, [X0]                                               ; +0x124, 0x1003efea0\nLDR             X8, [X8,#0x148]                                        ; +0x128, 0x1003efea4\nMOV             W1, #1                                                 ; +0x12c, 0x1003efea8\nBLR             X8                                                     ; +0x130, 0x1003efeac\nLDR             X20, [X19,#0x2C0]                                      ; +0x134, 0x1003efeb0\nLDR             X8, [X20]                                              ; +0x138, 0x1003efeb4\nLDR             X8, [X8,#0xC0]                                         ; +0x13c, 0x1003efeb8\nMOV             X0, X20                                                ; +0x140, 0x1003efebc\nBLR             X8                                                     ; +0x144, 0x1003efec0\nMOV             X1, X0                                                 ; +0x148, 0x1003efec4\nADD             X8, SP, #0x20+var_18                                   ; +0x14c, 0x1003efec8\nADD             X0, X19, #0x2A8                                        ; +0x150, 0x1003efecc\nBL              sub_1000229F0                                          ; +0x154, 0x1003efed0\nADD             X1, SP, #0x20+var_18                                   ; +0x158, 0x1003efed4\nMOV             X0, X20                                                ; +0x15c, 0x1003efed8\nBL              GJTransformControl__updateAnchorSprite                 ; +0x160, 0x1003efedc\nLDP             X29, X30, [SP,#0x20+var_s0]                            ; +0x164, 0x1003efee0\nLDP             X20, X19, [SP,#0x20+var_10]                            ; +0x168, 0x1003efee4\nADD             SP, SP, #0x30 ; '0'                                    ; +0x16c, 0x1003efee8\nRET                                                                    ; +0x170, 0x1003efeec", "xrefs": ["EditorUI::keyDown @ 0x1003f9da4", "EditorUI::createMoveMenu @ 0x1003f48bc"], "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"}