//
// GJScaleControl::ccTouchBegan from 0x386bd0 to 0x386cce (254 bytes)
//
// 1 xrefs:
// > `non-virtual thunk to'GJScaleControl::ccTouchBegan @ 0x386cd8
//
// 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)
{
int v6; // r2
bool v7; // r3
int v8; // r5
Slider *m_sliderX; // r0
float Value; // r0
GJScaleControlDelegate *m_delegate; // r0
ScaleButtonType v12; // r3
Slider *m_sliderY; // r0
float v14; // r0
GJScaleControlDelegate *v15; // r0
GJScaleControlDelegate *v16; // r0
cocos2d::CCPoint v18; // [sp+4h] [bp-18h] BYREF
cocos2d::CCPoint v19; // [sp+Ch] [bp-10h] BYREF
if ( a1->m_touchID != -1 )
{
LOBYTE(v8) = 0;
return v8;
}
cocos2d::CCTouch::getLocation(&v18, a2);
cocos2d::CCNode::convertToNodeSpace(&v19, a1, &v18);
cocos2d::CCPoint::operator=((PlayerObject *)&v18, COERCE_FLOAT(&v19), v6, v7);
v8 = ((int (__fastcall *)(Slider *, cocos2d::CCTouch *, cocos2d::CCEvent *))a1->m_sliderX->ccTouchBegan)(
a1->m_sliderX,
a2,
a3);
if ( v8 )
{
m_sliderX = a1->m_sliderX;
a1->m_touchID = a2->m_nId;
Value = Slider::getValue(m_sliderX);
a1->m_valueX = GJScaleControl::scaleFromValue(a1, Value);
m_delegate = a1->m_delegate;
if ( m_delegate )
m_delegate->scaleChangeBegin(m_delegate);
v12 = X;
LABEL_14:
a1->m_scaleButtonType = v12;
return v8;
}
v8 = ((int (__fastcall *)(Slider *, cocos2d::CCTouch *, cocos2d::CCEvent *))a1->m_sliderY->ccTouchBegan)(
a1->m_sliderY,
a2,
a3);
if ( v8 )
{
m_sliderY = a1->m_sliderY;
a1->m_touchID = a2->m_nId;
v14 = Slider::getValue(m_sliderY);
a1->m_valueY = GJScaleControl::scaleFromValue(a1, v14);
v15 = a1->m_delegate;
if ( v15 )
v15->scaleChangeBegin(v15);
v12 = Y;
goto LABEL_14;
}
v8 = ((int (__fastcall *)(Slider *, cocos2d::CCTouch *, cocos2d::CCEvent *))a1->m_sliderXY->ccTouchBegan)(
a1->m_sliderXY,
a2,
a3);
if ( v8 )
{
v16 = a1->m_delegate;
a1->m_touchID = a2->m_nId;
if ( v16 )
v16->scaleChangeBegin(v16);
v12 = XY;
goto LABEL_14;
}
return v8;
}