// // GJRotationControl::ccTouchMoved from 0x100051ca0 to 0x100051ddd (317 bytes) // // 2 xrefs: // > sub_100051DE0 @ 0x100051dec // > @ 0x1008b1308 // // This function is hookable on this platform! // // Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings // void __fastcall GJRotationControl::ccTouchMoved(GJRotationControl *a1, cocos2d::CCTouch *a2, cocos2d::CCEvent *a3) { __m128 v4; // xmm0 __m128 v5; // xmm2 __m128 v6; // xmm0 float v7; // xmm0_4 float m_currentRotation; // xmm1_4 GJRotationControlDelegate *m_delegate; // rdi __int64 v10; // [rsp-50h] [rbp-50h] BYREF __m128 v11; // [rsp-48h] [rbp-48h] __int64 v12; // [rsp-30h] [rbp-30h] BYREF float v13; // [rsp-28h] [rbp-28h] BYREF unsigned int v14; // [rsp-24h] [rbp-24h] if ( a1->m_touchID == a2->m_nId ) { cocos2d::CCTouch::getLocation((cocos2d::CCTouch *)&v10); cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)&v12, (const cocos2d::CCPoint *)a1); sub_10028CC90(); sub_10028CC60(&v13); v4 = (__m128)v14; v4.f32[0] = atan2f(*(float *)&v14 - a1->m_cursorDifference.y, v13 - a1->m_cursorDifference.x); v11 = v4; *(__float2 *)v4.f32 = __sincosf_stret(v4.f32[0]); sub_10028CBE0(&v12, (float)(_mm_movehdup_ps(v4).f32[0] * 60.0) + 0.0, (float)(60.0 * v4.f32[0]) + 0.0); *(double *)v4.i64 = sub_10028CC90(); ((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCPoint *, double))a1->m_controlSprite->setPosition)( a1->m_controlSprite, &a1->m_controlPosition, *(double *)v4.i64); v5 = v11; v5.f32[0] = (float)(v11.f32[0] * -57.29578) * 1000.0; v6 = _mm_or_ps(_mm_and_ps((__m128)xmmword_1008150B0, v5), (__m128)xmmword_1008150C0); v6.f32[0] = v6.f32[0] + v5.f32[0]; v7 = _mm_round_ss(v6, v6, 11).f32[0] / 1000.0; m_currentRotation = a1->m_currentRotation; if ( v7 != m_currentRotation ) { a1->m_currentRotation = v7; m_delegate = a1->m_delegate; if ( m_delegate ) ((void (__fastcall *)(GJRotationControlDelegate *, float))m_delegate->angleChanged)( m_delegate, v7 - m_currentRotation); } } }
GD Web Decomp Icon

GD Web Decomp

Raw Source