//
// LevelLeaderboard::reloadLeaderboard from 0x615e98 to 0x615f0c (116 bytes)
//
// 2 xrefs:
// > LevelLeaderboard::onChangeType @ 0x615f48
// > LevelLeaderboard::onChangeMode @ 0x615f7c
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:54:55 +0000
//
int __fastcall LevelLeaderboard::reloadLeaderboard(GJGameLevel **a1, int a2, int a3)
{
GJGameLevel **v3; // r4
int v6; // r0
cocos2d::CCTouchDispatcher *v7; // r0
int v8; // r0
cocos2d::CCTouchDispatcher *v9; // r0
cocos2d::CCDirector *v10; // r7
cocos2d::CCScene *v11; // r5
void (__fastcall *v12)(cocos2d::CCScene *, cocos2d::CCDirector *, int); // r6
int v13; // r2
v3 = a1;
if ( a1[136] )
{
v6 = cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)a1);
v7 = (cocos2d::CCTouchDispatcher *)(*(int (__fastcall **)(int))(*(_DWORD *)v6 + 80))(v6);
a1 = (GJGameLevel **)cocos2d::CCTouchDispatcher::unregisterForcePrio(v7, v3[136]);
}
v8 = cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)a1);
v9 = (cocos2d::CCTouchDispatcher *)(*(int (__fastcall **)(int))(*(_DWORD *)v8 + 80))(v8);
cocos2d::CCTouchDispatcher::unregisterForcePrio(v9, (cocos2d::CCObject *)v3);
v10 = (cocos2d::CCDirector *)LevelLeaderboard::create(v3[132], a2, a3);
v11 = *(cocos2d::CCScene **)(cocos2d::CCDirector::sharedDirector(v10) + 220);
v12 = *(void (__fastcall **)(cocos2d::CCScene *, cocos2d::CCDirector *, int))(*(_DWORD *)v11 + 232);
if ( (int)cocos2d::CCScene::getHighestChildZ(v11) <= 104 )
v13 = 105;
else
v13 = cocos2d::CCScene::getHighestChildZ(v11) + 1;
v12(v11, v10, v13);
return LevelLeaderboard::onClose((LevelLeaderboard *)v3, nullptr);
}