//
// OptionsScrollLayer::setupList from 0x14033adc0 to 0x14033af83 (451 bytes)
//
// 5 xrefs:
// > OptionsScrollLayer::create @ 0x14033ad82
// > OptionsScrollLayer::cellPerformedAction @ 0x14033b04e
// > ??> @ 0x140694a48
// > ??> @ 0x140694a58
// > ??> @ 0x1406d5444
//
// 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 OptionsScrollLayer::setupList(OptionsScrollLayer *a1, cocos2d::CCArray *a2)
{
CustomListView *v2; // rbx
__int64 v5; // rax
cocos2d::CCTouchDispatcher *v6; // rax
cocos2d::CCDirector *v7; // rax
const char *v8; // rdx
__int64 v9; // rcx
TableViewCellDelegate *v10; // r14
__int64 v11; // rax
cocos2d::ccArray *data; // rbx
cocos2d::CCArray *v13; // rbp
__int64 num; // rax
cocos2d::CCObject **arr; // rbx
cocos2d::CCObject **i; // rsi
cocos2d::CCObject *v17; // rdx
GJCommentListLayer *v18; // rax
cocos2d::CCLayer *m_mainLayer; // rcx
float v20; // xmm0_4
GJCommentListLayer_vtbl *v21; // rbx
const cocos2d::CCPoint *v22; // rax
int v23; // [rsp+20h] [rbp-48h]
float v24; // [rsp+70h] [rbp+8h]
v2 = nullptr;
if ( a1->m_listLayer )
{
v5 = cocos2d::CCDirector::sharedDirector(a1);
v6 = (cocos2d::CCTouchDispatcher *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v5 + 144LL))(v5);
cocos2d::CCTouchDispatcher::unregisterForcePrio(v6, a1->m_listLayer);
a1->m_listLayer->removeMeAndCleanup(a1->m_listLayer);
a1->m_listLayer = nullptr;
}
v7 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(a1);
cocos2d::CCDirector::getWinSize(v7);
if ( a2 )
{
v10 = &a1->TableViewCellDelegate;
if ( !a1 )
v10 = nullptr;
v11 = cocos2d::CCArray::create(v9);
data = a2->data;
v13 = (cocos2d::CCArray *)v11;
num = data->num;
if ( (_DWORD)num )
{
arr = data->arr;
for ( i = &arr[num - 1]; arr <= i; ++arr )
{
v17 = *arr;
if ( !*arr )
break;
if ( v17[1].m_uOrderOfArrival > a1->m_minCount || BYTE4(v17[1].__vftable) )
cocos2d::CCArray::addObject(v13, v17);
}
}
v2 = CustomListView::create(v13, v10, 220.0, 340.0, v23, Options, 0.0);
}
v18 = GJCommentListLayer::create(v2, v8, (cocos2d::ccColor4B)-12684609, 340.0, 220.0, 0);
m_mainLayer = a1->m_mainLayer;
a1->m_listLayer = v18;
v20 = ((float (__fastcall *)(cocos2d::CCLayer *, GJCommentListLayer *))m_mainLayer->addChild_1)(m_mainLayer, v18);
v21 = a1->m_listLayer->__vftable;
cocos2d::CCPoint::CCPoint(v20, (float)(v24 - 340.0) * 0.5);
v21->setPosition_0(a1->m_listLayer, v22);
}