//
// TableView::reloadData from 0x2e95f0 to 0x2e993c (844 bytes)
//
// 4 xrefs:
// > BoomListView::setupList @ 0x2e1446
// > BoomListView::setupList @ 0x2e145c
// > CustomListView::setupList @ 0x3305aa
// > MPLobbyLayer::updateComments @ 0x535376
//
// 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 TableView::reloadData(TableView *a1)
{
TableViewDataSource *m_dataSource; // r0
signed int v3; // r9
cocos2d::CCNode *v4; // r7
int v5; // r6
cocos2d::CCNode *v6; // r5
TableViewDelegate *m_tableDelegate; // r0
CCIndexPath *v8; // r8
float v9; // s16
float x; // r10
int v11; // r0
float y; // s17
int *v13; // r10
int v14; // r0
int v15; // r1
float *v16; // r0
float *v17; // r0
cocos2d::CCPoint *v18; // r0
TableViewCell *v19; // r0
void (__fastcall *setAnchorPoint)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r10
void (__fastcall *v21)(cocos2d::CCNode *__hidden, const cocos2d::CCSize *); // r10
const cocos2d::CCSize *v22; // r0
void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r10
TableViewDelegate *v24; // r0
TableViewDelegate *v25; // r0
const cocos2d::CCSize *v26; // r0
CCContentLayer *m_contentLayer; // r11
void (__fastcall *setContentSize)(cocos2d::CCLayerColor *__hidden, const cocos2d::CCSize *); // r10
int *v29; // r11
float v30; // s19
int v31; // r0
int i; // [sp+0h] [bp-4Ch]
int v33; // [sp+Ch] [bp-40h]
int v34; // [sp+10h] [bp-3Ch]
int v35; // [sp+14h] [bp-38h]
float v36; // [sp+1Ch] [bp-30h]
cocos2d::CCPoint v37; // [sp+24h] [bp-28h] BYREF
cocos2d::CCSize v38; // [sp+2Ch] [bp-20h] BYREF
cocos2d::CCPoint v39; // [sp+34h] [bp-18h] BYREF
cocos2d::CCPoint v40; // [sp+3Ch] [bp-10h] BYREF
if ( a1->m_tableDelegate )
{
m_dataSource = a1->m_dataSource;
if ( m_dataSource )
{
v3 = 0;
v4 = nullptr;
v33 = m_dataSource->numberOfSectionsInTableView(m_dataSource, a1);
while ( v3 < v33 )
{
v5 = 0;
v34 = a1->m_dataSource->numberOfRowsInSection(a1->m_dataSource, v3, a1);
v35 = cocos2d::CCArray::count(a1->m_cellArray);
while ( v5 < v34 )
{
if ( v5 < v35 && (v6 = (cocos2d::CCNode *)cocos2d::CCArray::objectAtIndex(a1->m_cellArray, v5)) != nullptr )
{
m_tableDelegate = a1->m_tableDelegate;
if ( m_tableDelegate )
m_tableDelegate->TableViewWillReloadCellForRowAtIndexPath(
m_tableDelegate,
(CCIndexPath *)&v6[1].m_fScaleX,
(TableViewCell *)v6,
a1);
if ( !v5 )
v6->getPosition(v6);
}
else
{
v8 = CCIndexPath::CCIndexPathWithSectionRow(v3, v5);
v9 = COERCE_FLOAT(
((int (__fastcall *)(TableViewDelegate *, CCIndexPath *, TableView *))a1->m_tableDelegate->cellHeightForRowAtIndexPath)(
a1->m_tableDelegate,
v8,
a1));
cocos2d::CCPoint::CCPoint(&v37);
if ( v4 )
{
x = v4->getPosition(v4)->x;
v11 = (int)v4->getPosition(v4);
cocos2d::CCPoint::CCPoint(&v40, x, *(float *)(v11 + 4) - v9);
cocos2d::CCPoint::operator=(&v37, &v40);
}
else
{
v37.y = (float)(a1->m_contentLayer->getContentSize(a1->m_contentLayer)->height - (float)((float)v5 * v9))
- v9;
}
y = v37.y;
if ( v37.y < 0.0 && !TableView::isDuplicateIndexPath(a1, v8) )
{
v26 = a1->m_contentLayer->getContentSize(a1->m_contentLayer);
cocos2d::CCSize::CCSize(&v38, v26);
m_contentLayer = a1->m_contentLayer;
setContentSize = m_contentLayer->setContentSize;
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v40, v38.width, v38.height - y);
setContentSize(m_contentLayer, (const cocos2d::CCSize *)&v40);
v29 = nullptr;
for ( i = cocos2d::CCArray::count(a1->m_cellArray) - 1; i >= 0; --i )
{
v13 = (int *)cocos2d::CCArray::objectAtIndex(a1->m_cellArray, i);
cocos2d::CCPoint::CCPoint(&v39);
v14 = cocos2d::CCArray::count(a1->m_cellArray);
v15 = *v13;
if ( i == v14 - 1 )
{
v16 = (float *)(*(int (__fastcall **)(int *))(v15 + 96))(v13);
cocos2d::CCPoint::CCPoint(&v40, *v16, (float)(0.0 - y) + 1.0);
cocos2d::CCPoint::operator=(&v39, &v40);
v17 = (float *)(*(int (__fastcall **)(int *))(*v13 + 96))(v13);
cocos2d::CCPoint::CCPoint(&v40, *v17, v39.y - v9);
v18 = &v37;
}
else
{
v36 = *(float *)(*(int (__fastcall **)(int *))(v15 + 96))(v13);
v30 = *(float *)((*(int (__fastcall **)(int *))(*v29 + 96))(v29) + 4);
v31 = (*(int (__fastcall **)(int *))(*v29 + 156))(v29);
cocos2d::CCPoint::CCPoint(&v40, v36, v30 + *(float *)(v31 + 4));
v18 = &v39;
}
v29 = v13;
cocos2d::CCPoint::operator=(v18, &v40);
(*(void (__fastcall **)(int *, cocos2d::CCPoint *))(*v13 + 92))(v13, &v39);
}
}
v19 = a1->m_dataSource->cellForRowAtIndexPath(a1->m_dataSource, v8, a1);
v6 = v19;
if ( v19 )
{
setAnchorPoint = v19->setAnchorPoint;
cocos2d::CCPoint::CCPoint(&v40, 0.0, 1.0);
setAnchorPoint(v6, &v40);
v21 = v6->setContentSize;
v22 = a1->getContentSize(a1);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v40, v22->width, v9);
v21(v6, (const cocos2d::CCSize *)&v40);
setPosition = v6->setPosition;
cocos2d::CCPoint::CCPoint(&v40, 0.0, v37.y);
setPosition(v6, &v40);
CCIndexPath::operator=(&v6[1].m_fScaleX, v8);
cocos2d::CCArray::addObject(a1->m_cellArray, v6);
cocos2d::CCArray::addObject(a1->m_indexPathArray, v8);
v24 = a1->m_tableDelegate;
if ( v24 )
v24->TableViewWillDisplayCellForRowAtIndexPath(v24, v8, (TableViewCell *)v6, a1);
a1->m_contentLayer->addChild(a1->m_contentLayer, v6);
v25 = a1->m_tableDelegate;
if ( v25 )
v25->TableViewDidDisplayCellForRowAtIndexPath(v25, v8, (TableViewCell *)v6, a1);
}
else
{
v6 = v4;
}
}
++v5;
v4 = v6;
}
++v3;
}
}
}
}