//
// BoomScrollLayer::ccTouchMoved from 0x56e6b8 to 0x56e8dc (548 bytes)
//
// 3 xrefs:
// > `non-virtual thunk to'BoomScrollLayer::ccTouchMoved @ 0x56e8e0
// > ??> @ 0xab6a8
// > ??> @ 0x1135768
//
// 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; // x21
cocos2d::CCDirector *v5; // x0
float x; // w1
_BOOL4 m_cancelAndStealTouch; // w0
BoomScrollLayerDelegate *m_delegate; // x0
float v9; // s8
const cocos2d::CCSize *v10; // x0
float v11; // s8
int v12; // w21
float v13; // s9
float v14; // s10
cocos2d::CCDirector *v15; // x0
float v16; // s0
ExtendedLayer *m_extendedLayer; // x20
void (__fastcall *setPosition)(ExtendedLayer *__hidden, const cocos2d::CCPoint *); // x21
cocos2d::CCPoint v20; // [xsp+68h] [xbp+68h] BYREF
cocos2d::CCPoint v21; // [xsp+70h] [xbp+70h] BYREF
cocos2d::CCPoint v22; // 0:kr08_8.8
cocos2d::CCPoint v23; // 0:s0.4,4:s1.4
m_touch = a1->m_touch;
if ( m_touch == a2 && !*((_BYTE *)&a1->m_clippingRect + 16) )
{
cocos2d::CCTouch::getLocationInView(m_touch);
v5 = cocos2d::CCDirector::sharedDirector();
v22 = cocos2d::CCDirector::convertToGL(v5, &v20);
cocos2d::CCPoint::operator=(&v20, v22.x, v22.y);
if ( a1->m_touchType == 1 )
goto LABEL_11;
if ( vabds_f32(v20.x, a1->m_touchX) >= a1->m_minimumTouchLengthToSlide )
{
cocos2d::CCNode::stopActionByTag(a1->m_extendedLayer, 2);
a1->m_pageMoving = 0;
x = v20.x;
m_cancelAndStealTouch = a1->m_cancelAndStealTouch;
a1->m_touchType = 1;
a1->m_touchX = x;
if ( 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 )
{
LABEL_11:
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);
v12 = BoomScrollLayer::pageNumberForPosition(a1, v23);
BoomScrollLayer::positionForPageWithNumber(a1, v12);
v13 = v11 - v21.x;
if ( !v12 && v13 > 0.0 || v12 == BoomScrollLayer::getTotalPages(a1) - 1 && v13 < 0.0 )
{
v14 = v13 * a1->m_width;
v15 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(v15);
v16 = v13 - (float)(v14 / v21.x);
}
else
{
v16 = 0.0;
}
m_extendedLayer = a1->m_extendedLayer;
setPosition = m_extendedLayer->setPosition;
cocos2d::CCPoint::CCPoint(&v21, v11 - v16, 0.0);
setPosition(m_extendedLayer, &v21);
}
}
}
}