// // GameManager::returnToLastScene from 0x5f1028 to 0x5f1340 (792 bytes) // // 3 xrefs: // > PlayLayer::onQuit @ 0x5d08ac // > EditorPauseLayer::onExitEditor @ 0x78e8fc // > @ 0x95ac0 // // 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 GameManager::returnToLastScene(GameManager *a1, GJGameLevel *a2) { cocos2d::CCDirector *v2; // x20 cocos2d::CCScene *v3; // x0 cocos2d::CCTransitionFade *v4; // x0 GameManager *v5; // x0 SearchType v6; // w1 cocos2d::CCDirector *v7; // x20 GJSearchObject *v8; // x0 GJSearchObject *v9; // x0 cocos2d::CCScene *v10; // x0 cocos2d::CCTransitionFade *v11; // x0 cocos2d::CCScene *v12; // x21 cocos2d::CCDirector *v13; // x20 cocos2d::CCTransitionFade *v14; // x0 GameLevelManager *v15; // x20 GameLevelManager *v16; // x0 cocos2d::CCScene *SearchScene; // x20 GJDifficulty *p_m_demonFilter; // x0 cocos2d::CCDirector *v19; // x21 cocos2d::CCTransitionFade *v20; // x0 int v21; // w0 int v22; // w20 cocos2d::CCDirector *v23; // x21 cocos2d::CCScene *v24; // x0 cocos2d::CCTransitionFade *v25; // x0 cocos2d::CCDirector *v26; // x20 cocos2d::CCScene *v27; // x0 cocos2d::CCTransitionFade *v28; // x0 unsigned int *p_m_searchMode; // x2 int m_searchMode; // w1 GameLevelManager *v31; // x20 GameLevelManager *v32; // x0 GJSearchObject *v33; // [xsp+40h] [xbp+40h] BYREF switch ( a1->m_sceneEnum ) { case 1: v2 = cocos2d::CCDirector::sharedDirector(); v3 = CreatorLayer::scene(); goto LABEL_3; case 2: v7 = cocos2d::CCDirector::sharedDirector(); v8 = (GJSearchObject *)(&qword_60 + 2); goto LABEL_8; case 3: if ( !a2 ) { if ( a1->m_searchObjectBool ) { a1->m_searchObjectBool = 0; v31 = GameLevelManager::sharedState(); v32 = GameLevelManager::sharedState(); sub_D18D28(&v33, &v32->m_searchKey); SearchScene = GameLevelManager::getSearchScene(v31, (const char *)v33); if ( &v33[-1].m_demonFilter == (GJDifficulty *)&qword_124B6B0 ) { if ( SearchScene ) goto LABEL_19; } else { sub_5E8098(&v33[-1].m_demonFilter); if ( SearchScene ) goto LABEL_19; } } SearchScene = CreatorLayer::scene(); LABEL_19: v19 = cocos2d::CCDirector::sharedDirector(); v20 = cocos2d::CCTransitionFade::create(0.5, SearchScene); cocos2d::CCDirector::replaceScene(v19, v20); goto LABEL_4; } if ( a2->m_levelType == Editor ) v12 = EditLevelLayer::scene(a2); else v12 = LevelInfoLayer::scene(a2, 0); v13 = cocos2d::CCDirector::sharedDirector(); v14 = cocos2d::CCTransitionFade::create(0.5, v12); cocos2d::CCDirector::replaceScene(v13, v14); LABEL_4: v5 = GameManager::sharedState(); GameManager::fadeInMenuMusic(v5); return; case 7: v15 = GameLevelManager::sharedState(); v16 = GameLevelManager::sharedState(); sub_D18D28(&v33, &v16->m_searchKey); SearchScene = GameLevelManager::getSearchScene(v15, (const char *)v33); p_m_demonFilter = &v33[-1].m_demonFilter; if ( &v33[-1].m_demonFilter != (GJDifficulty *)&qword_124B6B0 ) { if ( &pthread_create ) { p_m_searchMode = (unsigned int *)&v33[-1].m_searchMode; do m_searchMode = __ldaxr(p_m_searchMode); while ( __stlxr(m_searchMode - 1, p_m_searchMode) ); } else { m_searchMode = v33[-1].m_searchMode; v33[-1].m_searchMode = m_searchMode - 1; } if ( m_searchMode <= 0 ) operator delete(p_m_demonFilter); } if ( !SearchScene ) SearchScene = MenuLayer::scene(0); goto LABEL_19; case 9: if ( a2 && (v21 = a2->m_levelID.random - a2->m_levelID.seed, v21 > 1) ) v22 = v21 - 1; else v22 = 0; v23 = cocos2d::CCDirector::sharedDirector(); v24 = LevelSelectLayer::scene(v22); v25 = cocos2d::CCTransitionFade::create(0.5, v24); cocos2d::CCDirector::replaceScene(v23, v25); goto LABEL_4; case 0xC: v26 = cocos2d::CCDirector::sharedDirector(); v27 = SecretLayer2::scene(); v28 = cocos2d::CCTransitionFade::create(0.5, v27); cocos2d::CCDirector::replaceScene(v26, v28); return; case 0xE: v7 = cocos2d::CCDirector::sharedDirector(); v8 = (GJSearchObject *)(&qword_60 + 6); LABEL_8: v9 = (GJSearchObject *)GJSearchObject::create(v8, v6); v10 = LevelBrowserLayer::scene(v9); v11 = cocos2d::CCTransitionFade::create(0.5, v10); cocos2d::CCDirector::pushScene(v7, v11); goto LABEL_4; case 0xF: v2 = cocos2d::CCDirector::sharedDirector(); v3 = LevelAreaInnerLayer::scene((bool)&dword_0 + 1); goto LABEL_3; default: v2 = cocos2d::CCDirector::sharedDirector(); v3 = MenuLayer::scene(0); LABEL_3: v4 = cocos2d::CCTransitionFade::create(0.5, v3); cocos2d::CCDirector::replaceScene(v2, v4); goto LABEL_4; } }
GD Web Decomp Icon

GD Web Decomp

Raw Source