//
// TopArtistsLayer::setupLeaderboard from 0x500c00 to 0x500d04 (260 bytes)
//
// 3 xrefs:
// > TopArtistsLayer::loadListFinished @ 0x500d48
// > TopArtistsLayer::init @ 0x5011ea
// > TopArtistsLayer::loadPage @ 0x50150c
//
// 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 TopArtistsLayer::setupLeaderboard(TopArtistsLayer *a1, cocos2d::CCArray *a2)
{
cocos2d::CCDirector *v4; // r0
cocos2d::CCTouchDispatcher *v5; // r0
cocos2d::CCDirector *v6; // r0
CustomListView *v7; // r0
GJCommentListLayer *v8; // r0
GJCommentListLayer *m_listLayer; // r5
void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r7
cocos2d::CCSize v11; // [sp+14h] [bp-18h] BYREF
cocos2d::CCPoint v12; // [sp+1Ch] [bp-10h] BYREF
if ( a1->m_listLayer )
{
v4 = cocos2d::CCDirector::sharedDirector();
v5 = v4->getTouchDispatcher(v4);
cocos2d::CCTouchDispatcher::unregisterForcePrio(v5, a1->m_listLayer);
a1->m_listLayer->removeMeAndCleanup(a1->m_listLayer);
a1->m_listLayer = nullptr;
}
v6 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(&v11, v6);
if ( a2 )
v7 = CustomListView::create(a2, (BoomListType)0, 220.0, 340.0);
else
v7 = nullptr;
v8 = GJCommentListLayer::create(v7, (const char *)&unk_939830, (cocos2d::ccColor4B)-12684609, 340.0, 220.0, 1);
a1->m_listLayer = v8;
a1->m_mainLayer->addChild(a1->m_mainLayer, v8);
m_listLayer = a1->m_listLayer;
setPosition = m_listLayer->setPosition;
cocos2d::CCPoint::CCPoint(&v12, (float)(v11.width - 340.0) * 0.5, (float)((float)(v11.height - 220.0) * 0.5) - 10.0);
setPosition(m_listLayer, &v12);
}