//
// LevelListLayer::FLAlert_Clicked from 0x140307550 to 0x1403076e7 (407 bytes)
//
// 2 xrefs:
// > ??> @ 0x140589718
// > ??> @ 0x1406d44d8
//
// 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=3
void LevelListLayer::FLAlert_Clicked(LevelListLayer *a1, FLAlertLayer *a2, bool a3)
{
int v6; // eax
int v7; // eax
GameLevelManager *v8; // rcx
__int64 v9; // rdx
GameLevelManager *v10; // rcx
void *v11; // [rsp+38h] [rbp+10h]
void *v12; // [rsp+38h] [rbp+10h]
v6 = ((__int64 (__fastcall *)(FLAlertLayer *))a2->getTag)(a2) - 1001;
if ( v6 )
{
v7 = v6 - 3;
if ( v7 )
{
if ( v7 == 1 )
{
if ( a3 )
LevelListLayer::cloneList((LevelListLayer *)((char *)a1 - 552));
}
else
{
LevelBrowserLayer::FLAlert_Clicked(a1, a2, a3);
}
}
else if ( a3 && !LOBYTE(a1->m_pScriptTouchHandlerEntry) )
{
v8 = (GameLevelManager *)qword_1406C2EC0;
if ( !qword_1406C2EC0 )
{
v11 = operator new(0x3D0u);
qword_1406C2EC0 = sub_140141280((__int64)v11);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);
v8 = (GameLevelManager *)qword_1406C2EC0;
}
v8->m_levelListDeleteDelegate = (LevelListDeleteDelegate *)&a1->m_bRunning;
GameLevelManager::deleteServerLevelList(
v8,
(int)a1->LevelBrowserLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCTouchDelegate::__vftable[3].getPreviousPriority);
LOBYTE(v9) = 1;
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)&a1->m_sInverse.ty + 320LL))(
*(_QWORD *)&a1->m_sInverse.ty,
v9);
}
}
else if ( a3 )
{
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)&a1->m_fTransformY + 1024LL))(
*(_QWORD *)&a1->m_fTransformY,
0);
v10 = (GameLevelManager *)qword_1406C2EC0;
if ( !qword_1406C2EC0 )
{
v12 = operator new(0x3D0u);
qword_1406C2EC0 = sub_140141280((__int64)v12);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);
v10 = (GameLevelManager *)qword_1406C2EC0;
}
GameLevelManager::deleteLevelList(
v10,
(GJLevelList *)a1->LevelBrowserLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCTouchDelegate::__vftable);
((void (__fastcall *)(cocos2d::CCBlendProtocol *, _QWORD))a1[-1].LevelBrowserLayer::cocos2d::CCLayerColor::cocos2d::CCBlendProtocol::__vftable[65].setBlendFunc)(
&a1[-1].cocos2d::CCBlendProtocol,
0);
LOBYTE(a1->m_pScriptTouchHandlerEntry) = 1;
}
}