// // GJTransformControl::ccTouchMoved from 0x1003fbe04 to 0x1003fc324 (1312 bytes) // // 2 xrefs: // > sub_1003FC324 @ 0x1003fc328 // > @ 0x1008146d0 // // 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; // w8 GJTransformControl *m_mainNodeParent; // x0 __int64 v8; // x20 unsigned int v9; // w8 __int64 v10; // x21 __n128 v11; // q0 __n128 v12; // q1 float v13; // s8 float v14; // s9 __int64 v15; // x8 float v16; // s8 float v17; // s10 float v18; // s1 __int64 v19; // x8 float v20; // s4 float m_scaleX; // s2 float m_scaleY; // s3 __int64 v23; // x21 __n128 v24; // q0 __n128 v25; // q1 float v26; // s8 __int64 v27; // x0 __n128 v28; // q0 __int64 v29; // x8 float v30; // s0 __n128 v31; // q0 GJTransformControlDelegate *m_delegate; // x0 __int64 v33; // x21 float v34; // s8 __n128 v35; // q1 __n128 v36; // q0 float v37; // s8 float *v38; // x0 __n128 v39; // q0 __int64 v40; // x8 double v41; // d0 __int64 v42; // x0 __int64 v43; // x20 float v44; // s0 float v45; // s2 float v46; // s8 __n128 v47; // q1 __n128 v48; // q0 __n128 v49; // q0 __int64 v50; // x0 __int64 v51; // x20 float v52; // s0 float v53; // s2 float v54; // s8 __n128 v55; // q0 __n128 v56; // q1 __n128 v57; // q0 float32x2_t v58; // [xsp+0h] [xbp-50h] BYREF float32x2_t v59; // [xsp+8h] [xbp-48h] BYREF cocos2d::CCTouch::getLocation(a2); 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(m_mainNodeParent, (const cocos2d::CCPoint *)&v59); sub_1000229D0(&v59, (double *)&v58); if ( a1->m_touchID == a2->m_nId ) { v8 = sub_10024A388((__int64)a1->m_warpSprites, 0); v9 = (unsigned __int16)a1->m_transformButtonType; if ( v9 <= 5 ) { if ( v9 - 2 < 2 ) { v33 = sub_10024A388((__int64)a1->m_warpSprites, v9 - 1); v34 = v59.f32[0] + a1->m_cursorDifference.x; v35.n128_u32[0] = *(_DWORD *)((*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v33 + 192LL))(v33) + 4); v36.n128_f32[0] = v34; sub_100022980(v36, v35, &v58); (*(void (__fastcall **)(__int64, float32x2_t *))(*(_QWORD *)v33 + 184LL))(v33, &v58); v37 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v8 + 192LL))(v8); v38 = (float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v33 + 192LL))(v33); v40 = 464; if ( a1->m_transformButtonType == 3 ) v40 = 456; v39.n128_f32[0] = (float)(*v38 - v37) / (float)(*(float *)((char *)&a1->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable + v40) - v37); LODWORD(a1->m_scaleX) = v39.n128_u32[0]; ((void (__fastcall *)(__n128))a1->m_delegate->transformScaleXChanged)(v39); } else if ( v9 - 4 >= 2 ) { if ( v9 == 1 ) { *(float32x2_t *)&v41 = sub_1000229DC(&v59, (float32x2_t *)&a1->m_cursorDifference, &v58); (*(void (__fastcall **)(__int64, float32x2_t *, double))(*(_QWORD *)v8 + 184LL))(v8, &v58, v41); } } else { v23 = sub_10024A388((__int64)a1->m_warpSprites, v9 - 1); v24.n128_u32[0] = *(_DWORD *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v23 + 192LL))(v23); v25.n128_f32[0] = v59.f32[1] + a1->m_cursorDifference.y; sub_100022980(v24, v25, &v58); (*(void (__fastcall **)(__int64, float32x2_t *))(*(_QWORD *)v23 + 184LL))(v23, &v58); v26 = *(float *)((*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v8 + 192LL))(v8) + 4); v27 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v23 + 192LL))(v23); v29 = 468; if ( a1->m_transformButtonType == 4 ) v29 = 460; v28.n128_f32[0] = (float)(*(float *)(v27 + 4) - v26) / (float)(*(float *)((char *)&a1->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable + v29) - v26); LODWORD(a1->m_scaleY) = v28.n128_u32[0]; ((void (__fastcall *)(__n128))a1->m_delegate->transformScaleYChanged)(v28); } } else if ( (unsigned __int16)a1->m_transformButtonType >= 0xAu ) { switch ( v9 ) { case 0xAu: v42 = sub_10024A388((__int64)a1->m_warpSprites, 9u); v43 = v42; v44 = v59.f32[0] + a1->m_cursorDifference.x; v45 = 100.0; if ( v44 <= 100.0 ) v45 = v59.f32[0] + a1->m_cursorDifference.x; if ( v44 >= -100.0 ) v46 = v45; else v46 = -100.0; v47.n128_u32[0] = *(_DWORD *)((*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v42 + 192LL))(v42) + 4); v48.n128_f32[0] = v46; sub_100022980(v48, v47, &v58); (*(void (__fastcall **)(__int64, float32x2_t *))(*(_QWORD *)v43 + 184LL))(v43, &v58); v49.n128_f32[0] = v46 * 0.45; ((void (__fastcall *)(__n128))a1->m_delegate->transformSkewXChanged)(v49); break; case 0xBu: v50 = sub_10024A388((__int64)a1->m_warpSprites, 0xAu); v51 = v50; v52 = v59.f32[1] + a1->m_cursorDifference.y; v53 = 100.0; if ( v52 <= 100.0 ) v53 = v59.f32[1] + a1->m_cursorDifference.y; if ( v52 >= -100.0 ) v54 = v53; else v54 = -100.0; v55.n128_u32[0] = *(_DWORD *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v50 + 192LL))(v50); v56.n128_f32[0] = v54; sub_100022980(v55, v56, &v58); (*(void (__fastcall **)(__int64, float32x2_t *))(*(_QWORD *)v51 + 184LL))(v51, &v58); v57.n128_f32[0] = v54 * 0.45; ((void (__fastcall *)(__n128))a1->m_delegate->transformSkewYChanged)(v57); break; case 0xCu: v30 = (float)((float)((float)(atan2f( v59.f32[1] + a1->m_cursorDifference.y, v59.f32[0] + a1->m_cursorDifference.x) * -57.296) * 100.0) / 100.0) - a1->m_rotation; if ( v30 != a1->m_rotationY ) { a1->m_rotationY = v30; ((void (__fastcall *)(cocos2d::CCNode *))a1->m_mainNode->setRotation)(a1->m_mainNode); m_delegate = a1->m_delegate; if ( m_delegate ) { v31.n128_u32[0] = LODWORD(a1->m_rotationY); ((void (__fastcall *)(__n128))m_delegate->transformRotationChanged)(v31); } } break; } } else { v10 = sub_10024A388((__int64)a1->m_warpSprites, v9 - 1); v11.n128_f32[0] = v59.f32[0] + a1->m_cursorDifference.x; v12.n128_f32[0] = v59.f32[1] + a1->m_cursorDifference.y; sub_100022980(v11, v12, &v58); (*(void (__fastcall **)(__int64, float32x2_t *))(*(_QWORD *)v10 + 184LL))(v10, &v58); v13 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v8 + 192LL))(v8); v14 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v10 + 192LL))(v10) - v13; v15 = 464; if ( ((a1->m_transformButtonType - 7) & 0xFFFD) == 0 ) v15 = 456; v16 = *(float *)((char *)&a1->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable + v15) - v13; v17 = *(float *)((*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v8 + 192LL))(v8) + 4); v18 = *(float *)((*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v10 + 192LL))(v10) + 4) - v17; v19 = 468; if ( (a1->m_transformButtonType & 0xFFFE) == 6 ) v19 = 460; v20 = *(float *)((char *)&a1->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable + v19) - v17; m_scaleX = a1->m_scaleX; m_scaleY = a1->m_scaleY; a1->m_scaleX = v14 / v16; a1->m_scaleY = v18 / v20; if ( a1->m_warpLocked ) a1->m_scaleY = (float)(v14 / v16) / (float)(m_scaleX / m_scaleY); ((void (__fastcall *)(GJTransformControlDelegate *))a1->m_delegate->transformScaleXYChanged)(a1->m_delegate); } GJTransformControl::updateButtons(a1, 0, 0); } }
GD Web Decomp Icon

GD Web Decomp

Raw Source