{"type": "func", "start": 4299139444, "end": 4299139656, "name": "GJRotationControl::updateSliderPosition", "pseudocode": "// \n// GJRotationControl::updateSliderPosition from 0x1003fa974 to 0x1003faa48 (212 bytes)\n// \n// 1 xrefs:\n// > GJRotationControl::ccTouchMoved @ 0x1003faba4\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 GJRotationControl::updateSliderPosition(GJRotationControl *a1, cocos2d::CCPoint a2)\n{\n  float *v2; // x1\n  float v4; // s8\n  __n128 v5; // q1\n  __n128 v6; // q0\n  double v7; // d0\n  float v8; // s0\n  float m_currentRotation; // s1\n  GJRotationControlDelegate *m_delegate; // x0\n  double v11; // [xsp+8h] [xbp-28h] BYREF\n  __float2 v12; // 0:kr00_8.8\n\n  v4 = atan2f(v2[1] - a1->m_cursorDifference.y, *v2 - a1->m_cursorDifference.x);\n  v12 = __sincosf_stret(v4);\n  v5.n128_f32[0] = (float)(v12.__sinval * 60.0) + 0.0;\n  v6.n128_f32[0] = (float)(v12.__cosval * 60.0) + 0.0;\n  sub_100022980(v6, v5, &v11);\n  v7 = sub_1000229D0(&a1->m_controlPosition, &v11);\n  ((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCPoint *, double))a1->m_controlSprite->setPosition)(\n    a1->m_controlSprite,\n    &a1->m_controlPosition,\n    v7);\n  v8 = roundf((float)(v4 * -57.296) * 1000.0) / 1000.0;\n  m_currentRotation = a1->m_currentRotation;\n  if ( v8 != m_currentRotation )\n  {\n    a1->m_currentRotation = v8;\n    m_delegate = a1->m_delegate;\n    if ( m_delegate )\n      ((void (__fastcall *)(GJRotationControlDelegate *, float))m_delegate->angleChanged)(\n        m_delegate,\n        v8 - m_currentRotation);\n  }\n}", "assembly": "; \n; GJRotationControl::updateSliderPosition from 0x1003fa974 to 0x1003faa48 (212 bytes)\n; \n; 1 xrefs:\n; > GJRotationControl::ccTouchMoved @ 0x1003faba4\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, 0x1003fa974\nSTP             D9, D8, [SP,#0x30+var_20]                              ; +0x4, 0x1003fa978\nSTP             X20, X19, [SP,#0x30+var_10]                            ; +0x8, 0x1003fa97c\nSTP             X29, X30, [SP,#0x30+var_s0]                            ; +0xc, 0x1003fa980\nADD             X29, SP, #0x30                                         ; +0x10, 0x1003fa984\nMOV             X19, X0                                                ; +0x14, 0x1003fa988\nLDR             S0, [X0,#0x194]                                        ; +0x18, 0x1003fa98c\nLDP             S1, S2, [X1]                                           ; +0x1c, 0x1003fa990\nFSUB            S1, S1, S0; float                                      ; +0x20, 0x1003fa994\nLDR             S0, [X0,#0x198]                                        ; +0x24, 0x1003fa998\nFSUB            S0, S2, S0; float                                      ; +0x28, 0x1003fa99c\nBL              _atan2f                                                ; +0x2c, 0x1003fa9a0\nFMOV            S8, S0                                                 ; +0x30, 0x1003fa9a4\nBL              ___sincosf_stret                                       ; +0x34, 0x1003fa9a8\nMOV             W8, #0x42700000                                        ; +0x38, 0x1003fa9ac\nFMOV            S3, W8                                                 ; +0x3c, 0x1003fa9b0\nFMOV            S4, WZR                                                ; +0x40, 0x1003fa9b4\nFMADD           S2, S1, S3, S4                                         ; +0x44, 0x1003fa9b8\nFMADD           S1, S0, S3, S4                                         ; +0x48, 0x1003fa9bc\nADD             X0, SP, #0x30+var_28                                   ; +0x4c, 0x1003fa9c0\nFMOV            S0, S2                                                 ; +0x50, 0x1003fa9c4\nBL              sub_100022980                                          ; +0x54, 0x1003fa9c8\nADD             X0, X19, #0x19C                                        ; +0x58, 0x1003fa9cc\nADD             X1, SP, #0x30+var_28                                   ; +0x5c, 0x1003fa9d0\nBL              sub_1000229D0                                          ; +0x60, 0x1003fa9d4\nLDR             X0, [X19,#0x1A8]                                       ; +0x64, 0x1003fa9d8\nLDR             X8, [X0]                                               ; +0x68, 0x1003fa9dc\nLDR             X8, [X8,#0xB8]                                         ; +0x6c, 0x1003fa9e0\nADD             X1, X19, #0x19C                                        ; +0x70, 0x1003fa9e4\nBLR             X8                                                     ; +0x74, 0x1003fa9e8\nADRP            X8, #dword_100639224@PAGE                              ; +0x78, 0x1003fa9ec\nLDR             S0, [X8,#dword_100639224@PAGEOFF]                      ; +0x7c, 0x1003fa9f0\nFMUL            S0, S8, S0                                             ; +0x80, 0x1003fa9f4\nMOV             W8, #0x447A0000                                        ; +0x84, 0x1003fa9f8\nFMOV            S1, W8                                                 ; +0x88, 0x1003fa9fc\nFMUL            S0, S0, S1                                             ; +0x8c, 0x1003faa00\nFRINTA          S0, S0                                                 ; +0x90, 0x1003faa04\nFDIV            S0, S0, S1                                             ; +0x94, 0x1003faa08\nLDR             S1, [X19,#0x1B4]                                       ; +0x98, 0x1003faa0c\nFCMP            S0, S1                                                 ; +0x9c, 0x1003faa10\nB.EQ            loc_1003FAA34                                          ; +0xa0, 0x1003faa14\nSTR             S0, [X19,#0x1B4]                                       ; +0xa4, 0x1003faa18\nLDR             X0, [X19,#0x1C0]                                       ; +0xa8, 0x1003faa1c\nCBZ             X0, loc_1003FAA34                                      ; +0xac, 0x1003faa20\nFSUB            S0, S0, S1                                             ; +0xb0, 0x1003faa24\nLDR             X8, [X0]                                               ; +0xb4, 0x1003faa28\nLDR             X8, [X8]                                               ; +0xb8, 0x1003faa2c\nBLR             X8                                                     ; +0xbc, 0x1003faa30\nLDP             X29, X30, [SP,#0x30+var_s0]                            ; +0xc0, 0x1003faa34\nLDP             X20, X19, [SP,#0x30+var_10]                            ; +0xc4, 0x1003faa38\nLDP             D9, D8, [SP,#0x30+var_20]                              ; +0xc8, 0x1003faa3c\nADD             SP, SP, #0x40 ; '@'                                    ; +0xcc, 0x1003faa40\nRET                                                                    ; +0xd0, 0x1003faa44", "xrefs": ["GJRotationControl::ccTouchMoved @ 0x1003faba4"], "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"}