//
// CCScrollLayerExt::ccTouchMoved from 0x2e85fc to 0x2e8702 (262 bytes)
//
// 2 xrefs:
// > `non-virtual thunk to'CCScrollLayerExt::ccTouchMoved @ 0x2e870c
// > TableView::ccTouchMoved @ 0x2ea63c
//
// 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 CCScrollLayerExt::ccTouchMoved(CCScrollLayerExt *a1, cocos2d::CCTouch *a2, cocos2d::CCEvent *a3)
{
cocos2d::CCDirector *v5; // r0
const cocos2d::CCPoint *v6; // r0
float v7; // s16
float MaxY; // r0
CCScrollLayerExtDelegate *m_delegate; // r0
cocos2d::CCPoint v10; // [sp+4h] [bp-10h] BYREF
_DWORD v11[2]; // [sp+Ch] [bp-8h] BYREF
cocos2d::CCPoint v12; // [sp+14h] [bp+0h] BYREF
a1->m_touchDown = 1;
cocos2d::CCTouch::getLocationInView(&v10, a2);
v5 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::convertToGL(&v12, v5, &v10);
cocos2d::CCPoint::operator=(&v10, &v12);
if ( a2 == a1->m_touch )
{
cocos2d::CCPoint::operator-(v11, &v10, &a1->m_touchPosition);
if ( a1->m_disableVertical )
{
v11[1] = 0;
}
else if ( a1->m_disableHorizontal )
{
v11[0] = 0;
}
v6 = a1->m_contentLayer->getPosition(a1->m_contentLayer);
cocos2d::CCPoint::operator+(&v12, v6, v11);
v7 = CCScrollLayerExt::getMinY(a1) - a1->m_peekLimitTop;
MaxY = CCScrollLayerExt::getMaxY(a1);
if ( v12.y >= v7 )
{
if ( v12.y > (float)(MaxY + a1->m_peekLimitBottom) )
v12.y = MaxY + a1->m_peekLimitBottom;
}
else
{
v12.y = v7;
}
a1->m_contentLayer->setPosition(a1->m_contentLayer, &v12);
a1->m_notAtEndOfScroll = 1;
cocos2d::CCPoint::operator=(&a1->m_touchPosition, &v10);
m_delegate = a1->m_delegate;
if ( m_delegate )
m_delegate->scrollViewTouchMoving(m_delegate, a1);
}
}