// // GJTransformControl::ccTouchMoved from 0x6b9584 to 0x6b9adc (1368 bytes) // // 3 xrefs: // > `non-virtual thunk to'GJTransformControl::ccTouchMoved @ 0x6b9af0 // > @ 0xa5d68 // > @ 0x1157d18 // // 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 GJTransformControl::ccTouchMoved(GJTransformControl *a1, cocos2d::CCTouch *a2, cocos2d::CCEvent *a3) { int m_transformButtonType; // w0 GJTransformControl *m_mainNodeParent; // x0 cocos2d::CCSprite *v7; // x23 int v8; // w1 cocos2d::CCSprite *v9; // x21 void (__fastcall *v10)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x24 float v11; // s9 float v12; // s8 float v13; // s0 float v14; // s9 float v15; // s10 float v16; // s1 float v17; // s2 _BOOL4 m_warpLocked; // w0 float m_scaleX; // s3 float m_scaleY; // s4 cocos2d::CCSprite *v21; // x0 cocos2d::CCSprite *v22; // x21 float v23; // s8 void (__fastcall *v24)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x23 float *v25; // x0 cocos2d::CCSprite *v26; // x0 cocos2d::CCSprite *v27; // x21 float v28; // s8 void (__fastcall *v29)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x23 __int64 v30; // x0 cocos2d::CCSprite *v31; // x21 void (__fastcall *v32)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x24 float *v33; // x0 float y; // s8 float v35; // s0 float v36; // s1 GJTransformControlDelegate *v37; // x0 void (__fastcall *transformScaleYChanged)(GJTransformControlDelegate *__hidden, float); // x1 float v39; // s0 cocos2d::CCSprite *v40; // x21 void (__fastcall *v41)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x24 __int64 v42; // x0 float x; // s8 float v44; // s0 float v45; // s1 GJTransformControlDelegate *m_delegate; // x0 void (__fastcall *transformScaleXChanged)(GJTransformControlDelegate *__hidden, float); // x1 float v48; // s0 float v49; // s0 float m_rotation; // s3 float v51; // s0 float v52; // s1 cocos2d::CCNode *m_mainNode; // x0 cocos2d::CCNode_vtbl *v54; // x1 GJTransformControlDelegate *v55; // x0 void (__fastcall *setPosition)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x21 float v57; // [xsp+60h] [xbp+60h] cocos2d::CCPoint v58; // [xsp+78h] [xbp+78h] BYREF cocos2d::CCPoint v59; // [xsp+80h] [xbp+80h] BYREF cocos2d::CCPoint v60; // 0:kr08_8.8 cocos2d::CCTouch::getLocation(a2); m_transformButtonType = a1->m_transformButtonType; if ( m_transformButtonType == 1 || m_transformButtonType == 12 ) m_mainNodeParent = a1; else m_mainNodeParent = (GJTransformControl *)a1->m_mainNodeParent; v60 = cocos2d::CCNode::convertToNodeSpace(m_mainNodeParent, &v58); cocos2d::CCPoint::operator=(&v58, v60.x, v60.y); if ( a1->m_touchID == a2->m_nId ) { v7 = GJTransformControl::spriteByTag(a1, 1); v8 = a1->m_transformButtonType; switch ( a1->m_transformButtonType ) { case 1: setPosition = v7->setPosition; cocos2d::CCPoint::operator+(&v59, &v58, &a1->m_cursorDifference); setPosition(v7, &v59); break; case 2: case 3: v40 = GJTransformControl::spriteByTag(a1, v8); v41 = v40->setPosition; v57 = v58.x + a1->m_cursorDifference.x; v42 = (__int64)v40->getPosition(v40); cocos2d::CCPoint::CCPoint(&v59, v57, *(float *)(v42 + 4)); v41(v40, &v59); x = v7->getPosition(v7)->x; v44 = v40->getPosition(v40)->x - x; if ( a1->m_transformButtonType == 3 ) v45 = a1->m_topRight.x; else v45 = a1->m_bottomLeft.x; m_delegate = a1->m_delegate; transformScaleXChanged = m_delegate->transformScaleXChanged; v48 = v44 / (float)(v45 - x); a1->m_scaleX = v48; transformScaleXChanged(m_delegate, v48); break; case 4: case 5: v31 = GJTransformControl::spriteByTag(a1, v8); v32 = v31->setPosition; v33 = (float *)v31->getPosition(v31); cocos2d::CCPoint::CCPoint(&v59, *v33, v58.y + a1->m_cursorDifference.y); v32(v31, &v59); y = v7->getPosition(v7)->y; v35 = v31->getPosition(v31)->y - y; if ( a1->m_transformButtonType == 4 ) v36 = a1->m_topRight.y; else v36 = a1->m_bottomLeft.y; v37 = a1->m_delegate; transformScaleYChanged = v37->transformScaleYChanged; v39 = v35 / (float)(v36 - y); a1->m_scaleY = v39; transformScaleYChanged(v37, v39); break; case 6: case 7: case 8: case 9: v9 = GJTransformControl::spriteByTag(a1, v8); v10 = v9->setPosition; cocos2d::CCPoint::CCPoint(&v59, v58.x + a1->m_cursorDifference.x, v58.y + a1->m_cursorDifference.y); v10(v9, &v59); v11 = v7->getPosition(v7)->x; v12 = v9->getPosition(v9)->x - v11; if ( ((a1->m_transformButtonType - 7) & 0xFFFD) != 0 ) v13 = a1->m_bottomLeft.x; else v13 = a1->m_topRight.x; v14 = v13 - v11; v15 = v7->getPosition(v7)->y; v16 = v9->getPosition(v9)->y - v15; if ( (unsigned __int16)(a1->m_transformButtonType - 6) <= 1u ) v17 = a1->m_topRight.y; else v17 = a1->m_bottomLeft.y; m_warpLocked = a1->m_warpLocked; m_scaleX = a1->m_scaleX; m_scaleY = a1->m_scaleY; a1->m_scaleX = v12 / v14; a1->m_scaleY = v16 / (float)(v17 - v15); if ( m_warpLocked ) a1->m_scaleY = (float)(v12 / v14) / (float)(m_scaleX / m_scaleY); ((void (__fastcall *)(GJTransformControlDelegate *))a1->m_delegate->transformScaleXYChanged)(a1->m_delegate); break; case 0xA: v26 = GJTransformControl::spriteByTag(a1, 10); v27 = v26; v28 = v58.x + a1->m_cursorDifference.x; if ( v28 < -100.0 ) { v28 = -100.0; } else if ( v28 > 100.0 ) { v28 = 100.0; } v29 = v26->setPosition; v30 = (__int64)v26->getPosition(v26); cocos2d::CCPoint::CCPoint(&v59, v28, *(float *)(v30 + 4)); v29(v27, &v59); a1->m_delegate->transformSkewXChanged(a1->m_delegate, v28 * 0.45); break; case 0xB: v21 = GJTransformControl::spriteByTag(a1, 11); v22 = v21; v23 = v58.y + a1->m_cursorDifference.y; if ( v23 < -100.0 ) { v23 = -100.0; } else if ( v23 > 100.0 ) { v23 = 100.0; } v24 = v21->setPosition; v25 = (float *)v21->getPosition(v21); cocos2d::CCPoint::CCPoint(&v59, *v25, v23); v24(v22, &v59); a1->m_delegate->transformSkewYChanged(a1->m_delegate, v23 * 0.45); break; case 0xC: v49 = atan2f(v58.y + a1->m_cursorDifference.y, v58.x + a1->m_cursorDifference.x); m_rotation = a1->m_rotation; v51 = (float)-(float)(v49 * 57.296) * 100.0; v52 = (float)(v51 / 100.0) - m_rotation; if ( a1->m_rotationY != v52 ) { m_mainNode = a1->m_mainNode; v54 = m_mainNode->__vftable; a1->m_rotationY = v52; v54->setRotation(m_mainNode, (float)(v51 / 100.0) - m_rotation); v55 = a1->m_delegate; if ( v55 ) v55->transformRotationChanged(v55, a1->m_rotationY); } break; default: break; } GJTransformControl::updateButtons(a1, 0, 0); } }
GD Web Decomp Icon

GD Web Decomp

Raw Source