//
// ShardsPage::goToPage from 0x4fb2b8 to 0x4fb37a (194 bytes)
//
// 2 xrefs:
// > ShardsPage::onSwitchPage @ 0x4fb3a4
// > ShardsPage::init @ 0x4fc514
//
// 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 ShardsPage::goToPage(ShardsPage *a1, int a2)
{
intptr_t v4; // r9
signed int v5; // r8
cocos2d::CCObject *v6; // r0
cocos2d::CCObject_vtbl *v7; // r2
bool (__fastcall *isEqual)(cocos2d::CCObject *__hidden, const cocos2d::CCObject *); // r7
bool (__fastcall *v9)(cocos2d::CCObject *__hidden, const cocos2d::CCObject *); // r4
int v10; // r0
int v11; // t1
cocos2d::CCSprite *m_tierSprite; // r4
void (__fastcall *setDisplayFrame)(cocos2d::CCSprite *__hidden, cocos2d::CCSpriteFrame *); // r6
cocos2d::CCSpriteFrameCache *v14; // r0
const char *v15; // r1
cocos2d::CCSpriteFrame *v16; // r0
if ( (unsigned int)a2 <= 3 && a2 != a1->m_page )
{
a1->m_page = a2;
v4 = 0;
v5 = cocos2d::CCDictionary::count(a1->m_pages);
while ( v4 < v5 )
{
v6 = cocos2d::CCDictionary::objectForKey(a1->m_pages, v4);
if ( v6 )
{
v7 = v6[1].__vftable;
if ( v7->copyWithZone )
{
isEqual = v7->isEqual;
v9 = (bool (__fastcall *)(cocos2d::CCObject *__hidden, const cocos2d::CCObject *))((char *)isEqual
+ 4
* ((int)v7->copyWithZone
+ 0x3FFFFFFF));
while ( (unsigned int)isEqual <= (unsigned int)v9 )
{
v11 = *(_DWORD *)isEqual;
isEqual = (bool (__fastcall *)(cocos2d::CCObject *__hidden, const cocos2d::CCObject *))((char *)isEqual + 4);
v10 = v11;
if ( !v11 )
break;
(*(void (__fastcall **)(int, bool))(*(_DWORD *)v10 + 164))(v10, v4 == a2);
}
}
}
++v4;
}
a1->m_prevButton->setVisible(a1->m_prevButton, a2 > 0);
a1->m_nextButton->setVisible(a1->m_nextButton, a2 <= 2);
m_tierSprite = a1->m_tierSprite;
setDisplayFrame = m_tierSprite->setDisplayFrame;
v14 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
if ( a2 > 1 )
v15 = "tier2Icon_001.png";
else
v15 = "tier1Icon_001.png";
v16 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v14, v15);
setDisplayFrame(m_tierSprite, v16);
}
}