//
// BoomScrollLayer::ccTouchMoved from 0x2e2a10 to 0x2e2ba0 (400 bytes)
//
// 1 xrefs:
// > `non-virtual thunk to'BoomScrollLayer::ccTouchMoved @ 0x2e2bac
//
// 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 BoomScrollLayer::ccTouchMoved(BoomScrollLayer *a1, cocos2d::CCTouch *a2, cocos2d::CCEvent *a3)
{
cocos2d::CCTouch *m_touch; // r8
cocos2d::CCDirector *v6; // r0
float x; // r3
BoomScrollLayerDelegate *m_delegate; // r0
float v9; // s16
const cocos2d::CCSize *v10; // r0
float v11; // s17
cocos2d::CCPoint v12; // r1
int v13; // r7
float v14; // s16
float v15; // s16
ExtendedLayer *m_extendedLayer; // r4
void (__fastcall *setPosition)(ExtendedLayer *__hidden, const cocos2d::CCPoint *); // r7
float m_width; // s18
cocos2d::CCDirector *v19; // r0
cocos2d::CCPoint v20; // [sp+4h] [bp-14h] BYREF
cocos2d::CCPoint v21; // [sp+Ch] [bp-Ch] BYREF
m_touch = a1->m_touch;
if ( m_touch == a2 && !*((_BYTE *)&a1->m_clippingRect + 16) )
{
cocos2d::CCTouch::getLocationInView(&v20, a2);
v6 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::convertToGL(&v21, v6, &v20);
cocos2d::CCPoint::operator=(&v20, &v21);
if ( a1->m_touchType != 1 && fabsf(v20.x - a1->m_touchX) >= a1->m_minimumTouchLengthToSlide )
{
cocos2d::CCNode::stopActionByTag(a1->m_extendedLayer, 2);
a1->m_touchType = 1;
x = v20.x;
a1->m_pageMoving = 0;
a1->m_touchX = x;
if ( a1->m_cancelAndStealTouch )
BoomScrollLayer::cancelAndStoleTouch(a1, m_touch, a3);
m_delegate = a1->m_delegate;
if ( m_delegate )
m_delegate->scrollLayerScrollingStarted(m_delegate, a1);
}
if ( a1->m_touchType == 1 )
{
v9 = (float)-a1->m_page;
v10 = a1->getContentSize(a1);
v11 = (float)(v20.x + (float)(v9 * (float)(v10->width - a1->m_pageOffset))) - a1->m_touchX;
cocos2d::CCPoint::CCPoint(&v21, v11, 0.0);
LODWORD(v12.x) = &v21;
v13 = BoomScrollLayer::pageNumberForPosition(a1, v12);
BoomScrollLayer::positionForPageWithNumber(&v21, a1, v13);
v14 = v11 - v21.x;
if ( !v13 && v14 > 0.0 || v13 == BoomScrollLayer::getTotalPages(a1) - 1 && v14 < 0.0 )
{
m_width = a1->m_width;
v19 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize((cocos2d::CCSize *)&v21, v19);
v15 = v14 - (float)((float)(v14 * m_width) / v21.x);
}
else
{
v15 = 0.0;
}
m_extendedLayer = a1->m_extendedLayer;
setPosition = m_extendedLayer->setPosition;
cocos2d::CCPoint::CCPoint(&v21, v11 - v15, 0.0);
setPosition(m_extendedLayer, &v21);
}
}
}