//
// ScrollingLayer::ccTouchBegan from 0x2fdee0 to 0x2fdf78 (152 bytes)
//
// 1 xrefs:
// > `non-virtual thunk to'ScrollingLayer::ccTouchBegan @ 0x2fdf80
//
// 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 ScrollingLayer::ccTouchBegan(ScrollingLayer *a1, cocos2d::CCTouch *a2, cocos2d::CCEvent *a3)
{
int v5; // r5
cocos2d::CCDirector *v6; // r0
cocos2d::CCPoint v8; // [sp+4h] [bp-28h] BYREF
cocos2d::CCPoint v9; // [sp+Ch] [bp-20h] BYREF
cocos2d::CCRect v10; // [sp+14h] [bp-18h] BYREF
v5 = ((int (__fastcall *)(ScrollingLayer *, cocos2d::CCTouch *, cocos2d::CCEvent *))a1->isVisible)(a1, a2, a3);
if ( v5 )
{
ScrollingLayer::getViewRect(&v10, a1);
cocos2d::CCTouch::getLocationInView(&v8, a2);
v6 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::convertToGL(&v9, v6, &v8);
cocos2d::CCPoint::operator=(&v8, &v9);
if ( a1->m_touchID == -1 && (v5 = cocos2d::CCRect::containsPoint(&v10, &v8)) != 0 )
{
a1->m_touchID = a2->m_nId;
cocos2d::CCPoint::operator=(&a1->m_touchStartPosition, &v8);
cocos2d::CCPoint::operator=(&a1->m_touchPosition, &a1->m_touchStartPosition);
}
else
{
LOBYTE(v5) = 0;
}
}
return v5;
}