// // PlayLayer::setupHasCompleted from 0x409f60 to 0x40a8f0 (2448 bytes) // // 1 xrefs: // > PlayLayer::processCreateObjectsFromSetup @ 0x40ac24 // // This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False! // // Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings // Generated at Fri, 27 Nov 2026 11:47:31 +0000 // int __fastcall PlayLayer::setupHasCompleted(PlayLayer *this) { int v2; // r1 GameLevelManager *started; // r0 int v4; // r0 int v5; // r3 int v6; // r0 unsigned int v7; // r2 _DWORD *v8; // r1 unsigned int v9; // r3 int v10; // r7 LevelSettingsObject *v11; // r0 int v12; // r0 int v13; // r3 int ColorAction; // r0 _BYTE *v15; // r3 char v16; // r1 char v17; // r2 int v18; // r0 _BYTE *v19; // r3 char v20; // r2 char v21; // r1 GameManager *v22; // r0 GameManager *v23; // r6 int v24; // r0 int v25; // r1 int v26; // r9 void (__fastcall *v27)(int, float *); // r10 int v28; // r3 int v29; // r9 void (__fastcall *v30)(int, float *); // r10 FMODAudioEngine *v31; // r0 int v32; // r9 FMODAudioEngine *v33; // r0 int v34; // r7 int v35; // r0 MusicDownloadManager *v36; // r0 MusicDownloadManager *v37; // r0 FMODAudioEngine *v38; // r0 GameManager *v39; // r0 GameManager *v40; // r7 int v41; // r0 const char *FontFile; // r0 const char *v43; // r2 int v44; // r0 const char *v45; // r2 int v46; // r0 int v47; // r9 void (__fastcall *v48)(int, float *); // r10 int v49; // r9 void (__fastcall *v50)(int, float *); // r11 int v51; // r7 int v52; // r7 const char *v53; // r1 int v54; // r0 const char *v55; // r1 int v56; // r0 int v57; // r0 int v58; // r0 void (__fastcall *v59)(int, _DWORD *); // r2 _BYTE *v60; // r3 char v61; // r6 char v62; // r1 void (__fastcall *v63)(int, _DWORD *); // r11 int v64; // r9 void (__fastcall *v65)(int, _DWORD *); // r11 int v66; // r9 void (__fastcall *v67)(int, _DWORD *); // r10 const char *v68; // r2 int v69; // r0 int v70; // r10 void (__fastcall *v71)(int, _DWORD *); // r11 int v72; // r9 void (__fastcall *v73)(int, _DWORD *); // r10 int v74; // r0 int v75; // r3 int v76; // r0 FMODAudioEngine *v77; // r0 float v78; // r1 cocos2d::CCSequence *v79; // r0 cocos2d::CCSequence *v80; // r9 cocos2d::CCFiniteTimeAction *v81; // r0 int v82; // r2 cocos2d::CCAction *v83; // r0 void (*v84)(void); // r3 int v85; // r3 LevelSettingsObject *v86; // r1 GameManager *v87; // r0 GameManager *v88; // r0 ObjectToolbox *GameVariable; // r0 ObjectToolbox *v90; // r0 const char *v91; // r0 const char *v92; // r10 size_t v93; // r0 int v94; // r1 int v95; // r0 int v96; // r11 int v97; // r10 void (__fastcall *v98)(int, int *); // r11 int v99; // r5 void (__fastcall *v100)(int, _DWORD *); // r10 const cocos2d::CCPoint *v101; // r0 int v102; // r5 void (__fastcall *v103)(int, _DWORD *); // r10 float v104; // r1 cocos2d::CCSequence *v105; // r5 PlayLayer *v106; // r0 int (__fastcall *v107)(GJGameLevel **); // r1 cocos2d::CCFiniteTimeAction *v108; // r0 cocos2d::CCAction *v109; // r0 int v111; // [sp+1Ch] [bp-68h] unsigned int v112; // [sp+24h] [bp-60h] float v113; // [sp+28h] [bp-5Ch] BYREF float v114; // [sp+2Ch] [bp-58h] int (__fastcall *v115)(PlayLayer *); // [sp+30h] [bp-54h] int v116; // [sp+34h] [bp-50h] _DWORD v117[2]; // [sp+38h] [bp-4Ch] BYREF _DWORD v118[2]; // [sp+40h] [bp-44h] BYREF int v119[3]; // [sp+48h] [bp-3Ch] BYREF int v120[3]; // [sp+54h] [bp-30h] BYREF int v121[3]; // [sp+60h] [bp-24h] BYREF float v122[4]; // [sp+6Ch] [bp-18h] BYREF cocos2d::CCDirector::sharedDirector(this); cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v113); GJBaseGameLayer::createTextLayers(this); GJBaseGameLayer::updateSpecialGroupData(this); PlayLayer::optimizeColorGroups((cocos2d::CCArray **)this); PlayLayer::optimizeOpacityGroups((cocos2d::CCArray **)this); PlayLayer::scanDynamicSaveObjects(this); PlayLayer::scanActiveSaveObjects(this, v2); started = (GameLevelManager *)GJBaseGameLayer::processStartPosObjects(this); v4 = GameLevelManager::sharedState(started); GameLevelManager::getDeathDisplayData((GameLevelManager *)v121, v4); if ( (v121[0] & 1) != 0 ) v5 = v121[1]; else v5 = (int)LOBYTE(v121[0]) >> 1; if ( !v5 ) std::string::operator=((unsigned __int8 *)v121, (unsigned __int8 *)(*((_DWORD *)this + 352) + 1316)); *((_BYTE *)this + 1425) = GJGameLevel::dtParseGlobalBlob(*((_DWORD *)this + 352), v121, (char *)this + 11956); *((_DWORD *)this + 3002) = 0; v6 = *((_DWORD *)this + 2989); v7 = 2; v8 = (_DWORD *)((char *)this + 12008); v9 = (*((_DWORD *)this + 2990) - v6) >> 2; while ( v7 < v9 ) { v10 = *(_DWORD *)(v6 + 4 * v7); v7 += 9; if ( v10 > *v8 ) *v8 = v10; } std::string::~string((int)v121); PlayLayer::dtLoadCells(this); PlayLayer::dtLiveMarkersChanged(this); std::string::basic_string(v121, *((_DWORD *)this + 352) + 972); GJBaseGameLayer::updateLayerCapacity(this, v121); std::string::~string((int)v121); v11 = (LevelSettingsObject *)GJBaseGameLayer::increaseBatchNodeCapacity(this); if ( !*((_DWORD *)this + 521) ) { v12 = LevelSettingsObject::create(v11); v13 = *((_DWORD *)this + 352); *((_DWORD *)this + 521) = v12; *(_DWORD *)(v12 + 320) = v13; cocos2d::CCObject::retain(*((cocos2d::CCObject **)this + 521)); } *(_BYTE *)(*((_DWORD *)this + 519) + 2320) = *((_BYTE *)this + 10614); *(_BYTE *)(*((_DWORD *)this + 520) + 2320) = *((_BYTE *)this + 10614); ColorAction = GJEffectManager::getColorAction(*(GJEffectManager **)(*((_DWORD *)this + 521) + 264), 1005); *(_DWORD *)(ColorAction + 76) = 0; v15 = *((_BYTE **)this + 519); v16 = v15[2106]; v17 = v15[2107]; LOBYTE(v15) = v15[2108]; *(_BYTE *)(ColorAction + 68) = v16; *(_BYTE *)(ColorAction + 69) = v17; *(_BYTE *)(ColorAction + 70) = (_BYTE)v15; *(_BYTE *)(ColorAction + 80) = 1; v18 = GJEffectManager::getColorAction(*(GJEffectManager **)(*((_DWORD *)this + 521) + 264), 1006); *(_DWORD *)(v18 + 76) = 0; v19 = *((_BYTE **)this + 519); v20 = v19[2110]; v21 = v19[2109]; LOBYTE(v19) = v19[2111]; *(_BYTE *)(v18 + 69) = v20; *(_BYTE *)(v18 + 68) = v21; *(_BYTE *)(v18 + 70) = (_BYTE)v19; *(_BYTE *)(v18 + 80) = 1; v22 = (GameManager *)GameManager::sharedState((GameManager *)v18); if ( *((_DWORD *)v22 + 168) - *((_DWORD *)v22 + 169) > 0 ) { v23 = (GameManager *)GameManager::sharedState(v22); v24 = GameManager::sharedState(v23); GameManager::loadDeathEffect(v23, *(_DWORD *)(v24 + 672) - *(_DWORD *)(v24 + 676)); } GJBaseGameLayer::createBackground(this, *(_DWORD *)(*((_DWORD *)this + 521) + 292)); v25 = *(_DWORD *)(*((_DWORD *)this + 521) + 304); if ( v25 > 0 ) GJBaseGameLayer::createMiddleground(this, v25); GJBaseGameLayer::createGroundLayer( this, *(_DWORD *)(*((_DWORD *)this + 521) + 296), *(_DWORD *)(*((_DWORD *)this + 521) + 344)); UILayer::togglePlatformerMode(*((UILayer **)this + 2810), *((_BYTE *)this + 10614)); v26 = *((_DWORD *)this + 2715); v27 = *(void (__fastcall **)(int, float *))(*(_DWORD *)v26 + 680); v28 = *((_DWORD *)this + 519); BYTE2(v112) = *(_BYTE *)(v28 + 2108); LOWORD(v112) = *(_WORD *)(v28 + 2106); sub_3FED44(v122, v112); v27(v26, v122); v29 = *((_DWORD *)this + 2715); v30 = *(void (__fastcall **)(int, float *))(*(_DWORD *)v29 + 696); memset(v122, 0, sizeof(v122)); v122[3] = 1.0; v30(v29, v122); v31 = (FMODAudioEngine *)GJBaseGameLayer::resetPlayer(this); v32 = FMODAudioEngine::sharedEngine(v31); GJGameLevel::getAudioFileName((GJGameLevel *)v121); FMODAudioEngine::loadMusic( v32, (unsigned __int8 *)v121, 1.0, 0, 1.0, 1, 0, 0, *(_BYTE *)(*((_DWORD *)this + 521) + 290)); v33 = (FMODAudioEngine *)std::string::~string((int)v121); v34 = *(_DWORD *)(*(_DWORD *)(*((_DWORD *)this + 521) + 320) + 436); if ( v34 || *(int *)(*((_DWORD *)this + 352) + 432) > 19 ) { v35 = FMODAudioEngine::sharedEngine(v33); v36 = (MusicDownloadManager *)FMODAudioEngine::enableMetering(v35); *((_BYTE *)this + 11952) = 1; v37 = (MusicDownloadManager *)MusicDownloadManager::sharedState(v36); v77 = (FMODAudioEngine *)MusicDownloadManager::incrementPriorityForSong(v37, v34); } else { v76 = FMODAudioEngine::sharedEngine(v33); v77 = (FMODAudioEngine *)FMODAudioEngine::disableMetering(v76); } v38 = (FMODAudioEngine *)FMODAudioEngine::sharedEngine(v77); *((_BYTE *)this + 11872) = COERCE_FLOAT(FMODAudioEngine::getBackgroundMusicVolume(v38)) <= 0.0; LevelTools::getAudioString((LevelTools *)v121, *(_DWORD *)(*((_DWORD *)this + 352) + 432)); *((_DWORD *)this + 2725) = AudioEffectsLayer::create(v121); std::string::~string((int)v121); (*(void (__fastcall **)(_DWORD, _DWORD, int))(**((_DWORD **)this + 609) + 232))( *((_DWORD *)this + 609), *((_DWORD *)this + 2725), 1); v39 = (GameManager *)(*(int (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 2725) + 172))( *((_DWORD *)this + 2725), 0); v40 = (GameManager *)GameManager::sharedState(v39); v41 = GameManager::sharedState(v40); FontFile = (const char *)GameManager::getFontFile(v40, *(_DWORD *)(v41 + 780)); v44 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)"Attempt 1", FontFile, v43); *((_DWORD *)this + 2975) = v44; (*(void (__fastcall **)(_DWORD, int, int))(**((_DWORD **)this + 609) + 232))(*((_DWORD *)this + 609), v44, 1400); if ( *((_BYTE *)this + 11944) ) (*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 2975) + 72))(*((_DWORD *)this + 2975), -1082130432); v46 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)&unk_B6B226, "chatFont.fnt", v45); *((_DWORD *)this + 3053) = v46; (*(void (__fastcall **)(PlayLayer *, int, int))(*(_DWORD *)this + 232))(this, v46, 1000); v47 = *((_DWORD *)this + 3053); v48 = *(void (__fastcall **)(int, float *))(*(_DWORD *)v47 + 148); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v122, 0.0, 1.0); v48(v47, v122); v49 = *((_DWORD *)this + 3053); v50 = *(void (__fastcall **)(int, float *))(*(_DWORD *)v49 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v117, 0.0, 0.0); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v118, 5.0, v114 - 10.0); cocos2d::CCPoint::operator+(v122, v117, v118); v50(v49, v122); (*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 3053) + 512))(*((_DWORD *)this + 3053), 150); (*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 3053) + 80))(*((_DWORD *)this + 3053), 1056964608); PlayLayer::updateInfoLabel(this); (*(void (__fastcall **)(PlayLayer *))(*(_DWORD *)this + 788))(this); if ( !*(_BYTE *)(*((_DWORD *)this + 521) + 280) || *((_BYTE *)this + 10836) || *(_DWORD *)(*((_DWORD *)this + 352) + 952) == 2 || (v51 = *((unsigned __int8 *)this + 10614), *((_BYTE *)this + 10614)) ) { v52 = 1065353216; } else { (*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 2975) + 172))( *((_DWORD *)this + 2975), *((unsigned __int8 *)this + 10614)); v79 = (cocos2d::CCSequence *)cocos2d::CCDelayTime::create((cocos2d::CCDelayTime *)0x3F000000, v78); v116 = v51; v115 = PlayLayer::showTwoPlayerGuide; v80 = v79; v81 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCCallFunc::create(this, PlayLayer::showTwoPlayerGuide, v51); v82 = v51; v52 = 0x40000000; v83 = (cocos2d::CCAction *)cocos2d::CCSequence::create(v80, v81, v82); cocos2d::CCNode::runAction(this, v83); } *((_BYTE *)this + 10837) = 1; *((_BYTE *)this + 10838) = 1; *((_BYTE *)this + 10829) = 1; GJBaseGameLayer::updateCamera(this, 0.0); v54 = cocos2d::CCSprite::create((cocos2d::CCSprite *)"slidergroove2.png", v53); *((_DWORD *)this + 2978) = v54; (*(void (__fastcall **)(PlayLayer *, int, int))(*(_DWORD *)this + 232))(this, v54, 10); v56 = cocos2d::CCSprite::create((cocos2d::CCSprite *)"sliderBar2.png", v55); *((_DWORD *)this + 2979) = v56; *((float *)this + 2980) = *(float *)(*((_DWORD *)this + 2978) + 344) - 4.0; *((float *)this + 2981) = 8.0; LODWORD(v122[0]) = 9729; LODWORD(v122[1]) = 9729; LODWORD(v122[2]) = 10497; LODWORD(v122[3]) = 10497; v57 = (*(int (__fastcall **)(int))(*(_DWORD *)v56 + 536))(v56); cocos2d::CCTexture2D::setTexParameters(v57, v122); v58 = *((_DWORD *)this + 2979); v59 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v58 + 480); v60 = *((_BYTE **)this + 519); v61 = v60[2107]; v62 = v60[2108]; LOBYTE(v60) = v60[2106]; BYTE1(v118[0]) = v61; BYTE2(v118[0]) = v62; LOBYTE(v118[0]) = (_BYTE)v60; v59(v58, v118); (*(void (__fastcall **)(_DWORD, _DWORD, int))(**((_DWORD **)this + 2978) + 232))( *((_DWORD *)this + 2978), *((_DWORD *)this + 2979), -1); v111 = *((_DWORD *)this + 2979); v63 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v111 + 148); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v118, 0.0, 0.0); v63(v111, v118); v64 = *((_DWORD *)this + 2979); v65 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v64 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v118, 2.0, 4.0); v65(v64, v118); v66 = *((_DWORD *)this + 2978); v67 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v66 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v118, v113 * 0.5, v114 - 8.0); v67(v66, v118); v69 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)"100%", "bigFont.fnt", v68); *((_DWORD *)this + 2976) = v69; (*(void (__fastcall **)(int, float))(*(_DWORD *)v69 + 80))(v69, 0.5); (*(void (__fastcall **)(PlayLayer *, _DWORD, int))(*(_DWORD *)this + 232))(this, *((_DWORD *)this + 2976), 15); v70 = *((_DWORD *)this + 2976); v71 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v70 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v118, (float)(v113 * 0.5) + 110.0, v114 - 8.0); v71(v70, v118); v72 = *((_DWORD *)this + 2976); v73 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v72 + 148); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v118, 0.0, 0.5); v73(v72, v118); PlayLayer::updateProgressbar(this); (*(void (__fastcall **)(PlayLayer *))(*(_DWORD *)this + 784))(this); v74 = *((_DWORD *)this + 519); if ( *((_BYTE *)this + 10836) || (v75 = *((_DWORD *)this + 521), *(_BYTE *)(v75 + 349)) || *(int *)(v75 + 364) > 0 ) { (*(void (__fastcall **)(int, int))(*(_DWORD *)v74 + 172))(v74, 1); v84 = *(void (**)(void))(**((_DWORD **)this + 520) + 172); } else { (*(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v74 + 172))(v74, *(unsigned __int8 *)(v75 + 349)); v84 = *(void (**)(void))(**((_DWORD **)this + 520) + 172); } v84(); PlayLayer::loadDefaultColors(this); GJBaseGameLayer::updateLevelColors(this); v85 = *((_DWORD *)this + 2680); if ( v85 ) v86 = *(LevelSettingsObject **)(v85 + 1648); else v86 = *((LevelSettingsObject **)this + 521); GJBaseGameLayer::setupLevelStart(this, v86); *((_BYTE *)this + 10716) = 1; (*(void (__fastcall **)(PlayLayer *, _DWORD))(*(_DWORD *)this + 596))(this, 0); GJBaseGameLayer::updateCamera(this, 0.0); v87 = (GameManager *)(*(int (__fastcall **)(PlayLayer *, _DWORD))(*(_DWORD *)this + 644))(this, 0); v88 = (GameManager *)GameManager::sharedState(v87); GameVariable = (ObjectToolbox *)GameManager::getGameVariable(v88, "0072"); *((_BYTE *)this + 12208) = (_BYTE)GameVariable; v90 = (ObjectToolbox *)ObjectToolbox::sharedState(GameVariable); v91 = (const char *)ObjectToolbox::intKeyToFrame(v90, 8); memset(v119, 0, sizeof(v119)); v92 = v91; v93 = strlen(v91); std::string::__init(v119, v92, v93); v95 = GameObject::createWithKey((GameObject *)byte_8, v94); *((_DWORD *)this + 2913) = v95; (*(void (__fastcall **)(int))(*(_DWORD *)v95 + 632))(v95); v96 = *((_DWORD *)this + 2913); std::string::basic_string(v120, (int)v119); GameObject::addColorSprite(v96, v120); std::string::~string((int)v120); v97 = *((_DWORD *)this + 2913); v98 = *(void (__fastcall **)(int, int *))(*(_DWORD *)v97 + 636); std::string::basic_string(v121, (int)v119); v98(v97, v121); std::string::~string((int)v121); v99 = *((_DWORD *)this + 2913); v100 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v99 + 684); v101 = (const cocos2d::CCPoint *)(*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 519) + 96))(*((_DWORD *)this + 519)); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v118, v101); v100(v99, v118); *(_BYTE *)(*((_DWORD *)this + 2913) + 471) = 1; PlayLayer::addObject((int)this, *((GameObject **)this + 2913)); GJBaseGameLayer::createPlayerCollisionBlock(this); v102 = *((_DWORD *)this + 2975); v103 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v102 + 92); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)v118, *((float *)this + 212) + (float)(v113 * 0.5), (float)(*((float *)this + 213) + (float)(v114 * 0.5)) + 85.0); v103(v102, v118); if ( *((_BYTE *)this + 10836) ) (*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 2975) + 512))(*((_DWORD *)this + 2975), 50); *((_BYTE *)this + 10837) = 1; (*(void (__fastcall **)(PlayLayer *))(*(_DWORD *)this + 804))(this); *((_BYTE *)this + 10880) = 0; PlayLayer::prepareMusic(this, 0); if ( *((_BYTE *)this + 11728) ) { v105 = (cocos2d::CCSequence *)cocos2d::CCDelayTime::create((cocos2d::CCDelayTime *)v52, v104); v106 = this; v117[0] = PlayLayer::startGame; v117[1] = 0; v107 = (int (__fastcall *)(GJGameLevel **))PlayLayer::startGame; } else { v105 = (cocos2d::CCSequence *)cocos2d::CCDelayTime::create((cocos2d::CCDelayTime *)v52, v104); v106 = this; v118[0] = PlayLayer::onQuit; v118[1] = 0; v107 = PlayLayer::onQuit; } v108 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCCallFunc::create(v106, v107, 0); v109 = (cocos2d::CCAction *)cocos2d::CCSequence::create(v105, v108, 0); cocos2d::CCNode::runAction(this, v109); cocos2d::CCNode::scheduleUpdate(this); GJBaseGameLayer::checkSpawnObjects(this); GJEffectManager::updateEffects(*((GJEffectManager **)this + 381), 0.0); (*(void (__fastcall **)(PlayLayer *, _DWORD))(*(_DWORD *)this + 596))(this, 0); GJBaseGameLayer::updateLevelColors(this); GJBaseGameLayer::updateProximityVolumeEffects(this); PlayLayer::updateTestModeLabel(this); if ( GJBaseGameLayer::shouldExitHackedLevel(this) ) { PlayLayer::removeAllObjects(this); PlayLayer::onQuit((GJGameLevel **)this); } return std::string::~string((int)v119); }
GD Web Decomp Icon

GD Web Decomp

Raw Source