//
// ProfilePage::setupCommentsBrowser from 0x8fd9ac to 0x8fdb2c (384 bytes)
//
// 9 xrefs:
// > ProfilePage::onUpdate @ 0x8fdc20
// > ProfilePage::updateUserScoreFinished @ 0x8fde78
// > ProfilePage::init @ 0x8fe6ac
// > ProfilePage::init @ 0x8fe8b4
// > ProfilePage::init @ 0x8fe8f4
// > ProfilePage::loadCommentsFinished @ 0x8febac
// > ProfilePage::loadPage @ 0x8fedd8
// > ProfilePage::userInfoChanged @ 0x8ff1bc
// > ??> @ 0x34cc8
//
// 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 ProfilePage::setupCommentsBrowser(ProfilePage *a1, cocos2d::CCArray *a2)
{
cocos2d::CCDirector *v4; // x0
cocos2d::CCTouchDispatcher *v5; // x0
cocos2d::CCDirector *v6; // x0
CustomListView *v7; // x0
GJCommentListLayer *v8; // x0
cocos2d::CCLayer *m_mainLayer; // x2
GJCommentListLayer *m_list; // x22
void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x21
float v12; // [xsp+58h] [xbp+58h]
float v13; // [xsp+5Ch] [xbp+5Ch]
cocos2d::CCPoint v14; // [xsp+60h] [xbp+60h] BYREF
if ( a1->m_list )
{
v4 = cocos2d::CCDirector::sharedDirector();
v5 = v4->getTouchDispatcher(v4);
cocos2d::CCTouchDispatcher::unregisterForcePrio(v5, a1->m_list);
a1->m_list->removeMeAndCleanup(a1->m_list);
a1->m_list = nullptr;
}
v6 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(v6);
if ( a2 )
v7 = CustomListView::create(a2, (BoomListType)0, 100.0, 340.0);
else
v7 = nullptr;
v8 = GJCommentListLayer::create(v7, "Comments", (cocos2d::ccColor4B)-12684609, 340.0, 100.0, 0);
m_mainLayer = a1->m_mainLayer;
a1->m_list = v8;
m_mainLayer->addChild(m_mainLayer, v8);
m_list = a1->m_list;
setPosition = m_list->setPosition;
cocos2d::CCPoint::CCPoint(&v14, (float)(v12 - 340.0) * 0.5, (float)((float)(v13 - 100.0) * 0.5) + -53.0);
setPosition(m_list, &v14);
if ( a1->m_ownProfile )
cocos2d::CCMenu::giveMenuTouchPriority(a1->m_buttonMenu);
}