// // GJScaleControl::ccTouchMoved from 0x695a7c to 0x695dac (816 bytes) // // 3 xrefs: // > `non-virtual thunk to'GJScaleControl::ccTouchMoved @ 0x695dbc // > @ 0x5a9f0 // > @ 0x11577a8 // // 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 GJScaleControl::ccTouchMoved(GJScaleControl *a1, cocos2d::CCTouch *a2, cocos2d::CCEvent *a3) { Slider *m_sliderY; // x20 float Value; // s10 float v6; // s0 float v7; // s8 int m_scaleButtonType; // w1 GJScaleControlDelegate *m_delegate; // x0 float v10; // s9 float m_valueY; // s10 float v12; // s0 float v13; // s0 Slider *m_sliderX; // x20 float v15; // s0 float m_valueX; // s0 float v17; // s1 _BOOL4 v18; // w0 float v19; // s0 float v20; // s0 float v21; // s0 if ( a1->m_touchID == a2->m_nId ) { if ( a1->m_scaleButtonType ) { if ( a1->m_scaleButtonType == Y ) m_sliderY = a1->m_sliderY; else m_sliderY = a1->m_sliderXY; } else { m_sliderY = a1->m_sliderX; } Value = Slider::getValue(m_sliderY); m_sliderY->ccTouchMoved(m_sliderY, a2, a3); v6 = Slider::getValue(m_sliderY); v7 = GJScaleControl::scaleFromValue(a1, v6); if ( v7 > 0.97 && v7 < 1.03 && a1->m_scale1Lock ) { v7 = 1.0; v21 = GJScaleControl::valueFromScale(a1, 1.0); Slider::setValue(m_sliderY, v21); } m_scaleButtonType = a1->m_scaleButtonType; if ( m_scaleButtonType != 2 ) { m_delegate = a1->m_delegate; a1->m_changedValueX = v7; a1->m_changedValueY = v7; if ( !m_delegate ) { v10 = v7; goto LABEL_13; } if ( !m_scaleButtonType ) { v10 = v7; ((void (__fastcall *)(GJScaleControlDelegate *, bool, float))m_delegate->scaleXChanged)( m_delegate, a1->m_scaleLocked, v7); m_scaleButtonType = a1->m_scaleButtonType; goto LABEL_13; } v10 = v7; if ( m_scaleButtonType == 1 ) { ((void (__fastcall *)(GJScaleControlDelegate *, bool, float))m_delegate->scaleYChanged)( m_delegate, a1->m_scaleLocked, v7); m_scaleButtonType = a1->m_scaleButtonType; goto LABEL_13; } LABEL_12: ((void (__fastcall *)(GJScaleControlDelegate *, bool, float, float))m_delegate->scaleXYChanged)( m_delegate, a1->m_scaleLocked, v7, v10); m_scaleButtonType = a1->m_scaleButtonType; LABEL_13: if ( !m_scaleButtonType ) { m_valueY = a1->m_valueY; if ( m_valueY > v7 ) goto LABEL_15; LABEL_23: m_valueY = v7; LABEL_15: GJScaleControl::updateLabelX(a1, v7); if ( a1->m_scaleButtonType == X ) { LABEL_16: GJScaleControl::updateLabelXY(a1, m_valueY); if ( a1->m_scaleButtonType == XY ) { m_sliderX = a1->m_sliderX; v15 = GJScaleControl::valueFromScale(a1, v7); Slider::setValue(m_sliderX, v15); m_sliderY = a1->m_sliderY; v12 = v10; } else { v12 = m_valueY; m_sliderY = a1->m_sliderXY; } v13 = GJScaleControl::valueFromScale(a1, v12); goto LABEL_19; } LABEL_41: GJScaleControl::updateLabelY(a1, v10); goto LABEL_16; } if ( m_scaleButtonType == 1 ) { m_valueY = a1->m_valueX; if ( m_valueY < v10 ) m_valueY = v10; goto LABEL_41; } LABEL_22: m_valueY = v10; if ( v7 < v10 ) goto LABEL_15; goto LABEL_23; } m_valueX = a1->m_valueX; v17 = a1->m_valueY; if ( m_valueX == v17 ) { v10 = v7; if ( v7 == a1->m_changedValueX ) { if ( v7 > a1->m_upperBound ) goto LABEL_46; v10 = v7; v18 = 1; v20 = v7; LABEL_35: if ( a1->m_lowerBound <= v20 && !v18 ) { m_delegate = a1->m_delegate; a1->m_changedValueX = v7; a1->m_changedValueY = v10; if ( !m_delegate ) goto LABEL_22; goto LABEL_12; } LABEL_46: v13 = Value; LABEL_19: Slider::setValue(m_sliderY, v13); return; } } else { if ( m_valueX > v17 ) { v10 = (float)(int)llroundf((float)(v17 * (float)(v7 / m_valueX)) * 100.0) / 100.0; } else { v10 = v7; v7 = (float)(int)llroundf((float)(m_valueX * (float)(v7 / v17)) * 100.0) / 100.0; } v18 = 1; if ( a1->m_changedValueX == v7 ) goto LABEL_30; } v18 = a1->m_changedValueY == v10; LABEL_30: v19 = v10; if ( v7 >= v10 ) v19 = v7; if ( a1->m_upperBound < v19 ) goto LABEL_46; v20 = v10; if ( v7 <= v10 ) v20 = v7; goto LABEL_35; } }
GD Web Decomp Icon

GD Web Decomp

Raw Source