//
// BoomScrollLayer::instantMoveToPage from 0x14003de10 to 0x14003dee4 (212 bytes)
//
// 20 xrefs:
// > ListButtonBar::goToPage @ 0x14006b3f8
// > ListButtonBar::goToPage @ 0x14006b406
// > EditButtonBar::loadFromItems @ 0x1400d4e88
// > EditButtonBar::loadFromItems @ 0x1400d4e96
// > EditButtonBar::goToPage @ 0x1400d4f2f
// > EditButtonBar::goToPage @ 0x1400d4f47
// > EditButtonBar::onRight @ 0x1400d4f97
// > EditButtonBar::onRight @ 0x1400d4fb5
// > EditButtonBar::onLeft @ 0x1400d5003
// > EditButtonBar::onLeft @ 0x1400d501c
// > EditorUI::updateCreateMenu @ 0x14010f3b2
// > EditorUI::updateCreateMenu @ 0x14010f3c0
// > GauntletSelectLayer::goToPage @ 0x1401fa589
// > GJShopLayer::init @ 0x1402ab6be
// > GJShopLayer::init @ 0x1402ab6cc
// > LevelSelectLayer::init @ 0x140318c48
// > LevelSelectLayer::init @ 0x140318c57
// > SecretRewardsLayer::init @ 0x1403d4c38
// > SecretRewardsLayer::init @ 0x1403d4c46
// > ??> @ 0x1406c4038
//
// 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::instantMoveToPage(BoomScrollLayer *a1, int a2)
{
cocos2d::CCArray *m_pages; // rcx
BoomScrollLayer_vtbl *v5; // rax
float *v6; // rax
bool v7; // zf
cocos2d::CCPoint v8; // [rsp+30h] [rbp+8h] BYREF
if ( a1->m_looped
|| a2 >= 0
&& (!a1->m_dynamic ? (m_pages = a1->m_pages) : (m_pages = a1->m_dynamicObjects),
a2 < (int)cocos2d::CCArray::count(m_pages)) )
{
cocos2d::CCNode::stopActionByTag(a1->m_extendedLayer, 2);
v5 = a1->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
a1->m_pageMoving = 0;
v6 = (float *)v5->getContentSize(a1);
cocos2d::CCPoint::CCPoint(&v8, (float)(*v6 - a1->m_pageOffset) * (float)-a2, 0.0);
a1->m_extendedLayer->setPosition_0(a1->m_extendedLayer, &v8);
v7 = !a1->m_looped;
a1->m_page = a2;
if ( !v7 )
BoomScrollLayer::repositionPagesLooped(a1);
BoomScrollLayer::moveToPageEnded(a1);
}
}