// // WorldSelectLayer::init from 0x62e078 to 0x62e662 (1514 bytes) // // 1 xrefs: // > WorldSelectLayer::create @ 0x62e6f8 // // 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:55:15 +0000 // cocos2d::CCTextureCache *__fastcall WorldSelectLayer::init(WorldSelectLayer *this, cocos2d::CCArray *a2) { cocos2d::CCTextureCache *v3; // r0 cocos2d::CCTextureCache *v4; // r11 cocos2d::CCTextureCache *v5; // r0 cocos2d::CCSpriteFrameCache *v6; // r0 cocos2d::CCSpriteFrameCache *v7; // r0 cocos2d::CCDirector *v8; // r0 const char *v9; // r1 int v10; // r0 int v11; // r7 void (__fastcall *v12)(int, _DWORD *); // r8 int v13; // r7 void (__fastcall *v14)(int, _DWORD *); // r8 int v15; // r0 int (__fastcall *v16)(int, _DWORD *); // r2 cocos2d::CCMenu *v17; // r0 int v18; // r8 void (__fastcall *v19)(int, _DWORD *); // r7 const char *v20; // r1 int v21; // r0 _DWORD *v22; // r7 const char *v23; // r1 int v24; // r7 int (__fastcall *v25)(int, _DWORD *); // r10 cocos2d::CCDirector *v26; // r0 void (__fastcall *v27)(int, _DWORD *); // r10 cocos2d::CCDirector *v28; // r0 float v29; // s18 cocos2d::CCDirector *v30; // r0 float v31; // r0 const char *v32; // r1 cocos2d::CCSprite *v33; // r7 int (__fastcall *v34)(cocos2d::CCSprite *, _DWORD *); // r9 cocos2d::CCDirector *v35; // r0 void (__fastcall *v36)(cocos2d::CCSprite *, _DWORD *); // r9 cocos2d::CCDirector *v37; // r0 float v38; // s18 cocos2d::CCDirector *v39; // r0 float v40; // r0 cocos2d::CCMenu *v41; // r0 float v42; // s17 const cocos2d::CCPoint *v43; // r8 PlatformToolbox *v44; // r0 const char *v45; // r1 int isControllerConnected; // r10 char *v47; // r0 cocos2d::CCSprite *v48; // r7 int v49; // r0 cocos2d::CCDirector *v50; // r0 void (__fastcall *v51)(cocos2d::CCLayer *, _DWORD *); // r9 cocos2d::CCDirector *v52; // r0 float v53; // r0 const char *v54; // r1 char *v55; // r0 int v56; // r5 int v57; // r0 cocos2d::CCDirector *v58; // r0 cocos2d::CCDirector *v59; // r0 float v60; // r0 const char *v61; // r1 int v62; // r0 int v63; // r8 cocos2d::CCDirector *v64; // r0 void (__fastcall *v65)(int, _DWORD *); // r7 cocos2d::CCDirector *v66; // r0 float v67; // s17 cocos2d::CCDirector *v68; // r0 float v69; // r0 cocos2d::CCMenuItem *v70; // r2 int (__fastcall *v71)(WorldSelectLayer *, _DWORD *); // r7 GameManager *v72; // r0 float v73; // r1 GameStatsManager *v74; // r0 cocos2d::CCSequence *v75; // r0 cocos2d::CCSequence *v76; // r8 cocos2d::CCFiniteTimeAction *v77; // r0 cocos2d::CCAction *v78; // r0 int v79; // r0 cocos2d::CCArray *v80; // r1 cocos2d::CCArray ***v81; // r0 GameStatsManager *v82; // r0 GameManager *hasCompletedMainLevel; // r0 GameManager *v84; // r8 GameManager *v85; // r0 float v86; // r1 cocos2d::CCSequence *v88; // r0 cocos2d::CCSequence *v89; // r9 cocos2d::CCFiniteTimeAction *v90; // r0 cocos2d::CCAction *v91; // r0 cocos2d::CCLayer *v92; // [sp+8h] [bp-54h] cocos2d::CCLayer *v93; // [sp+8h] [bp-54h] cocos2d::CCLayer *v94; // [sp+8h] [bp-54h] int v96; // [sp+14h] [bp-48h] __int16 v97; // [sp+18h] [bp-44h] BYREF char v98; // [sp+1Ah] [bp-42h] float v99; // [sp+1Ch] [bp-40h] BYREF float v100; // [sp+20h] [bp-3Ch] cocos2d::CCDirector *(__fastcall *v101)(cocos2d::CCDirector *, cocos2d::CCObject *); // [sp+24h] [bp-38h] int v102; // [sp+28h] [bp-34h] cocos2d::CCArray *(__fastcall *v103)(cocos2d::CCArray *, cocos2d::CCObject *); // [sp+2Ch] [bp-30h] int v104; // [sp+30h] [bp-2Ch] cocos2d::CCArray *(__fastcall *v105)(cocos2d::CCArray *, cocos2d::CCObject *); // [sp+34h] [bp-28h] int v106; // [sp+38h] [bp-24h] int *(__fastcall *v107)(int *, cocos2d::CCObject *); // [sp+3Ch] [bp-20h] int v108; // [sp+40h] [bp-1Ch] _DWORD v109[2]; // [sp+44h] [bp-18h] BYREF _DWORD v110[2]; // [sp+4Ch] [bp-10h] BYREF v3 = (cocos2d::CCTextureCache *)cocos2d::CCLayer::init(this); v4 = v3; if ( !v3 ) return v4; v5 = (cocos2d::CCTextureCache *)cocos2d::CCTextureCache::sharedTextureCache(v3); v6 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCTextureCache::addImage(v5, "WorldSheet.png", 0); v7 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v6); cocos2d::CCSpriteFrameCache::addSpriteFramesWithFile(v7, "WorldSheet.plist"); (*(void (__fastcall **)(WorldSelectLayer *, int))(*(_DWORD *)this + 536))(this, 1); v8 = (cocos2d::CCDirector *)(*(int (__fastcall **)(WorldSelectLayer *, int))(*(_DWORD *)this + 544))(this, 1); cocos2d::CCDirector::sharedDirector(v8); cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v99); v10 = cocos2d::CCSprite::create((cocos2d::CCSprite *)"GJ_gradientBG.png", v9); *((_DWORD *)this + 80) = v10; v11 = v10; v12 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v10 + 148); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v110, 0.0, 0.0); v12(v11, v110); (*(void (__fastcall **)(WorldSelectLayer *, _DWORD, int))(*(_DWORD *)this + 232))(this, *((_DWORD *)this + 80), -2); (*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 80) + 64))( *((_DWORD *)this + 80), (float)(v99 + 10.0) / *(float *)(*((_DWORD *)this + 80) + 344)); (*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 80) + 72))( *((_DWORD *)this + 80), (float)(v100 + 10.0) / *(float *)(*((_DWORD *)this + 80) + 348)); v13 = *((_DWORD *)this + 80); v14 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v13 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v110, -5.0, -5.0); v14(v13, v110); v15 = *((_DWORD *)this + 80); v16 = *(int (__fastcall **)(int, _DWORD *))(*(_DWORD *)v15 + 480); memset(v110, 51, 3); v17 = (cocos2d::CCMenu *)v16(v15, v110); v18 = cocos2d::CCMenu::create(v17); (*(void (__fastcall **)(WorldSelectLayer *, int, int))(*(_DWORD *)this + 232))(this, v18, 2); v19 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v18 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v110, v99 - 40.0, v100 - 25.0); v19(v18, v110); v21 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"garageRope_001.png", v20); v102 = 0; v101 = WorldSelectLayer::onGarage; v22 = (_DWORD *)CCMenuItemSpriteExtra::create(v21, 0, (int)this, (int)WorldSelectLayer::onGarage, 0); CCMenuItemSpriteExtra::setSizeMult((int)v22, 1.2); CCMenuItemSpriteExtra::useAnimationType(v22, 1); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v110, 0.0, -8.0); cocos2d::CCPoint::operator=(v22 + 89, v110); v22[91] = 1045220557; v22[92] = 1045220557; (*(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v18 + 228))(v18, v22); v97 = -1; v98 = -1; v24 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_sideArt_001.png", v23); v25 = *(int (__fastcall **)(int, _DWORD *))(*(_DWORD *)v24 + 148); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v110, 0.0, 0.0); v26 = (cocos2d::CCDirector *)v25(v24, v110); v27 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v24 + 92); v28 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v26); v29 = COERCE_FLOAT(cocos2d::CCDirector::getScreenLeft(v28)); v30 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)LODWORD(v29)); v31 = COERCE_FLOAT(cocos2d::CCDirector::getScreenBottom(v30)); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v110, v29 - 1.0, v31 - 1.0); v27(v24, v110); (*(void (__fastcall **)(WorldSelectLayer *, int, int))(*(_DWORD *)this + 232))(this, v24, 1); (*(void (__fastcall **)(int, __int16 *))(*(_DWORD *)v24 + 480))(v24, &v97); v33 = (cocos2d::CCSprite *)cocos2d::CCSprite::createWithSpriteFrameName( (cocos2d::CCSprite *)"GJ_sideArt_001.png", v32); v34 = *(int (__fastcall **)(cocos2d::CCSprite *, _DWORD *))(*(_DWORD *)v33 + 148); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v110, 1.0, 0.0); v35 = (cocos2d::CCDirector *)v34(v33, v110); v36 = *(void (__fastcall **)(cocos2d::CCSprite *, _DWORD *))(*(_DWORD *)v33 + 92); v37 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v35); v38 = COERCE_FLOAT(cocos2d::CCDirector::getScreenRight(v37)); v39 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)LODWORD(v38)); v40 = COERCE_FLOAT(cocos2d::CCDirector::getScreenBottom(v39)); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v110, v38 + 1.0, v40 - 1.0); v36(v33, v110); cocos2d::CCSprite::setFlipX(v33, 1); (*(void (__fastcall **)(WorldSelectLayer *, cocos2d::CCSprite *, int))(*(_DWORD *)this + 232))(this, v33, 1); v41 = (cocos2d::CCMenu *)(*(int (__fastcall **)(cocos2d::CCSprite *, __int16 *))(*(_DWORD *)v33 + 480))(v33, &v97); v42 = v100 * 0.5; v43 = (const cocos2d::CCPoint *)cocos2d::CCMenu::create(v41); v44 = (PlatformToolbox *)(*(int (__fastcall **)(WorldSelectLayer *, const cocos2d::CCPoint *, int))(*(_DWORD *)this + 232))( this, v43, 5); isControllerConnected = PlatformToolbox::isControllerConnected(v44); if ( isControllerConnected ) v47 = "controllerBtn_DPad_Left_001.png"; else v47 = "navArrowBtn_001.png"; v48 = (cocos2d::CCSprite *)cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)v47, v45); (*(void (__fastcall **)(cocos2d::CCSprite *, int))(*(_DWORD *)v48 + 80))(v48, 1058642330); if ( !isControllerConnected ) cocos2d::CCSprite::setFlipX(v48, 1); v104 = 0; v103 = WorldSelectLayer::onPrev; v49 = CCMenuItemSpriteExtra::create((int)v48, 0, (int)this, (int)WorldSelectLayer::onPrev, 0); *((_DWORD *)this + 82) = v49; (*(void (__fastcall **)(const cocos2d::CCPoint *, int))(*(_DWORD *)v43 + 228))(v43, v49); v50 = (cocos2d::CCDirector *)CCMenuItemSpriteExtra::setSizeMult(*((_DWORD *)this + 82), 2.0); v92 = *((cocos2d::CCLayer **)this + 82); v51 = *(void (__fastcall **)(cocos2d::CCLayer *, _DWORD *))(*(_DWORD *)v92 + 92); v52 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v50); v53 = COERCE_FLOAT(cocos2d::CCDirector::getScreenLeft(v52)); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v109, v53 + 25.0, v42); cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v110, v43); v51(v92, v110); if ( isControllerConnected ) v55 = "controllerBtn_DPad_Right_001.png"; else v55 = "navArrowBtn_001.png"; v56 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)v55, v54); (*(void (__fastcall **)(int, int))(*(_DWORD *)v56 + 80))(v56, 1058642330); v106 = 0; v105 = WorldSelectLayer::onNext; v57 = CCMenuItemSpriteExtra::create(v56, 0, (int)this, (int)WorldSelectLayer::onNext, 0); *((_DWORD *)this + 83) = v57; (*(void (__fastcall **)(const cocos2d::CCPoint *, int))(*(_DWORD *)v43 + 228))(v43, v57); v58 = (cocos2d::CCDirector *)CCMenuItemSpriteExtra::setSizeMult(*((_DWORD *)this + 83), 2.0); v96 = *((_DWORD *)this + 83); v93 = *(cocos2d::CCLayer **)(*(_DWORD *)v96 + 92); v59 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v58); v60 = COERCE_FLOAT(cocos2d::CCDirector::getScreenRight(v59)); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v109, v60 - 25.0, v42); cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v110, v43); ((void (__fastcall *)(int, _DWORD *))v93)(v96, v110); v62 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_arrow_01_001.png", v61); v108 = 0; v107 = WorldSelectLayer::onBack; v94 = (cocos2d::CCLayer *)CCMenuItemSpriteExtra::create(v62, 0, (int)this, (int)WorldSelectLayer::onBack, 0); CCMenuItemSpriteExtra::setSizeMult((int)v94, 1.6); v63 = cocos2d::CCMenu::create(v94, nullptr); v64 = (cocos2d::CCDirector *)(*(int (__fastcall **)(WorldSelectLayer *, int, int))(*(_DWORD *)this + 232))( this, v63, 1); v65 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v63 + 92); v66 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v64); v67 = COERCE_FLOAT(cocos2d::CCDirector::getScreenLeft(v66)); v68 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)LODWORD(v67)); v69 = COERCE_FLOAT(cocos2d::CCDirector::getScreenTop(v68)); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v110, v67 + 25.0, v69 - 22.0); v65(v63, v110); if ( isControllerConnected ) GameToolbox::addBackButton(this, v94, v70); WorldSelectLayer::setupWorlds(this); WorldSelectLayer::updateArrows(this); v71 = *(int (__fastcall **)(WorldSelectLayer *, _DWORD *))(*(_DWORD *)this + 584); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v110, (const cocos2d::CCPoint *)&flt_D2CD50); v72 = (GameManager *)v71(this, v110); *(_BYTE *)(GameManager::sharedState(v72) + 852) = 0; v74 = *((GameStatsManager **)this + 85); if ( !v74 ) { if ( (int)a2 <= 0 ) goto LABEL_19; v81 = (cocos2d::CCArray ***)this; v80 = a2; LABEL_18: v74 = WorldSelectLayer::goToPage(v81, v80, 1); goto LABEL_19; } if ( !*((_BYTE *)v74 + 300) ) { v80 = (cocos2d::CCArray *)((*(int (__fastcall **)(GameStatsManager *))(*(_DWORD *)v74 + 32))(v74) - 1); v81 = (cocos2d::CCArray ***)this; goto LABEL_18; } v75 = (cocos2d::CCSequence *)cocos2d::CCDelayTime::create((cocos2d::CCDelayTime *)0x3F800000, v73); v109[1] = 0; v109[0] = WorldSelectLayer::animateInActiveIsland; v76 = v75; v77 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCCallFunc::create(this, WorldSelectLayer::animateInActiveIsland, 0); v78 = (cocos2d::CCAction *)cocos2d::CCSequence::create(v76, v77, 0); cocos2d::CCNode::runAction(this, v78); v79 = *((_DWORD *)this + 81); *((_BYTE *)this + 344) = 1; v74 = (GameStatsManager *)(*(int (__fastcall **)(int, _DWORD))(*(_DWORD *)v79 + 500))(v79, 0); LABEL_19: v82 = (GameStatsManager *)GameStatsManager::sharedState(v74); hasCompletedMainLevel = (GameManager *)GameStatsManager::hasCompletedMainLevel(v82, 218); v84 = hasCompletedMainLevel; if ( hasCompletedMainLevel ) { v85 = (GameManager *)GameManager::sharedState(hasCompletedMainLevel); if ( !GameManager::getUGV(v85, "18") ) { *((_BYTE *)this + 344) = 1; v4 = v84; v88 = (cocos2d::CCSequence *)cocos2d::CCDelayTime::create((cocos2d::CCDelayTime *)0x3F800000, v86); v110[1] = 0; v110[0] = WorldSelectLayer::showCompleteDialog; v89 = v88; v90 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCCallFunc::create(this, WorldSelectLayer::showCompleteDialog, 0); v91 = (cocos2d::CCAction *)cocos2d::CCSequence::create(v89, v90, 0); cocos2d::CCNode::runAction(this, v91); } } return v4; }
GD Web Decomp Icon

GD Web Decomp

Raw Source