//
// LevelLeaderboard::reloadLeaderboard from 0x100250c24 to 0x100250d00 (220 bytes)
//
// 2 xrefs:
// > LevelLeaderboard::onChangeMode @ 0x100250348
// > LevelLeaderboard::onChangeType @ 0x100250570
//
// 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 LevelLeaderboard::reloadLeaderboard(
LevelLeaderboard *a1,
LevelLeaderboardType a2,
LevelLeaderboardMode a3)
{
cocos2d::CCDirector *v6; // x0
cocos2d::CCTouchDispatcher *v7; // x0
cocos2d::CCDirector *v8; // x0
cocos2d::CCTouchDispatcher *v9; // x0
LevelLeaderboard *v10; // x20
cocos2d::CCScene *m_pRunningScene; // x21
__int64 v12; // x2
if ( a1->m_list )
{
v6 = cocos2d::CCDirector::sharedDirector();
v7 = (cocos2d::CCTouchDispatcher *)((__int64 (__fastcall *)(cocos2d::CCDirector *))v6->getTouchDispatcher)(v6);
cocos2d::CCTouchDispatcher::unregisterForcePrio(v7, a1->m_list);
}
v8 = cocos2d::CCDirector::sharedDirector();
v9 = (cocos2d::CCTouchDispatcher *)((__int64 (__fastcall *)(cocos2d::CCDirector *))v8->getTouchDispatcher)(v8);
cocos2d::CCTouchDispatcher::unregisterForcePrio(v9, a1);
v10 = LevelLeaderboard::create(a1->m_level, a2, a3);
m_pRunningScene = cocos2d::CCDirector::sharedDirector()->m_pRunningScene;
if ( cocos2d::CCScene::getHighestChildZ(m_pRunningScene) < 105 )
v12 = 105;
else
v12 = (unsigned int)(cocos2d::CCScene::getHighestChildZ(m_pRunningScene) + 1);
((void (__fastcall *)(cocos2d::CCScene *, LevelLeaderboard *, __int64))m_pRunningScene->addChild_0)(
m_pRunningScene,
v10,
v12);
((void (__fastcall *)(LevelLeaderboard *, _QWORD))a1->setKeypadEnabled)(a1, 0);
((void (__fastcall *)(LevelLeaderboard *, __int64))a1->removeFromParentAndCleanup)(a1, 1);
}