// // LevelInfoLayer::onPlay from 0x1002bf860 to 0x1002bff6f (1807 bytes) // // 4 xrefs: // > LevelInfoLayer::FLAlert_Clicked @ 0x1002c4d9f // > LevelInfoLayer::keyDown @ 0x1002c4e8f // > sub_1002C4EB0 @ 0x1002c4ef0 // > LevelInfoLayer::init @ 0x1002bdfed // // 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) { __int128 v2; // xmm0 GJGameLevel *m_level; // rax std::string *p_m_levelString; // rax std::string::size_type size; // r14 GameManager *v7; // rax bool GameVariable; // al GJGameLevel *v9; // rcx MusicDownloadManager *v10; // rax GameManager *v11; // rax GameManager *v12; // rax GJGameLevel *v13; // rcx int v14; // eax FMODAudioEngine *v15; // rax FMODAudioEngine *v16; // rax unsigned int v17; // r14d unsigned int v18; // eax int v19; // ecx int v20; // r8d int v21; // r9d cocos2d::CCAction *v22; // rax GJGameLevel *v23; // rax cocos2d::CCSprite *v24; // r12 __int64 v25; // rax cocos2d::CCSprite *v26; // r12 __int64 v27; // rax cocos2d::CCSprite *v28; // r15 __int64 v29; // rax cocos2d::CCSprite *m_playSprite; // rdi cocos2d::CCSprite *v31; // r14 cocos2d::CCProgressTimer *v32; // r14 __int64 v33; // rax GameManager *v34; // rax __int64 v35; // rbx const std::string::value_type *v36; // rsi const char *data; // rsi __int64 v38; // rbx void *v39[3]; // [rsp+8h] [rbp-98h] BYREF void *v40[3]; // [rsp+20h] [rbp-80h] BYREF void *v41[3]; // [rsp+38h] [rbp-68h] BYREF std::string v42; // [rsp+50h] [rbp-50h] BYREF __int16 v43; // [rsp+68h] [rbp-38h] BYREF char v44; // [rsp+6Ah] [rbp-36h] float v45; // [rsp+6Ch] [rbp-34h] __int16 v46; // [rsp+70h] [rbp-30h] BYREF char v47; // [rsp+72h] [rbp-2Eh] _WORD v48[22]; // [rsp+74h] [rbp-2Ch] BYREF if ( !a1->m_isBusy && a1->m_enterTransitionFinished ) { m_level = a1->m_level; if ( m_level->m_levelType == SearchResult ) { LABEL_9: LevelInfoLayer::downloadLevel(a1); return; } if ( (m_level->m_levelString.m_data.m_short.sizex2 & 1) != 0 ) { sub_100006B70( &v42, m_level->m_levelString.m_data.m_long.longStorage, m_level->m_levelString.m_data.m_long.size, *(double *)&v2); } else { p_m_levelString = &m_level->m_levelString; v42.__r_.__value_.__r.__words[2] = (std::string::size_type)p_m_levelString->m_data.m_long.longStorage; v2 = *(_OWORD *)&p_m_levelString->m_data.m_short.sizex2; *(_OWORD *)&v42.__r_.__value_.__l.0 = *(_OWORD *)&p_m_levelString->m_data.m_short.sizex2; } if ( (*(_BYTE *)&v42.__r_.__value_.__s.0 & 1) != 0 ) { size = v42.__r_.__value_.__l.__size_; operator delete(v42.__r_.__value_.__l.__data_); if ( !size ) goto LABEL_9; } else if ( !(*(_BYTE *)&v42.__r_.__value_.__l.0 >> 1) ) { goto LABEL_9; } v7 = GameManager::sharedState(); GameVariable = GameManager::getGameVariable(v7, "0083"); v9 = a1->m_level; if ( !GameVariable && v9->m_songID && !v9->m_showedSongWarning ) { v10 = MusicDownloadManager::sharedState(); if ( !MusicDownloadManager::isSongDownloaded(v10, a1->m_level->m_songID) ) { LevelInfoLayer::showSongWarning(a1); return; } v9 = a1->m_level; } if ( v9->m_coins > 0 && v9->m_coinsVerified.random == v9->m_coinsVerified.seed && (v11 = GameManager::sharedState(), !GameManager::getGameVariable(v11, "0063")) ) { v34 = GameManager::sharedState(); GameManager::setGameVariable(v34, "0063", 1); sub_100030790( v39, "This level contains unverified user coins (bronze).\n" "The coins will not count until they become verified (silver).", *(double *)&v2); v35 = FLAlertLayer::create_1(&a1->FLAlertLayerProtocol, "Unverified Coins", v39, "OK", 0, 300.0); if ( ((__int64)v39[0] & 1) != 0 ) operator delete(v39[2]); (*(void (__fastcall **)(__int64))(*(_QWORD *)v35 + 1288LL))(v35); } else { v12 = GameManager::sharedState(); if ( GameManager::getGameVariable(v12, "0082") || (v13 = a1->m_level, v14 = v13->m_objectCount.random - v13->m_objectCount.seed, v14 < 40001) || v13->m_highObjectsEnabled ) { if ( !a1->m_isBusy ) { ((void (__fastcall *)(LevelInfoLayer *, _QWORD))a1->setKeypadEnabled)(a1, 0); a1->m_isBusy = 1; v15 = FMODAudioEngine::sharedEngine(); FMODAudioEngine::stopAllMusic(v15, 1); v16 = FMODAudioEngine::sharedEngine(); strcpy((char *)v41, " playSound_01.ogg"); FMODAudioEngine::playEffect(v16, v41, 1.0, 0.0, 0.30000001); if ( ((__int64)v41[0] & 1) != 0 ) operator delete(v41[2]); GameManager::sharedState()->m_loadingLevel = 1; v17 = (unsigned int)cocos2d::CCDelayTime::create(0.0); v18 = (unsigned int)cocos2d::CCCallFunc::create( a1, (cocos2d::SEL_CallFunc)(unsigned __int64)LevelInfoLayer::playStep2); v22 = (cocos2d::CCAction *)sub_1003B5760(v17, v18, 0, v19, v20, v21); cocos2d::CCNode::runAction(a1, v22); v47 = 115; v46 = 11776; LOBYTE(v48[1]) = -38; v48[0] = 22272; v44 = 0; v43 = -156; v23 = a1->m_level; if ( v23->m_dailyID.random - v23->m_dailyID.seed < 100001 ) { if ( v23->m_gauntletLevel ) { v47 = 23; v46 = 5911; memset(v48, 43, 3); } } else { v47 = 23; v46 = 5911; memset(v48, 43, 3); v44 = 0; v43 = 13055; } v24 = cocos2d::CCSprite::createWithSpriteFrameName("d_circle_01_001.png"); ((void (__fastcall *)(cocos2d::CCSprite *, __int16 *))v24->setColor)(v24, &v46); ((void (__fastcall *)(cocos2d::CCSprite *, float))v24->setScale)(v24, 1.88); v45 = *(float *)((__int64 (__fastcall *)(cocos2d::CCSprite *))a1->m_playSprite->getContentSize)(a1->m_playSprite) * 0.5; v25 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))a1->m_playSprite->getContentSize)(a1->m_playSprite); sub_10028CBE0((float *)&v42, v45, *(float *)(v25 + 4) * 0.5); ((void (__fastcall *)(cocos2d::CCSprite *, std::string *))v24->setPosition)(v24, &v42); ((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCSprite *, __int64))a1->m_playSprite->addChild_0)( a1->m_playSprite, v24, 4294967291LL); v26 = cocos2d::CCSprite::createWithSpriteFrameName("d_circle_01_001.png"); ((void (__fastcall *)(cocos2d::CCSprite *, __int16 *))v26->setColor)(v26, &v46); ((void (__fastcall *)(cocos2d::CCSprite *, float))v26->setScale)(v26, 1.63); v45 = *(float *)((__int64 (__fastcall *)(cocos2d::CCSprite *))a1->m_playSprite->getContentSize)(a1->m_playSprite) * 0.5; v27 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))a1->m_playSprite->getContentSize)(a1->m_playSprite); sub_10028CBE0((float *)&v42, v45, *(float *)(v27 + 4) * 0.5); ((void (__fastcall *)(cocos2d::CCSprite *, std::string *))v26->setPosition)(v26, &v42); ((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCSprite *, __int64))a1->m_playSprite->addChild_0)( a1->m_playSprite, v26, 4294967294LL); v28 = cocos2d::CCSprite::createWithSpriteFrameName("d_circle_01_001.png"); ((void (__fastcall *)(cocos2d::CCSprite *, _WORD *))v28->setColor)(v28, v48); ((void (__fastcall *)(cocos2d::CCSprite *, float))v28->setScale)(v28, 1.75); v45 = *(float *)((__int64 (__fastcall *)(cocos2d::CCSprite *))a1->m_playSprite->getContentSize)(a1->m_playSprite) * 0.5; v29 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))a1->m_playSprite->getContentSize)(a1->m_playSprite); sub_10028CBE0((float *)&v42, v45, *(float *)(v29 + 4) * 0.5); ((void (__fastcall *)(cocos2d::CCSprite *, std::string *))v28->setPosition)(v28, &v42); ((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCSprite *, __int64))a1->m_playSprite->addChild_0)( a1->m_playSprite, v28, 4294967292LL); m_playSprite = a1->m_playSprite; memset(&v42, 125, 3); ((void (__fastcall *)(cocos2d::CCSprite *, std::string *))m_playSprite->setColor)(m_playSprite, &v42); v31 = cocos2d::CCSprite::createWithSpriteFrameName("d_circle_01_001.png"); ((void (__fastcall *)(cocos2d::CCSprite *, __int16 *))v31->setColor)(v31, &v43); v32 = cocos2d::CCProgressTimer::create(v31); a1->m_progressTimer = v32; v45 = *(float *)((__int64 (__fastcall *)(cocos2d::CCSprite *))a1->m_playSprite->getContentSize)(a1->m_playSprite) * 0.5; v33 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))a1->m_playSprite->getContentSize)(a1->m_playSprite); sub_10028CBE0((float *)&v42, v45, 0.5 * *(float *)(v33 + 4)); ((void (__fastcall *)(cocos2d::CCProgressTimer *, std::string *))v32->setPosition)(v32, &v42); ((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(&v42, 0, sizeof(v42)); v36 = "This level has a high object count and can be unstable on some devices. This may effect performance, load time etc."; if ( (unsigned int)v14 >= 0x13881 ) v36 = "This level has a VERY HIGH object count and can be unstable on some devices. This may ef" "fect performance, load time etc."; std::string::assign(&v42, v36); if ( (*(_BYTE *)&v42.__r_.__value_.__s.0 & 1) != 0 ) data = v42.__r_.__value_.__l.__data_; else data = v42.__r_.__value_.__s.__data_; sub_100030790(v40, data, 0.0); v38 = FLAlertLayer::create_1(&a1->FLAlertLayerProtocol, "High Objects", v40, "Cancel", "Play", 380.0); if ( ((__int64)v40[0] & 1) != 0 ) operator delete(v40[2]); (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v38 + 72LL))(v38, 10); (*(void (__fastcall **)(__int64))(*(_QWORD *)v38 + 1288LL))(v38); if ( (*(_BYTE *)&v42.__r_.__value_.__s.0 & 1) != 0 ) operator delete(v42.__r_.__value_.__l.__data_); } } } }
GD Web Decomp Icon

GD Web Decomp

Raw Source