{"type": "func", "start": 4299139656, "end": 4299139900, "name": "GJRotationControl::ccTouchBegan", "pseudocode": "// \n// GJRotationControl::ccTouchBegan from 0x1003faa48 to 0x1003fab3c (244 bytes)\n// \n// 2 xrefs:\n// > sub_1003FAB3C @ 0x1003fab40\n// > <???> @ 0x100814d00\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\nbool __fastcall GJRotationControl::ccTouchBegan(GJRotationControl *a1, cocos2d::CCTouch *a2, cocos2d::CCEvent *a3)\n{\n  bool v3; // w20\n  float v6; // s0\n  double v7; // d0\n  GJRotationControlDelegate *m_delegate; // x0\n  cocos2d::CCSprite *m_controlSprite; // x19\n  cocos2d::CCSpriteFrameCache *v10; // x0\n  cocos2d::CCSpriteFrame *v11; // x0\n  float32x2_t v13; // [xsp+0h] [xbp-30h] BYREF\n  float32x2_t v14; // [xsp+8h] [xbp-28h] BYREF\n\n  if ( a1->m_touchID != -1 )\n    return 0;\n  cocos2d::CCTouch::getLocation(a2);\n  cocos2d::CCNode::convertToNodeSpace(a1, (const cocos2d::CCPoint *)&v14);\n  sub_1000229D0(&v14, (double *)&v13);\n  v6 = cocos2d::ccpDistance((const cocos2d::CCPoint *)&v14, &a1->m_controlPosition);\n  v3 = v6 < 24.0;\n  if ( v6 < 24.0 )\n  {\n    a1->m_startingRotation = a1->m_currentRotation;\n    sub_1000229F0(&v14, (float32x2_t *)&a1->m_controlPosition, &v13);\n    v7 = sub_1000229D0(&a1->m_cursorDifference, (double *)&v13);\n    a1->m_touchID = a2->m_nId;\n    m_delegate = a1->m_delegate;\n    if ( m_delegate )\n      ((void (__fastcall *)(GJRotationControlDelegate *, double))m_delegate->angleChangeBegin)(m_delegate, v7);\n    m_controlSprite = a1->m_controlSprite;\n    v10 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();\n    v11 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v10, \"GJ_rotationControlBtn02_001.png\");\n    ((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCSpriteFrame *))m_controlSprite->setDisplayFrame)(\n      m_controlSprite,\n      v11);\n  }\n  return v3;\n}", "assembly": "; \n; GJRotationControl::ccTouchBegan from 0x1003faa48 to 0x1003fab3c (244 bytes)\n; \n; 2 xrefs:\n; > sub_1003FAB3C @ 0x1003fab40\n; > <???> @ 0x100814d00\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, #0x40                                          ; +0x0, 0x1003faa48\nSTP             X22, X21, [SP,#0x30+var_20]                            ; +0x4, 0x1003faa4c\nSTP             X20, X19, [SP,#0x30+var_10]                            ; +0x8, 0x1003faa50\nSTP             X29, X30, [SP,#0x30+var_s0]                            ; +0xc, 0x1003faa54\nADD             X29, SP, #0x30                                         ; +0x10, 0x1003faa58\nLDR             W8, [X0,#0x1B8]                                        ; +0x14, 0x1003faa5c\nCMN             W8, #1                                                 ; +0x18, 0x1003faa60\nB.EQ            loc_1003FAA70                                          ; +0x1c, 0x1003faa64\nMOV             W20, #0                                                ; +0x20, 0x1003faa68\nB               loc_1003FAB24                                          ; +0x24, 0x1003faa6c\nMOV             X21, X1                                                ; +0x28, 0x1003faa70\nMOV             X19, X0                                                ; +0x2c, 0x1003faa74\nADD             X8, SP, #0x30+var_28                                   ; +0x30, 0x1003faa78\nMOV             X0, X1                                                 ; +0x34, 0x1003faa7c\nBL              cocos2d__CCTouch__getLocation                          ; +0x38, 0x1003faa80\nMOV             X8, SP                                                 ; +0x3c, 0x1003faa84\nADD             X1, SP, #0x30+var_28                                   ; +0x40, 0x1003faa88\nMOV             X0, X19                                                ; +0x44, 0x1003faa8c\nBL              cocos2d__CCNode__convertToNodeSpace                    ; +0x48, 0x1003faa90\nADD             X0, SP, #0x30+var_28                                   ; +0x4c, 0x1003faa94\nMOV             X1, SP                                                 ; +0x50, 0x1003faa98\nBL              sub_1000229D0                                          ; +0x54, 0x1003faa9c\nADD             X0, SP, #0x30+var_28                                   ; +0x58, 0x1003faaa0\nADD             X1, X19, #0x19C                                        ; +0x5c, 0x1003faaa4\nBL              cocos2d__ccpDistance                                   ; +0x60, 0x1003faaa8\nFMOV            S1, #24.0                                              ; +0x64, 0x1003faaac\nFCMP            S0, S1                                                 ; +0x68, 0x1003faab0\nCSET            W20, MI                                                ; +0x6c, 0x1003faab4\nB.PL            loc_1003FAB24                                          ; +0x70, 0x1003faab8\nLDR             S0, [X19,#0x1B4]                                       ; +0x74, 0x1003faabc\nSTR             S0, [X19,#0x1B0]                                       ; +0x78, 0x1003faac0\nMOV             X8, SP                                                 ; +0x7c, 0x1003faac4\nADD             X0, SP, #0x30+var_28                                   ; +0x80, 0x1003faac8\nADD             X1, X19, #0x19C                                        ; +0x84, 0x1003faacc\nBL              sub_1000229F0                                          ; +0x88, 0x1003faad0\nADD             X0, X19, #0x194                                        ; +0x8c, 0x1003faad4\nMOV             X1, SP                                                 ; +0x90, 0x1003faad8\nBL              sub_1000229D0                                          ; +0x94, 0x1003faadc\nLDR             W8, [X21,#0x38]                                        ; +0x98, 0x1003faae0\nSTR             W8, [X19,#0x1B8]                                       ; +0x9c, 0x1003faae4\nLDR             X0, [X19,#0x1C0]                                       ; +0xa0, 0x1003faae8\nCBZ             X0, loc_1003FAAFC                                      ; +0xa4, 0x1003faaec\nLDR             X8, [X0]                                               ; +0xa8, 0x1003faaf0\nLDR             X8, [X8,#8]                                            ; +0xac, 0x1003faaf4\nBLR             X8                                                     ; +0xb0, 0x1003faaf8\nLDR             X19, [X19,#0x1A8]                                      ; +0xb4, 0x1003faafc\nBL              cocos2d__CCSpriteFrameCache__sharedSpriteFrameCache    ; +0xb8, 0x1003fab00\nADRL            X1, aGjRotationcont_0; \"GJ_rotationControlBtn02_001.png\" ; +0xbc, 0x1003fab04\nBL              cocos2d__CCSpriteFrameCache__spriteFrameByName         ; +0xc4, 0x1003fab0c\nMOV             X1, X0                                                 ; +0xc8, 0x1003fab10\nLDR             X8, [X19]                                              ; +0xcc, 0x1003fab14\nLDR             X8, [X8,#0x478]                                        ; +0xd0, 0x1003fab18\nMOV             X0, X19                                                ; +0xd4, 0x1003fab1c\nBLR             X8                                                     ; +0xd8, 0x1003fab20\nMOV             X0, X20                                                ; +0xdc, 0x1003fab24\nLDP             X29, X30, [SP,#0x30+var_s0]                            ; +0xe0, 0x1003fab28\nLDP             X20, X19, [SP,#0x30+var_10]                            ; +0xe4, 0x1003fab2c\nLDP             X22, X21, [SP,#0x30+var_20]                            ; +0xe8, 0x1003fab30\nADD             SP, SP, #0x40 ; '@'                                    ; +0xec, 0x1003fab34\nRET                                                                    ; +0xf0, 0x1003fab38", "xrefs": ["sub_1003FAB3C @ 0x1003fab40", "<???> @ 0x100814d00"], "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"}