//
// GJScaleControl::ccTouchBegan from 0x69563c to 0x6957e4 (424 bytes)
//
// 3 xrefs:
// > `non-virtual thunk to'GJScaleControl::ccTouchBegan @ 0x6957e8
// > ??> @ 0xc8868
// > ??> @ 0x11577a0
//
// 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
//
bool GJScaleControl::ccTouchBegan(GJScaleControl *a1, cocos2d::CCTouch *a2, cocos2d::CCEvent *a3)
{
bool v5; // w21
Slider *m_sliderX; // x0
float Value; // s0
float v10; // s0
GJScaleControlDelegate *m_delegate; // x0
GJScaleControlDelegate *v12; // x0
Slider *m_sliderY; // x0
float v14; // s0
float v15; // s0
GJScaleControlDelegate *v16; // x0
cocos2d::CCPoint v17; // [xsp+48h] [xbp+48h] BYREF
cocos2d::CCPoint v18; // 0:kr08_8.8
v5 = 0;
if ( a1->m_touchID == -1 )
{
cocos2d::CCTouch::getLocation(a2);
v18 = cocos2d::CCNode::convertToNodeSpace(a1, &v17);
cocos2d::CCPoint::operator=(&v17, v18.x, v18.y);
v5 = a1->m_sliderX->ccTouchBegan(a1->m_sliderX, a2, a3);
if ( v5 )
{
m_sliderX = a1->m_sliderX;
a1->m_touchID = a2->m_nId;
Value = Slider::getValue(m_sliderX);
v10 = GJScaleControl::scaleFromValue(a1, Value);
m_delegate = a1->m_delegate;
a1->m_valueX = v10;
if ( m_delegate )
m_delegate->scaleChangeBegin(m_delegate);
a1->m_scaleButtonType = X;
}
else
{
v5 = a1->m_sliderY->ccTouchBegan(a1->m_sliderY, a2, a3);
if ( v5 )
{
m_sliderY = a1->m_sliderY;
a1->m_touchID = a2->m_nId;
v14 = Slider::getValue(m_sliderY);
v15 = GJScaleControl::scaleFromValue(a1, v14);
v16 = a1->m_delegate;
a1->m_valueY = v15;
if ( v16 )
v16->scaleChangeBegin(v16);
a1->m_scaleButtonType = Y;
}
else
{
v5 = a1->m_sliderXY->ccTouchBegan(a1->m_sliderXY, a2, a3);
if ( v5 )
{
v12 = a1->m_delegate;
a1->m_touchID = a2->m_nId;
if ( v12 )
v12->scaleChangeBegin(v12);
a1->m_scaleButtonType = XY;
}
}
}
}
return v5;
}