//
// MenuLayer::scene from 0x5c41a8 to 0x5c42f0 (328 bytes)
//
// 15 xrefs:
// > LoadingLayer::loadingFinished @ 0x5c4454
// > LoadingLayer::loadingFinished @ 0x5c4478
// > GameManager::reloadMenu @ 0x5e8000
// > GameManager::reloadAllStep5 @ 0x5e80fc
// > GameManager::safePopScene @ 0x5ee3fc
// > GameManager::returnToLastScene @ 0x5f1064
// > GameManager::returnToLastScene @ 0x5f1294
// > CreatorLayer::onBack @ 0x6ca7ac
// > GJGarageLayer::onBack @ 0x790114
// > LevelSelectLayer::onBack @ 0x79b204
// > VideoOptionsLayer::reloadMenu @ 0x7cc924
// > SecretLayer::onBack @ 0x901d30
// > WorldSelectLayer::onBack @ 0x95e260
// > SecretLayer6::onBack @ 0xa8fe1c
// > ??> @ 0x912f0
//
// 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
//
cocos2d::CCScene *MenuLayer::scene(bool a1)
{
_BOOL4 v1; // w21
cocos2d::CCScene *v2; // x20
MenuLayer *v3; // x19
cocos2d::CCSequence *v4; // x21
cocos2d::CCFiniteTimeAction *v5; // x0
cocos2d::CCAction *v6; // x0
MenuLayer_vtbl *v8; // x1
MenuLayer *v9; // x0
v1 = a1;
v2 = cocos2d::CCScene::create();
v2->m_eObjType = (unsigned int)&byte_9[6];
AppDelegate::get()->cocos2d::CCSceneDelegate::__vftable = (cocos2d::CCSceneDelegate_vtbl *)v2;
v3 = (MenuLayer *)operator new(0x1E0u);
cocos2d::CCLayer::CCLayer(v3);
v3->m_showingTOS = 0;
v3->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable = (MenuLayer_vtbl *)&off_1146D20;
v3->cocos2d::CCLayer::cocos2d::CCTouchDelegate::__vftable = (cocos2d::CCTouchDelegate_vtbl *)off_11471B0;
v3->cocos2d::CCLayer::cocos2d::CCAccelerometerDelegate::__vftable = (cocos2d::CCAccelerometerDelegate_vtbl *)&off_1147220;
v3->cocos2d::CCLayer::cocos2d::CCKeypadDelegate::__vftable = (cocos2d::CCKeypadDelegate_vtbl *)&off_1147238;
v3->cocos2d::CCLayer::cocos2d::CCKeyboardDelegate::__vftable = (cocos2d::CCKeyboardDelegate_vtbl *)&off_1147258;
v3->cocos2d::CCLayer::cocos2d::CCMouseDelegate::__vftable = (cocos2d::CCMouseDelegate_vtbl *)off_1147278;
v3->FLAlertLayerProtocol::__vftable = (FLAlertLayerProtocol_vtbl *)&off_11472A0;
v3->GooglePlayDelegate::__vftable = (GooglePlayDelegate_vtbl *)&off_11472B8;
v3->m_gpSprite = nullptr;
v3->m_viewProfileSprite = nullptr;
v3->m_profileLabel = nullptr;
v3->m_profileButton = nullptr;
v3->m_unknown = nullptr;
if ( MenuLayer::init(v3) )
{
cocos2d::CCObject::autorelease(v3);
}
else
{
v8 = v3->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
v9 = v3;
v3 = nullptr;
v8->~MenuLayer_0(v9);
}
v2->addChild(v2, v3);
if ( v1 )
{
v4 = (cocos2d::CCSequence *)cocos2d::CCDelayTime::create(0.0);
v5 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCCallFunc::create(v3, MenuLayer::onOptionsInstant, 0);
v6 = (cocos2d::CCAction *)cocos2d::CCSequence::create(v4, v5, 0);
cocos2d::CCNode::runAction(v3, v6);
}
return v2;
}