//
// cocos2d::extension::CCTableView::insertCellAtIndex from 0x5aa44e to 0x5aa4ea (156 bytes)
//
// 0 xrefs:
//
// 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 cocos2d::extension::CCTableView::insertCellAtIndex(cocos2d::extension::CCTableView *a1, unsigned int a2)
{
int v4; // r0
cocos2d::extension::CCSortableObject *v5; // r0
cocos2d::extension::CCTableViewCell *v6; // r6
unsigned int v7; // r6
cocos2d::extension::CCTableViewCell *v8; // r0
cocos2d::extension::CCTableViewCell *v9; // r7
unsigned int Idx; // r0
if ( a2 != -1 )
{
v4 = (*(int (__fastcall **)(int, cocos2d::extension::CCTableView *))(*(_DWORD *)a1[1].m_uUnknown + 20))(
a1[1].m_uUnknown,
a1);
if ( v4 )
{
if ( a2 <= v4 - 1 )
{
v5 = cocos2d::extension::CCArrayForObjectSorting::objectWithObjectID(
(cocos2d::extension::CCArrayForObjectSorting *)a1[1].m_eObjType,
a2);
if ( v5 && v5 != (cocos2d::extension::CCSortableObject *)&dword_108 )
{
v7 = cocos2d::extension::CCArrayForObjectSorting::indexOfSortedObject(
(cocos2d::extension::CCArrayForObjectSorting *)a1[1].m_eObjType,
v5);
while ( v7 < cocos2d::CCArray::count((cocos2d::CCArray *)a1[1].m_eObjType) )
{
v8 = (cocos2d::extension::CCTableViewCell *)cocos2d::CCArray::objectAtIndex(
(cocos2d::CCArray *)a1[1].m_eObjType,
v7++);
v9 = v8;
Idx = cocos2d::extension::CCTableViewCell::getIdx(v8);
cocos2d::extension::CCTableView::_setIndexForCell(a1, Idx + 1, v9);
}
}
v6 = (cocos2d::extension::CCTableViewCell *)(*(int (__fastcall **)(int, cocos2d::extension::CCTableView *, unsigned int))(*(_DWORD *)a1[1].m_uUnknown + 16))(
a1[1].m_uUnknown,
a1,
a2);
cocos2d::extension::CCTableView::_setIndexForCell(a1, a2, v6);
cocos2d::extension::CCTableView::_addCellIfNecessary(a1, v6);
cocos2d::extension::CCTableView::_updateCellPositions(a1);
cocos2d::extension::CCTableView::_updateContentSize(a1);
}
}
}
}