//
// GameManager::safePopScene from 0x3234a4 to 0x3234e6 (66 bytes)
//
// 4 xrefs:
// > LevelSearchLayer::onBack @ 0x3aca20
// > LevelInfoLayer::onBack @ 0x3b1788
// > LevelBrowserLayer::onBack @ 0x3bddbc
// > LeaderboardsLayer::onBack @ 0x451918
//
// 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 GameManager::safePopScene(GameManager *a1)
{
cocos2d::CCDirector *v1; // r0
cocos2d::CCDirector *v2; // r4
cocos2d::CCScene *v3; // r0
cocos2d::CCTransitionFade *v4; // r1
cocos2d::CCDirector *v6; // r0
v1 = cocos2d::CCDirector::sharedDirector();
if ( cocos2d::CCDirector::sceneCount(v1) > 1 )
{
v6 = cocos2d::CCDirector::sharedDirector();
return cocos2d::CCDirector::popSceneWithTransition(v6, 0.5, kPopTransitionFade);
}
else
{
v2 = cocos2d::CCDirector::sharedDirector();
v3 = MenuLayer::scene(0);
v4 = cocos2d::CCTransitionFade::create(0.5, v3);
return cocos2d::CCDirector::replaceScene(v2, v4);
}
}