// // LevelInfoLayer::onPlay from 0x100026560 to 0x100026c1c (1724 bytes) // // 3 xrefs: // > LevelInfoLayer::FLAlert_Clicked @ 0x10002adfc // > LevelInfoLayer::keyDown @ 0x10002ae94 // > LevelInfoLayer::init @ 0x100024dac // // 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 LevelInfoLayer::onPlay(LevelInfoLayer *a1, cocos2d::CCObject *a2) { GameManager *v3; // x0 GJGameLevel *v4; // x8 MusicDownloadManager *v5; // x0 GJGameLevel *m_level; // x8 GameManager *v7; // x0 GameManager *v8; // x0 GJGameLevel *v9; // x9 int v10; // w8 FMODAudioEngine *v11; // x0 FMODAudioEngine *v12; // x20 cocos2d::CCDelayTime *v13; // x20 cocos2d::CCAction *v14; // x0 GJGameLevel *v15; // x8 cocos2d::CCSprite *v16; // x21 float v17; // s8 __n128 v18; // q1 __n128 v19; // q0 cocos2d::CCSprite *v20; // x21 float v21; // s8 __n128 v22; // q1 __n128 v23; // q0 cocos2d::CCSprite *v24; // x21 float v25; // s8 __n128 v26; // q1 __n128 v27; // q0 cocos2d::CCSprite *m_playSprite; // x0 cocos2d::CCSprite *v29; // x20 cocos2d::CCProgressTimer *v30; // x20 float v31; // s8 __n128 v32; // q1 __n128 v33; // q0 GameManager *v34; // x0 __int64 v35; // x19 const std::string::value_type *v36; // x1 std::string *v37; // x1 __int64 v38; // x19 __int16 v39; // [xsp+14h] [xbp-9Ch] BYREF char v40; // [xsp+16h] [xbp-9Ah] _WORD v41[2]; // [xsp+18h] [xbp-98h] BYREF __int16 v42; // [xsp+1Ch] [xbp-94h] BYREF char v43; // [xsp+1Eh] [xbp-92h] void *__p[2]; // [xsp+20h] [xbp-90h] BYREF char v45; // [xsp+37h] [xbp-79h] void *v46[2]; // [xsp+38h] [xbp-78h] BYREF char v47; // [xsp+4Fh] [xbp-61h] std::string v48; // [xsp+50h] [xbp-60h] BYREF void *v49[2]; // [xsp+68h] [xbp-48h] BYREF char v50; // [xsp+7Fh] [xbp-31h] cocos2d::SEL_CallFunc v51; // 0:x1.16 if ( !a1->m_isBusy && a1->m_enterTransitionFinished ) { if ( LevelInfoLayer::shouldDownloadLevel(a1) ) { LevelInfoLayer::downloadLevel(a1); } else { v3 = GameManager::sharedState(); if ( GameManager::getGameVariable(v3, "0083") || (v4 = a1->m_level, !v4->m_songID) || v4->m_showedSongWarning || (v5 = MusicDownloadManager::sharedState(), MusicDownloadManager::isSongDownloaded(v5, a1->m_level->m_songID)) ) { m_level = a1->m_level; if ( m_level->m_coins >= 1 && m_level->m_coinsVerified.random == m_level->m_coinsVerified.seed && (v7 = GameManager::sharedState(), !GameManager::getGameVariable(v7, "0063")) ) { v34 = GameManager::sharedState(); GameManager::setGameVariable(v34, "0063", 1); sub_100009900( v49, "This level contains unverified user coins (bronze).\n" "The coins will not count until they become verified (silver)."); v35 = FLAlertLayer::create_1(&a1->FLAlertLayerProtocol, "Unverified Coins", v49, "OK", 0, 300.0); if ( v50 < 0 ) operator delete(v49[0]); (*(void (__fastcall **)(__int64))(*(_QWORD *)v35 + 1288LL))(v35); } else { v8 = GameManager::sharedState(); if ( GameManager::getGameVariable(v8, "0082") || (v9 = a1->m_level, v10 = v9->m_objectCount.random - v9->m_objectCount.seed, v10 < 40001) || v9->m_highObjectsEnabled ) { if ( !a1->m_isBusy ) { ((void (__fastcall *)(LevelInfoLayer *, _QWORD))a1->setKeypadEnabled)(a1, 0); a1->m_isBusy = 1; v11 = FMODAudioEngine::sharedEngine(); FMODAudioEngine::stopAllMusic(v11, 1); v12 = FMODAudioEngine::sharedEngine(); sub_100009900(__p, "playSound_01.ogg"); FMODAudioEngine::playEffect(v12, __p, 1.0, 0.0, 0.3); if ( v45 < 0 ) operator delete(__p[0]); GameManager::sharedState()->m_loadingLevel = 1; v13 = cocos2d::CCDelayTime::create(0.0); v51.ptr = (void (*)(void))LevelInfoLayer::playStep2; v51.adj = 0; cocos2d::CCCallFunc::create(a1, v51); v14 = (cocos2d::CCAction *)sub_10018A494(v13); cocos2d::CCNode::runAction(a1, v14); v43 = 115; v42 = 11776; LOBYTE(v41[1]) = -38; v41[0] = 22272; v40 = 0; v39 = -156; v15 = a1->m_level; if ( v15->m_dailyID.random - v15->m_dailyID.seed < 100001 ) { if ( v15->m_gauntletLevel ) { v42 = 5911; v43 = 23; memset(v41, 43, 3); } } else { v42 = 5911; v43 = 23; memset(v41, 43, 3); v40 = 0; v39 = 13055; } v16 = cocos2d::CCSprite::createWithSpriteFrameName("d_circle_01_001.png"); ((void (__fastcall *)(cocos2d::CCSprite *, __int16 *))v16->setColor)(v16, &v42); ((void (__fastcall *)(cocos2d::CCSprite *, float))v16->setScale)(v16, 1.88); v17 = *(float *)((__int64 (__fastcall *)(cocos2d::CCSprite *))a1->m_playSprite->getContentSize)(a1->m_playSprite) * 0.5; v18.n128_f32[0] = *(float *)(((__int64 (__fastcall *)(cocos2d::CCSprite *))a1->m_playSprite->getContentSize)(a1->m_playSprite) + 4) * 0.5; v19.n128_f32[0] = v17; sub_100022980(v19, v18, &v48); ((void (__fastcall *)(cocos2d::CCSprite *, std::string *))v16->setPosition)(v16, &v48); ((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCSprite *, __int64))a1->m_playSprite->addChild_0)( a1->m_playSprite, v16, 4294967291LL); v20 = cocos2d::CCSprite::createWithSpriteFrameName("d_circle_01_001.png"); ((void (__fastcall *)(cocos2d::CCSprite *, __int16 *))v20->setColor)(v20, &v42); ((void (__fastcall *)(cocos2d::CCSprite *, float))v20->setScale)(v20, 1.63); v21 = *(float *)((__int64 (__fastcall *)(cocos2d::CCSprite *))a1->m_playSprite->getContentSize)(a1->m_playSprite) * 0.5; v22.n128_f32[0] = *(float *)(((__int64 (__fastcall *)(cocos2d::CCSprite *))a1->m_playSprite->getContentSize)(a1->m_playSprite) + 4) * 0.5; v23.n128_f32[0] = v21; sub_100022980(v23, v22, &v48); ((void (__fastcall *)(cocos2d::CCSprite *, std::string *))v20->setPosition)(v20, &v48); ((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCSprite *, __int64))a1->m_playSprite->addChild_0)( a1->m_playSprite, v20, 4294967294LL); v24 = cocos2d::CCSprite::createWithSpriteFrameName("d_circle_01_001.png"); ((void (__fastcall *)(cocos2d::CCSprite *, _WORD *))v24->setColor)(v24, v41); ((void (__fastcall *)(cocos2d::CCSprite *, float))v24->setScale)(v24, 1.75); v25 = *(float *)((__int64 (__fastcall *)(cocos2d::CCSprite *))a1->m_playSprite->getContentSize)(a1->m_playSprite) * 0.5; v26.n128_f32[0] = *(float *)(((__int64 (__fastcall *)(cocos2d::CCSprite *))a1->m_playSprite->getContentSize)(a1->m_playSprite) + 4) * 0.5; v27.n128_f32[0] = v25; sub_100022980(v27, v26, &v48); ((void (__fastcall *)(cocos2d::CCSprite *, std::string *))v24->setPosition)(v24, &v48); ((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCSprite *, __int64))a1->m_playSprite->addChild_0)( a1->m_playSprite, v24, 4294967292LL); m_playSprite = a1->m_playSprite; memset(&v48, 125, 3); ((void (__fastcall *)(cocos2d::CCSprite *, std::string *))m_playSprite->setColor)(m_playSprite, &v48); v29 = cocos2d::CCSprite::createWithSpriteFrameName("d_circle_01_001.png"); ((void (__fastcall *)(cocos2d::CCSprite *, __int16 *))v29->setColor)(v29, &v39); v30 = cocos2d::CCProgressTimer::create(v29); a1->m_progressTimer = v30; v31 = *(float *)((__int64 (__fastcall *)(cocos2d::CCSprite *))a1->m_playSprite->getContentSize)(a1->m_playSprite) * 0.5; v32.n128_f32[0] = *(float *)(((__int64 (__fastcall *)(cocos2d::CCSprite *))a1->m_playSprite->getContentSize)(a1->m_playSprite) + 4) * 0.5; v33.n128_f32[0] = v31; sub_100022980(v33, v32, &v48); ((void (__fastcall *)(cocos2d::CCProgressTimer *, std::string *))v30->setPosition)(v30, &v48); ((void (__fastcall *)(cocos2d::CCProgressTimer *, float))a1->m_progressTimer->setScale)( a1->m_progressTimer, 1.75); cocos2d::CCProgressTimer::setPercentage(a1->m_progressTimer, 0.0); ((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCProgressTimer *, __int64))a1->m_playSprite->addChild_0)( a1->m_playSprite, a1->m_progressTimer, 4294967293LL); ((void (__fastcall *)(cocos2d::CCMenu *, _QWORD))a1->m_playBtnMenu->setTouchEnabled)(a1->m_playBtnMenu, 0); ((void (__fastcall *)(cocos2d::CCMenu *, _QWORD))a1->m_songWidget->m_buttonMenu->setTouchEnabled)( a1->m_songWidget->m_buttonMenu, 0); } } else { memset(&v48, 0, sizeof(v48)); if ( (unsigned int)v10 <= 0x13880 ) v36 = "This level has a high object count and can be unstable on some devices. This may eff" "ect performance, load time etc."; else v36 = "This level has a VERY HIGH object count and can be unstable on some devices. This ma" "y effect performance, load time etc."; std::string::assign(&v48, v36); if ( (v48.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL ) v37 = &v48; else v37 = (std::string *)v48.__r_.__value_.__r.__words[0]; sub_100009900(v46, (char *)v37); v38 = FLAlertLayer::create_1(&a1->FLAlertLayerProtocol, "High Objects", v46, "Cancel", "Play", 380.0); if ( v47 < 0 ) operator delete(v46[0]); (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v38 + 72LL))(v38, 10); (*(void (__fastcall **)(__int64))(*(_QWORD *)v38 + 1288LL))(v38); if ( SHIBYTE(v48.__r_.__value_.__r.__words[2]) < 0 ) operator delete(v48.__r_.__value_.__l.__data_); } } } else { LevelInfoLayer::showSongWarning(a1); } } } }
GD Web Decomp Icon

GD Web Decomp

Raw Source