//
// EditorPauseLayer::onExitNoSave from 0x1002939b0 to 0x100293adb (299 bytes)
//
// 1 xrefs:
// > EditorPauseLayer::customSetup @ 0x100291be9
//
// 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 __fastcall EditorPauseLayer::onExitNoSave(EditorPauseLayer *a1, cocos2d::CCObject *a2)
{
__int64 v2; // rbx
FMODAudioEngine *v3; // rax
GameManager *v4; // rax
_QWORD v5[2]; // [rsp+0h] [rbp-20h] BYREF
void *__p; // [rsp+10h] [rbp-10h]
if ( !a1->m_saved )
{
if ( a1->m_editorLayer->m_level->m_levelType == Editor )
{
__p = operator new(0x48u);
v5[0] = 73;
v5[1] = 70;
strcpy((char *)__p, "Exit without saving? All unsaved changes will be lost!");
v2 = FLAlertLayer::create_1(&a1->FLAlertLayerProtocol, "Exit", v5, "NO", "YES", 300.0);
if ( (v5[0] & 1) != 0 )
operator delete(__p);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v2 + 72LL))(v2, 1);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v2 + 1288LL))(v2);
}
else
{
v3 = FMODAudioEngine::sharedEngine();
FMODAudioEngine::unloadAllEffects(v3);
CCBlockLayer::decrementForcePrio(a1);
v4 = GameManager::sharedState();
GameManager::returnToLastScene(v4, a1->m_editorLayer->m_level);
}
}
}