//
// cocos2d::extension::CCControlSlider::locationFromTouch from 0xa9e9cc to 0xa9eaa8 (220 bytes)
//
// 3 xrefs:
// > cocos2d::extension::CCControlSlider::ccTouchBegan @ 0xa9ec94
// > cocos2d::extension::CCControlSlider::ccTouchMoved @ 0xa9ed60
// > ??> @ 0xab4b0
//
// 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
//
cocos2d::CCPoint cocos2d::extension::CCControlSlider::locationFromTouch(
cocos2d::extension::CCControlSlider *a1,
cocos2d::CCTouch *a2)
{
cocos2d::CCPoint *v2; // x8
cocos2d::CCPoint *v3; // x19
float x; // s8
cocos2d::CCPoint v8; // 0:kr08_8.8
cocos2d::CCPoint result; // 0:s0.4,4:s1.4
v3 = v2;
cocos2d::CCTouch::getLocation(a2);
v8 = cocos2d::CCNode::convertToNodeSpace(a1, v3);
cocos2d::CCPoint::operator=(v3, v8.x, v8.y);
x = v3->x;
if ( v3->x < 0.0 )
{
result.x = 0.0;
v3->x = 0.0;
}
else
{
result.x = *(float *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)&a1[1].m_unknown2 + 312LL))(*(_QWORD *)&a1[1].m_unknown2);
if ( x > result.x )
v3->x = *(float *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)&a1[1].m_unknown2 + 312LL))(*(_QWORD *)&a1[1].m_unknown2);
}
return result;
}