//
// LevelCell::updateCellMode from 0x1400b1570 to 0x1400b17f6 (646 bytes)
//
// 3 xrefs:
// > CustomListView::reloadAll @ 0x1400ac5b5
// > LevelCell::loadCustomLevelCell @ 0x1400af064
// > ??> @ 0x1406c7a04
//
// 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 LevelCell::updateCellMode(LevelCell *a1, int a2)
{
int i; // edi
cocos2d::CCNode *v4; // r14
unsigned __int8 v5; // si
cocos2d::CCNode *v6; // rax
cocos2d::CCNode *v7; // r14
bool v8; // zf
unsigned __int8 v9; // si
cocos2d::CCNode *v10; // rax
cocos2d::CCNode *v11; // r14
bool v12; // si
cocos2d::CCNode *v13; // rax
cocos2d::CCNode *v14; // r14
bool v15; // si
cocos2d::CCNode *v16; // rax
cocos2d::CCNode *v17; // r14
bool v18; // si
a1->m_cellMode = a2;
for ( i = 0; i <= 4; i += 5 )
{
v4 = a1->m_mainMenu->getChildByTag(a1->m_mainMenu, (unsigned int)i);
if ( !v4 )
goto LABEL_7;
if ( i )
{
if ( (unsigned int)(i - 1) <= 2 && a1->m_cellMode == 1 || i == 4 && a1->m_cellMode == 2 )
{
LABEL_21:
v5 = 1;
goto LABEL_6;
}
}
else if ( !a1->m_cellMode )
{
goto LABEL_21;
}
v5 = 0;
LABEL_6:
v4->setVisible(v4, v5);
((void (__fastcall *)(cocos2d::CCNode *, _QWORD))v4->__vftable[1].canEncode)(v4, v5);
LABEL_7:
v6 = a1->m_mainMenu->getChildByTag(a1->m_mainMenu, (unsigned int)(i + 1));
v7 = v6;
if ( !v6 )
goto LABEL_24;
if ( i == -1 && !a1->m_cellMode )
goto LABEL_16;
if ( i + 1 < 1 )
goto LABEL_13;
v8 = i == 3;
if ( i < 3 )
{
if ( a1->m_cellMode == 1 )
goto LABEL_16;
LABEL_13:
v8 = i == 3;
}
if ( !v8 || a1->m_cellMode != 2 )
{
v9 = 0;
goto LABEL_23;
}
LABEL_16:
v9 = 1;
LABEL_23:
v6->setVisible(v6, v9);
((void (__fastcall *)(cocos2d::CCNode *, _QWORD))v7->__vftable[1].canEncode)(v7, v9);
LABEL_24:
v10 = a1->m_mainMenu->getChildByTag(a1->m_mainMenu, (unsigned int)(i + 2));
v11 = v10;
if ( v10 )
{
v12 = i == -2 && !a1->m_cellMode
|| (unsigned int)(i + 1) <= 2 && a1->m_cellMode == 1
|| i == 2 && a1->m_cellMode == 2;
v10->setVisible(v10, v12);
((void (__fastcall *)(cocos2d::CCNode *, bool))v11->__vftable[1].canEncode)(v11, v12);
}
v13 = a1->m_mainMenu->getChildByTag(a1->m_mainMenu, (unsigned int)(i + 3));
v14 = v13;
if ( v13 )
{
v15 = i == -3 && !a1->m_cellMode
|| (unsigned int)(i + 2) <= 2 && a1->m_cellMode == 1
|| i == 1 && a1->m_cellMode == 2;
v13->setVisible(v13, v15);
((void (__fastcall *)(cocos2d::CCNode *, bool))v14->__vftable[1].canEncode)(v14, v15);
}
v16 = a1->m_mainMenu->getChildByTag(a1->m_mainMenu, (unsigned int)(i + 4));
v17 = v16;
if ( v16 )
{
v18 = i == -4 && !a1->m_cellMode || (unsigned int)(i + 3) <= 2 && a1->m_cellMode == 1 || !i && a1->m_cellMode == 2;
v16->setVisible(v16, v18);
((void (__fastcall *)(cocos2d::CCNode *, bool))v17->__vftable[1].canEncode)(v17, v18);
}
}
}