//
// FriendsProfilePage::setupUsersBrowser from 0x4c3520 to 0x4c36e6 (454 bytes)
//
// 3 xrefs:
// > FriendsProfilePage::init @ 0x4c3c50
// > FriendsProfilePage::getUserListFinished @ 0x4c3e84
// > FriendsProfilePage::forceReloadList @ 0x4c3f52
//
// 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 FriendsProfilePage::setupUsersBrowser(FriendsProfilePage *a1, cocos2d::CCArray *a2, UserListType a3)
{
cocos2d::CCDirector *v6; // r0
cocos2d::CCTouchDispatcher *v7; // r0
cocos2d::CCDirector *v8; // r0
CustomListView *v9; // r0
GJCommentListLayer *v10; // r0
GJCommentListLayer *m_listLayer; // r9
void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r10
cocos2d::CCLabelBMFont *m_totalFriends; // r5
void (__fastcall *setString)(cocos2d::CCLabelBMFont *__hidden, const unsigned __int8 *); // r6
const char *v15; // r0
cocos2d::CCString *v16; // r0
const char *CString; // r0
GameManager *v18; // r0
int v19; // r4
GameManager *v20; // r0
GameManager *v21; // r0
GameManager *v22; // r0
cocos2d::CCSize v23; // [sp+14h] [bp-14h] BYREF
cocos2d::CCPoint v24; // [sp+1Ch] [bp-Ch] BYREF
if ( a1->m_listLayer )
{
v6 = cocos2d::CCDirector::sharedDirector();
v7 = v6->getTouchDispatcher(v6);
cocos2d::CCTouchDispatcher::unregisterForcePrio(v7, a1->m_listLayer);
a1->m_listLayer->removeMeAndCleanup(a1->m_listLayer);
a1->m_listLayer = nullptr;
}
v8 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(&v23, v8);
if ( a2 )
v9 = CustomListView::create(a2, (BoomListType)0, 196.0, 340.0);
else
v9 = nullptr;
v10 = GJCommentListLayer::create(v9, nullptr, (cocos2d::ccColor4B)-12684609, 340.0, 196.0, 0);
a1->m_listLayer = v10;
a1->m_mainLayer->addChild(a1->m_mainLayer, v10);
m_listLayer = a1->m_listLayer;
setPosition = m_listLayer->setPosition;
cocos2d::CCPoint::CCPoint(
&v24,
(float)(v23.width - 340.0) * 0.5,
(float)((float)((float)(v23.height - 196.0) * 0.5) - 10.0) + 5.0);
setPosition(m_listLayer, &v24);
if ( !a3 && a2 && cocos2d::CCArray::count(a2) )
{
m_totalFriends = a1->m_totalFriends;
setString = m_totalFriends->setString;
v15 = (const char *)cocos2d::CCArray::count(a2);
v16 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"Total friends: %i", v15);
CString = cocos2d::CCString::getCString(v16);
setString(m_totalFriends, (const unsigned __int8 *)CString);
}
else
{
a1->m_totalFriends->setString(a1->m_totalFriends, " ");
if ( a3 || !a2 )
return;
}
if ( cocos2d::CCArray::count(a2) )
{
v18 = GameManager::sharedState();
GameManager::reportAchievementWithID(v18, "geometry.ach.friends01", 100, 0);
v19 = cocos2d::CCArray::count(a2);
if ( v19 > 9 )
{
v20 = GameManager::sharedState();
GameManager::reportAchievementWithID(v20, "geometry.ach.friends02", 100, 0);
if ( v19 > 24 )
{
v21 = GameManager::sharedState();
GameManager::reportAchievementWithID(v21, "geometry.ach.friends03", 100, 0);
if ( v19 > 49 )
{
v22 = GameManager::sharedState();
GameManager::reportAchievementWithID(v22, "geometry.ach.friends04", 100, 0);
}
}
}
}
}