//
// ScrollingLayer::ccTouchMoved from 0x5a9418 to 0x5a9570 (344 bytes)
//
// 3 xrefs:
// > `non-virtual thunk to'ScrollingLayer::ccTouchMoved @ 0x5a9574
// > ??> @ 0x8cd48
// > ??> @ 0x11442e8
//
// 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 ScrollingLayer::ccTouchMoved(ScrollingLayer *a1, cocos2d::CCTouch *a2, cocos2d::CCEvent *a3)
{
cocos2d::CCDirector *v4; // x0
const cocos2d::CCPoint *v5; // x25
float y; // s0
float v7; // s1
float v8; // s0
cocos2d::CCLayer *m_contentLayer; // x2
float v10; // s0
float v11; // s1
float v12; // [xsp+50h] [xbp+50h]
cocos2d::CCPoint v13; // [xsp+60h] [xbp+60h] BYREF
__int64 v14; // [xsp+68h] [xbp+68h] BYREF
cocos2d::CCPoint v15; // [xsp+70h] [xbp+70h] BYREF
cocos2d::CCPoint v16; // 0:kr08_8.8
cocos2d::CCTouch::getLocationInView(a2);
v4 = cocos2d::CCDirector::sharedDirector();
v16 = cocos2d::CCDirector::convertToGL(v4, &v13);
cocos2d::CCPoint::operator=(&v13, v16.x, v16.y);
if ( !(unsigned __int8)cocos2d::CCPoint::equals(&v13, &a1->m_touchPosition) )
{
v12 = v13.y - a1->m_touchPosition.y;
v5 = a1->m_contentLayer->getPosition(a1->m_contentLayer);
cocos2d::CCPoint::CCPoint(&v15, 0.0, v12);
cocos2d::CCPoint::operator+(&v14, v5, &v15);
y = a1->m_startOffset.y;
v7 = *((float *)&v14 + 1);
if ( y >= *((float *)&v14 + 1) )
{
v7 = a1->m_startOffset.y;
v8 = y + a1->m_scrollFactor;
if ( v7 < v8 )
goto LABEL_5;
}
else
{
v8 = y + a1->m_scrollFactor;
if ( *((float *)&v14 + 1) < v8 )
{
LABEL_5:
m_contentLayer = a1->m_contentLayer;
*((float *)&v14 + 1) = v7;
v10 = ((float (__fastcall *)(cocos2d::CCLayer *, __int64 *))m_contentLayer->setPosition)(m_contentLayer, &v14);
cocos2d::CCPoint::operator=(&a1->m_touchPosition, v10, v11);
return;
}
}
v7 = v8;
goto LABEL_5;
}
}