//
// LevelListCell::onClick from 0x1400c00e0 to 0x1400c01e7 (263 bytes)
//
// 2 xrefs:
// > LevelListCell::loadFromList @ 0x1400bf3aa
// > ??> @ 0x1406c7ecc
//
// 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
//
// Hidden C++ exception states: #wind=1
void LevelListCell::onClick(LevelListCell *a1, cocos2d::CCObject *a2)
{
TableViewCellDelegate *m_cellDelegate; // rcx
GJLevelList *m_levelList; // rcx
struct cocos2d::CCScene *v5; // rax
struct cocos2d::CCTransitionFade *v6; // rbx
__int64 v7; // rcx
cocos2d::CCDirector *v8; // rax
struct cocos2d::CCScene *v9; // rax
struct cocos2d::CCTransitionFade *v10; // rbx
__int64 v11; // rcx
cocos2d::CCDirector *v12; // rax
void *v13; // [rsp+40h] [rbp+8h]
if ( a1->m_addingLevel )
{
m_cellDelegate = a1->m_tableView->m_cellDelegate;
if ( m_cellDelegate )
((void (__fastcall *)(TableViewCellDelegate *, LevelListCell *, __int64))m_cellDelegate->cellPerformedAction)(
m_cellDelegate,
a1,
30);
}
else
{
m_levelList = a1->m_levelList;
if ( m_levelList->m_listType == Editor )
{
v5 = LevelListLayer::scene(m_levelList);
v6 = cocos2d::CCTransitionFade::create(0.5, v5);
v8 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v7);
cocos2d::CCDirector::replaceScene(v8, v6);
}
else
{
if ( !qword_1406C2EC0 )
{
v13 = operator new(0x3D0u);
qword_1406C2EC0 = sub_140141280(v13);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);
}
GameLevelManager::updateSavedLevelList((GameLevelManager *)m_levelList, a1->m_levelList);
v9 = LevelListLayer::scene(a1->m_levelList);
v10 = cocos2d::CCTransitionFade::create(0.5, v9);
v12 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v11);
cocos2d::CCDirector::pushScene(v12, v10);
}
}
}