//
// TopArtistsLayer::setupLeaderboard from 0x100310fa0 to 0x1003110d4 (308 bytes)
//
// 4 xrefs:
// > TopArtistsLayer::init @ 0x100310e31
// > TopArtistsLayer::loadListFinished @ 0x1003111dc
// > sub_100311200 @ 0x10031123d
// > TopArtistsLayer::loadPage @ 0x100311b3b
//
// 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 TopArtistsLayer::setupLeaderboard(TopArtistsLayer *a1, cocos2d::CCArray *a2)
{
cocos2d::CCDirector *v3; // rax
cocos2d::CCTouchDispatcher *v4; // rax
CustomListView *v5; // rdi
GJCommentListLayer *v6; // rax
GJCommentListLayer *m_listLayer; // rbx
float v8; // [rsp+0h] [rbp-20h] BYREF
float v9[6]; // [rsp+8h] [rbp-18h] BYREF
if ( a1->m_listLayer )
{
v3 = cocos2d::CCDirector::sharedDirector();
v4 = (cocos2d::CCTouchDispatcher *)((__int64 (__fastcall *)(cocos2d::CCDirector *))v3->getTouchDispatcher)(v3);
cocos2d::CCTouchDispatcher::unregisterForcePrio(v4, a1->m_listLayer);
((void (__fastcall *)(GJCommentListLayer *))a1->m_listLayer->removeMeAndCleanup)(a1->m_listLayer);
a1->m_listLayer = nullptr;
}
cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)v9);
if ( a2 )
v5 = CustomListView::create(a2, nullptr, 220.0, 340.0, 0, Artist, 0.0);
else
v5 = nullptr;
v6 = GJCommentListLayer::create(v5, "", (cocos2d::ccColor4B)-12684609, 340.0, 220.0, 1);
a1->m_listLayer = v6;
((void (__fastcall *)(cocos2d::CCLayer *, GJCommentListLayer *))a1->m_mainLayer->addChild)(a1->m_mainLayer, v6);
m_listLayer = a1->m_listLayer;
sub_10028CBE0(&v8, (float)(v9[0] + -340.0) * 0.5, (float)((float)(v9[1] + -220.0) * 0.5) + -10.0);
((void (__fastcall *)(GJCommentListLayer *, float *))m_listLayer->setPosition)(m_listLayer, &v8);
}