//
// PlayLayer::onQuit from 0x100119520 to 0x1001195ac (140 bytes)
//
// 7 xrefs:
// > PlayLayer::setupHasCompleted @ 0x100117364
// > PlayLayer::levelComplete @ 0x100119cf8
// > PlayLayer::postUpdate @ 0x10011f70c
// > PauseLayer::onQuit @ 0x100143714
// > RetryLevelLayer::onMenu @ 0x1001b3a58
// > EndLevelLayer::onMenu @ 0x1002f7384
// > PlayLayer::setupHasCompleted @ 0x1001172d8
//
// 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 PlayLayer::onQuit(PlayLayer *a1)
{
cocos2d::CCDirector *v2; // x0
GameManager *v3; // x0
FMODAudioEngine *v4; // x0
GameManager *v5; // x0
GameManager *v6; // x0
v2 = cocos2d::CCDirector::sharedDirector();
*(_DWORD *)(((__int64 (__fastcall *)(cocos2d::CCDirector *))v2->getScheduler)(v2) + 56) = 1065353216;
cocos2d::CCDirector::sharedDirector()->m_bSmoothFixCheck = 0;
v3 = GameManager::sharedState();
GameManager::didExitPlayscene(v3);
PlatformToolbox::showCursor();
UILayer::disableMenu(a1->m_uiLayer);
cocos2d::CCNode::stopActionByTag(a1, 31);
cocos2d::CCNode::stopAllActions(a1);
cocos2d::CCNode::unscheduleAllSelectors(a1);
GJBaseGameLayer::resetAudio(a1);
v4 = FMODAudioEngine::sharedEngine();
FMODAudioEngine::unloadAllEffects(v4);
v5 = GameManager::sharedState();
GameManager::returnToLastScene(v5, a1->m_level);
v6 = GameManager::sharedState();
GameManager::fadeInMenuMusic(v6);
}