// // GJTransformControl::ccTouchMoved from 0x100053aa0 to 0x100053fcf (1327 bytes) // // 2 xrefs: // > sub_100054000 @ 0x10005400c // > @ 0x1008b0c90 // // 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 GJTransformControl::ccTouchMoved(GJTransformControl *a1, cocos2d::CCTouch *a2, cocos2d::CCEvent *a3) { int m_transformButtonType; // eax GJTransformControl *m_mainNodeParent; // rsi double v7; // xmm0_8 __int64 v8; // rax __int64 v9; // rsi __int64 v10; // r14 __int64 v11; // r15 unsigned int *v12; // rax __int64 v13; // rcx __int64 v14; // rax __int64 v15; // rcx __int64 v16; // rax float m_scaleX; // xmm2_4 float m_scaleY; // xmm1_4 __m128 v19; // xmm0 __int64 v20; // r15 float *v21; // rax __int64 v22; // rax __int64 v23; // r15 __int64 v24; // rax float *v25; // rax float v26; // xmm0_4 GJTransformControlDelegate *m_delegate; // rdi __int64 v28; // rax float v29; // xmm0_4 __int64 v30; // r14 float v31; // xmm1_4 __int64 v32; // rax __int64 v33; // rax float v34; // xmm0_4 __int64 v35; // r14 float v36; // xmm1_4 float *v37; // rax __m128 v38; // [rsp+0h] [rbp-70h] __m128 v39; // [rsp+10h] [rbp-60h] char v40; // [rsp+28h] [rbp-48h] BYREF __m128 inserted; // [rsp+30h] [rbp-40h] float v42; // [rsp+48h] [rbp-28h] BYREF float v43; // [rsp+4Ch] [rbp-24h] cocos2d::CCTouch::getLocation((cocos2d::CCTouch *)&v42); m_transformButtonType = (unsigned __int16)a1->m_transformButtonType; if ( m_transformButtonType == 12 || m_transformButtonType == 1 ) m_mainNodeParent = a1; else m_mainNodeParent = (GJTransformControl *)a1->m_mainNodeParent; cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)&v40, (const cocos2d::CCPoint *)m_mainNodeParent); v7 = sub_10028CC90(); if ( a1->m_touchID == a2->m_nId ) { v8 = sub_1007200C0(a1->m_warpSprites, 0); v9 = (unsigned int)(unsigned __int16)a1->m_transformButtonType - 1; v10 = v8; switch ( a1->m_transformButtonType ) { case 1: sub_10028CCE0(&v40, &v42); (*(void (__fastcall **)(__int64, char *, double))(*(_QWORD *)v10 + 184LL))(v10, &v40, v7); break; case 2: case 3: v23 = sub_1007200C0(a1->m_warpSprites, v9); inserted.f32[0] = v42 + a1->m_cursorDifference.x; v24 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v23 + 192LL))(v23); sub_10028CBE0(&v40, inserted.f32[0], *(float *)(v24 + 4)); (*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v23 + 184LL))(v23, &v40); inserted.i32[0] = *(_DWORD *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v10 + 192LL))(v10); v25 = (float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v23 + 192LL))(v23); a1->m_scaleX = (float)(*v25 - inserted.f32[0]) / (float)(*(&a1->m_topRight.x + 2 * (a1->m_transformButtonType != 3)) - inserted.f32[0]); ((void (__fastcall *)(GJTransformControlDelegate *))a1->m_delegate->transformScaleXChanged)(a1->m_delegate); break; case 4: case 5: v20 = sub_1007200C0(a1->m_warpSprites, v9); v21 = (float *)(*(__int64 (__fastcall **)(__int64, double))(*(_QWORD *)v20 + 192LL))(v20, v7); sub_10028CBE0(&v40, *v21, v43 + a1->m_cursorDifference.y); (*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v20 + 184LL))(v20, &v40); inserted.i32[0] = *(_DWORD *)((*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v10 + 192LL))(v10) + 4); v22 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v20 + 192LL))(v20); a1->m_scaleY = (float)(*(float *)(v22 + 4) - inserted.f32[0]) / (float)(*(&a1->m_topRight.y + 2 * (a1->m_transformButtonType != 4)) - inserted.f32[0]); ((void (__fastcall *)(GJTransformControlDelegate *))a1->m_delegate->transformScaleYChanged)(a1->m_delegate); break; case 6: case 7: case 8: case 9: v11 = sub_1007200C0(a1->m_warpSprites, v9); sub_10028CBE0(&v40, v42 + a1->m_cursorDifference.x, v43 + a1->m_cursorDifference.y); (*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v11 + 184LL))(v11, &v40); v12 = (unsigned int *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v10 + 192LL))(v10); v13 = *(_QWORD *)v11; inserted = (__m128)*v12; v39 = (__m128)*(unsigned int *)(*(__int64 (__fastcall **)(__int64))(v13 + 192))(v11); v38 = (__m128)*((unsigned int *)&a1->m_topRight.x + 2 * ((((unsigned __int16)*(_DWORD *)&a1->m_transformButtonType - 7) & 0xFFFD) != 0)); v14 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v10 + 192LL))(v10); v15 = *(_QWORD *)v11; inserted = _mm_insert_ps(inserted, (__m128)*(unsigned int *)(v14 + 4), 16); v16 = (*(__int64 (__fastcall **)(__int64))(v15 + 192))(v11); m_scaleX = a1->m_scaleX; m_scaleY = a1->m_scaleY; v19 = _mm_div_ps( _mm_sub_ps(_mm_insert_ps(v39, (__m128)*(unsigned int *)(v16 + 4), 16), inserted), _mm_sub_ps( _mm_insert_ps( v38, (__m128)*((unsigned int *)&a1->m_topRight.y + 2 * ((a1->m_transformButtonType & 0xFFFE) != 6)), 16), inserted)); _mm_storel_ps((double *)&a1->m_scaleX, v19); if ( a1->m_warpLocked ) a1->m_scaleY = v19.f32[0] / (float)(m_scaleX / m_scaleY); ((void (__fastcall *)(GJTransformControlDelegate *))a1->m_delegate->transformScaleXYChanged)(a1->m_delegate); break; case 0xA: v28 = sub_1007200C0(a1->m_warpSprites, 9); v29 = v42 + a1->m_cursorDifference.x; v30 = v28; v31 = -100.0; if ( v29 >= -100.0 ) { v31 = v42 + a1->m_cursorDifference.x; if ( v29 > 100.0 ) v31 = 100.0; } inserted.f32[0] = v31; v32 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v28 + 192LL))(v28); sub_10028CBE0(&v40, inserted.f32[0], *(float *)(v32 + 4)); (*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v30 + 184LL))(v30, &v40); ((void (__fastcall *)(GJTransformControlDelegate *, float))a1->m_delegate->transformSkewXChanged)( a1->m_delegate, inserted.f32[0] * 0.44999999); break; case 0xB: v33 = sub_1007200C0(a1->m_warpSprites, 10); v34 = v43 + a1->m_cursorDifference.y; v35 = v33; v36 = -100.0; if ( v34 >= -100.0 ) { v36 = v43 + a1->m_cursorDifference.y; if ( v34 > 100.0 ) v36 = 100.0; } inserted.f32[0] = v36; v37 = (float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v33 + 192LL))(v33); sub_10028CBE0(&v40, *v37, inserted.f32[0]); (*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v35 + 184LL))(v35, &v40); ((void (__fastcall *)(GJTransformControlDelegate *, float))a1->m_delegate->transformSkewYChanged)( a1->m_delegate, inserted.f32[0] * 0.44999999); break; case 0xC: v26 = (float)((float)((float)(atan2f(v43 + a1->m_cursorDifference.y, v42 + a1->m_cursorDifference.x) * -57.29578) * 100.0) / 100.0) - a1->m_rotation; if ( v26 != a1->m_rotationY ) { a1->m_rotationY = v26; ((void (__fastcall *)(cocos2d::CCNode *))a1->m_mainNode->setRotation)(a1->m_mainNode); m_delegate = a1->m_delegate; if ( m_delegate ) ((void (__fastcall *)(GJTransformControlDelegate *, float))m_delegate->transformRotationChanged)( m_delegate, a1->m_rotationY); } break; default: break; } GJTransformControl::updateButtons(a1, 0, 0); } }
GD Web Decomp Icon

GD Web Decomp

Raw Source