//
// LevelListLayer::cellPerformedAction from 0x5922f8 to 0x592412 (282 bytes)
//
// 1 xrefs:
// > `non-virtual thunk to'LevelListLayer::cellPerformedAction @ 0x592418
//
// 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
//
bool LevelListLayer::cellPerformedAction(
LevelListLayer *a1,
TableViewCell *a2,
int a3,
CellAction a4,
cocos2d::CCNode *a5)
{
int v8; // r5
GJListLayer *m_list; // r3
CCContentLayer *m_contentLayer; // r0
float y; // s15
int v12; // r0
SetIDPopupDelegate *v13; // r4
int v14; // r6
int v15; // r0
SetLevelOrderPopup *v16; // r0
SetLevelOrderPopup_vtbl *v17; // r3
SetLevelOrderPopup *v18; // r5
GJListLayer *v19; // r3
if ( a3 != 31 || !a4 )
return LevelBrowserLayer::cellPerformedAction(a1, a2, a3, a4, a5);
v8 = *(_DWORD *)(a2[1].m_uID + 268) - *(_DWORD *)(a2[1].m_uID + 272);
a1->m_initialListViewY = 0.0;
m_list = a1->m_list;
if ( m_list )
{
m_contentLayer = m_list->m_listView->m_tableView->m_contentLayer;
y = m_contentLayer->getPosition(m_contentLayer)->y;
a1->m_initialListViewY = y;
switch ( a4 )
{
case 2:
v19 = a1->m_list;
if ( v19 )
a1->m_initialListViewY = y + v19->m_listView->m_itemSeparation;
goto LABEL_9;
case 3:
case 4:
goto LABEL_5;
case 5:
goto LABEL_6;
default:
return 1;
}
}
else
{
switch ( a4 )
{
case 2:
LABEL_9:
GJLevelList::removeLevelFromList(
a1->m_levelList,
*(_DWORD *)(a2[1].m_uID + 268) - *(_DWORD *)(a2[1].m_uID + 272));
goto LABEL_10;
case 3:
case 4:
LABEL_5:
GJLevelList::reorderLevelStep(a1->m_levelList, v8, a4 == 3);
LABEL_10:
LevelBrowserLayer::setupLevelBrowser(a1, nullptr);
LevelListLayer::updateEditMode(a1);
break;
case 5:
LABEL_6:
v12 = GJLevelList::orderForLevel(a1->m_levelList, v8);
v13 = &a1->SetIDPopupDelegate;
v14 = v12;
v15 = GJLevelList::totalLevels((GJLevelList *)v13[40].__vftable);
v16 = SetLevelOrderPopup::create(v8, v14 + 1, v15);
v17 = v16->SetIDPopup::FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
v18 = v16;
v16->m_delegate = v13;
v17->setTag(v16, 1003);
v18->show(v18);
break;
default:
return 1;
}
}
return 1;
}