//
// BoomScrollLayer::instantMoveToPage from 0x10012c008 to 0x10012c0e0 (216 bytes)
//
// 11 xrefs:
// > ListButtonBar::goToPage @ 0x100168264
// > ListButtonBar::goToPage @ 0x100168270
// > GauntletSelectLayer::goToPage @ 0x1001bfdc0
// > SecretRewardsLayer::init @ 0x1002e9844
// > SecretRewardsLayer::init @ 0x1002e9850
// > LevelSelectLayer::init @ 0x100401e38
// > LevelSelectLayer::init @ 0x100401e74
// > EditButtonBar::loadFromItems @ 0x1004213b4
// > EditButtonBar::loadFromItems @ 0x1004213c0
// > EditButtonBar::goToPage @ 0x100421538
// > EditButtonBar::goToPage @ 0x10042154c
//
// 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 __fastcall BoomScrollLayer::instantMoveToPage(BoomScrollLayer *a1, int a2)
{
__int64 v4; // x8
__n128 v5; // q0
__n128 v6; // q1
int v7; // [xsp+8h] [xbp-28h] BYREF
if ( a1->m_looped )
goto LABEL_6;
if ( (a2 & 0x80000000) == 0 )
{
v4 = 472;
if ( a1->m_dynamic )
v4 = 440;
if ( (int)sub_10024A36C(*(BoomScrollLayer_vtbl **)((char *)&a1->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable
+ v4)) > a2 )
{
LABEL_6:
cocos2d::CCNode::stopActionByTag(a1->m_extendedLayer, 2);
a1->m_pageMoving = 0;
v5.n128_f32[0] = (float)(*(float *)((__int64 (__fastcall *)(BoomScrollLayer *))a1->getContentSize)(a1)
- a1->m_pageOffset)
* (float)-a2;
v6.n128_u32[0] = 0;
sub_100022980(v5, v6, &v7);
((void (__fastcall *)(ExtendedLayer *, int *))a1->m_extendedLayer->setPosition)(a1->m_extendedLayer, &v7);
a1->m_page = a2;
if ( a1->m_looped )
BoomScrollLayer::repositionPagesLooped(a1);
BoomScrollLayer::moveToPageEnded(a1);
}
}
}