// // PauseLayer::customSetup from 0x490b18 to 0x491c7a (4450 bytes) // // 0 xrefs: // // 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:49:38 +0000 // int __fastcall PauseLayer::customSetup(PauseLayer *this) { cocos2d::CCDirector *v2; // r0 cocos2d::CCLayer *WinSize; // r0 int v4; // r0 int v5; // r3 cocos2d::CCDirector *v6; // r0 cocos2d::CCDirector *v7; // r0 float v8; // s18 cocos2d::CCDirector *v9; // r0 float v10; // r0 float v11; // s18 cocos2d::CCDirector *v12; // r0 float v13; // s16 cocos2d::CCDirector *v14; // r0 float v15; // s17 int v16; // r9 void (__fastcall *v17)(int, _DWORD *); // r6 GameManager *v18; // r0 int v19; // r0 const char *v20; // r2 cocos2d::CCLabelBMFont *v21; // r0 int v22; // r5 float v23; // s17 void (__fastcall *v24)(int, _DWORD *); // r6 cocos2d::CCMenu *v25; // r0 cocos2d::CCMenu *v26; // r5 const char *v27; // r1 GameManager *v28; // r6 GameManager *v29; // r0 const char *v30; // r1 GameManager *v31; // r0 GameManager *v32; // r0 const char *v33; // r1 int v34; // r0 int v35; // r0 const char *v36; // r1 int v37; // r2 int v38; // r7 int v39; // r0 int v40; // r0 int v41; // r0 const char *v42; // r1 int v43; // r0 const char *v44; // r1 int v45; // r0 int v46; // r0 GameManager *v47; // r0 float v48; // r1 int (__fastcall *v49)(cocos2d::CCMenu *, _DWORD *); // r6 float *v50; // r0 GameManager *v51; // r0 GameManager *v52; // r0 GameManager *v53; // r0 const char *v54; // r1 float v55; // s18 int v56; // r6 GameManager *v57; // r0 _BOOL4 v58; // r10 GameManager *v59; // r0 char *v60; // r1 int v61; // r8 char *v62; // r1 int v63; // r0 GameManager *v64; // r0 int v65; // r0 cocos2d::CCSprite *v66; // r0 cocos2d::CCObject *v67; // r7 int v68; // r3 int (__fastcall *v69)(cocos2d::CCObject *, _DWORD *); // r8 GameManager *v70; // r0 int (__fastcall *v71)(cocos2d::CCObject *, _DWORD *); // r8 const char *v72; // r1 int v73; // r6 cocos2d::CCMenu *v74; // r0 cocos2d::CCMenuItem *v75; // r1 int v76; // r0 int v77; // r3 cocos2d::CCDirector *v78; // r0 int v79; // r7 void (__fastcall *v80)(int, _DWORD, _DWORD); // r6 cocos2d::CCDirector *v81; // r0 float v82; // s20 cocos2d::CCDirector *v83; // r0 float v84; // r0 Slider *v85; // r0 int (__fastcall *v86)(int, _DWORD *); // r10 FMODAudioEngine *v87; // r0 Slider *v88; // r10 FMODAudioEngine *v89; // r0 int BackgroundMusicVolume; // r0 Slider *v91; // r0 int v92; // r10 int (__fastcall *v93)(int, _DWORD *); // r8 FMODAudioEngine *v94; // r0 Slider *v95; // r8 FMODAudioEngine *v96; // r0 int EffectsVolume; // r0 GameManager *v98; // r0 const char *v99; // r1 int v100; // r8 void (__fastcall *v101)(int, _DWORD *); // r9 int v102; // r10 const char *v103; // r1 int v104; // r8 int (__fastcall *v105)(int, _DWORD *); // r9 int v106; // r10 GameManager *v107; // r0 float v108; // r0 GJGameLevel *v109; // r9 int v110; // r7 _BOOL4 v111; // r7 int v112; // r8 cocos2d::CCArray *v113; // r0 GameManager *v114; // r0 int v115; // r0 GameStatsManager *v116; // r0 GameStatsManager *v117; // r10 GameStatsManager *v118; // r6 const char *v119; // r0 int hasUserCoin; // r0 const char *v121; // r1 int v122; // r12 const char *v123; // r3 bool v124; // zf const char *v125; // r2 cocos2d::CCSprite *v126; // r0 cocos2d::CCObject *v127; // r6 int v128; // r12 int v129; // r0 cocos2d::CCObject *StartPosObjectsForCurrentMode; // r0 PlatformToolbox *v131; // r0 GameManager *v132; // r0 GameManager *v133; // r0 const char *v134; // r2 cocos2d::CCArray *v135; // r7 int v136; // r0 int v137; // r8 void (__fastcall *v138)(int, _DWORD *); // r6 const char *v139; // r2 int v140; // r0 const char *v141; // r1 int v142; // r9 int v143; // r9 const char *v144; // r1 cocos2d::CCSprite *v145; // r9 int v146; // r8 const char *v147; // r1 int v148; // r8 GameManager *v149; // r0 const char *v150; // r1 int v151; // r7 int v152; // r6 void (__fastcall *v153)(int, _BYTE *); // r7 int result; // r0 const char *v155; // r1 int v156; // r8 const cocos2d::CCPoint *v157; // r6 void (__fastcall *v158)(int, _BYTE *); // r9 const char *v159; // r1 int v160; // r8 const cocos2d::CCPoint *v161; // r9 void (__fastcall *v162)(int, _BYTE *); // r9 const char *v163; // r1 int v164; // r8 const cocos2d::CCPoint *v165; // r9 void (__fastcall *v166)(int, _BYTE *); // r4 int v167; // r7 void (__fastcall *v168)(int, _DWORD); // r9 float v169; // s19 float *v170; // r0 int v171; // r0 int v172; // r7 void (__fastcall *v173)(int, _DWORD *); // r6 GameStatsManager *v174; // r6 const char *CoinKey; // r0 int (__fastcall *v176)(cocos2d::CCObject *, _DWORD *); // r3 int v177; // r10 float v178; // s18 unsigned __int8 *v179; // r0 void (__fastcall *v180)(cocos2d::CCObject *, _DWORD *); // r3 int v181; // s15 int v182; // r2 int v183; // r0 int v184; // [sp+8h] [bp-12Ch] int v185; // [sp+Ch] [bp-128h] int v186; // [sp+10h] [bp-124h] int v187; // [sp+14h] [bp-120h] int v188; // [sp+14h] [bp-120h] _BOOL4 v189; // [sp+14h] [bp-120h] int v190; // [sp+14h] [bp-120h] int (__fastcall *v191)(int, _DWORD *); // [sp+14h] [bp-120h] int v192; // [sp+18h] [bp-11Ch] void (__fastcall *v193)(int, _DWORD *); // [sp+18h] [bp-11Ch] int v194; // [sp+18h] [bp-11Ch] cocos2d::CCArray *v195; // [sp+1Ch] [bp-118h] char *v196; // [sp+24h] [bp-110h] int v197; // [sp+3Ch] [bp-F8h] float v198; // [sp+40h] [bp-F4h] BYREF float v199; // [sp+44h] [bp-F0h] _BYTE v200[8]; // [sp+48h] [bp-ECh] BYREF _BYTE v201[4]; // [sp+50h] [bp-E4h] BYREF float v202; // [sp+54h] [bp-E0h] _BYTE v203[4]; // [sp+58h] [bp-DCh] BYREF float v204; // [sp+5Ch] [bp-D8h] _BYTE v205[8]; // [sp+60h] [bp-D4h] BYREF float v206[2]; // [sp+68h] [bp-CCh] BYREF _BYTE v207[8]; // [sp+70h] [bp-C4h] BYREF _BYTE v208[8]; // [sp+78h] [bp-BCh] BYREF _BYTE v209[8]; // [sp+80h] [bp-B4h] BYREF _BYTE v210[8]; // [sp+88h] [bp-ACh] BYREF cocos2d::CCDirector *(__fastcall *v211)(PauseLayer *, cocos2d::CCObject *); // [sp+90h] [bp-A4h] int v212; // [sp+94h] [bp-A0h] void (__fastcall *v213)(cocos2d::CCArray **, cocos2d::CCObject *); // [sp+98h] [bp-9Ch] int v214; // [sp+9Ch] [bp-98h] void (__fastcall *v215)(PauseLayer *, cocos2d::CCObject *); // [sp+A0h] [bp-94h] int v216; // [sp+A4h] [bp-90h] void (__fastcall *v217)(PauseLayer *, cocos2d::CCObject *); // [sp+A8h] [bp-8Ch] int v218; // [sp+ACh] [bp-88h] void (__fastcall *v219)(cocos2d::CCArray **, cocos2d::CCObject *); // [sp+B0h] [bp-84h] int v220; // [sp+B4h] [bp-80h] int (__fastcall *v221)(PauseLayer *, cocos2d::CCObject *); // [sp+B8h] [bp-7Ch] int v222; // [sp+BCh] [bp-78h] void (__fastcall *v223)(cocos2d::CCArray **, cocos2d::CCObject *); // [sp+C0h] [bp-74h] int v224; // [sp+C4h] [bp-70h] GameManager *(__fastcall *v225)(cocos2d::CCSpriteFrameCache **, cocos2d::CCObject *); // [sp+C8h] [bp-6Ch] int v226; // [sp+CCh] [bp-68h] int (__fastcall *v227)(PauseLayer *, cocos2d::CCObject *); // [sp+D0h] [bp-64h] int v228; // [sp+D4h] [bp-60h] FMOD::ChannelControl *(__fastcall *v229)(PauseLayer *, cocos2d::CCObject *); // [sp+D8h] [bp-5Ch] int v230; // [sp+DCh] [bp-58h] FMOD::ChannelControl *(__fastcall *v231)(PauseLayer *, cocos2d::CCObject *); // [sp+E0h] [bp-54h] int v232; // [sp+E4h] [bp-50h] int (__fastcall *v233)(cocos2d::CCArray **, cocos2d::CCObject *); // [sp+E8h] [bp-4Ch] int v234; // [sp+ECh] [bp-48h] _DWORD v235[2]; // [sp+F0h] [bp-44h] BYREF _DWORD v236[2]; // [sp+F8h] [bp-3Ch] BYREF int v237[2]; // [sp+100h] [bp-34h] BYREF cocos2d::CCLabelBMFont *v238; // [sp+108h] [bp-2Ch] _BYTE v239[16]; // [sp+10Ch] [bp-28h] BYREF _DWORD v240[4]; // [sp+11Ch] [bp-18h] BYREF (*(void (__fastcall **)(PauseLayer *, void *))(*(_DWORD *)this + 608))(this, &unk_BEBF1C); v2 = (cocos2d::CCDirector *)(*(int (__fastcall **)(PauseLayer *, int))(*(_DWORD *)this + 584))(this, 75); cocos2d::CCDirector::sharedDirector(v2); WinSize = (cocos2d::CCLayer *)cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v198); v4 = cocos2d::CCLayer::create(WinSize); v5 = *(_DWORD *)this; *((_DWORD *)this + 121) = v4; (*(void (__fastcall **)(PauseLayer *, int))(v5 + 228))(this, v4); v6 = (cocos2d::CCDirector *)cocos2d::CCRect::CCRect((cocos2d::CCRect *)v239, 0.0, 0.0, 80.0, 80.0); v7 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v6); v8 = COERCE_FLOAT(cocos2d::CCDirector::getScreenRight(v7)); v9 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)LODWORD(v8)); v10 = COERCE_FLOAT(cocos2d::CCDirector::getScreenLeft(v9)); v11 = (float)(v8 - 20.0) - v10; v12 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)LODWORD(v10)); v13 = COERCE_FLOAT(cocos2d::CCDirector::getScreenTop(v12)); v14 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)LODWORD(v13)); v15 = (float)(v13 - 20.0) - COERCE_FLOAT(cocos2d::CCDirector::getScreenBottom(v14)); cocos2d::CCRect::CCRect((cocos2d::CCRect *)v240, (const cocos2d::CCRect *)v239); v16 = cocos2d::extension::CCScale9Sprite::create("square04_001.png", v240); (*(void (__fastcall **)(int, int))(*(_DWORD *)v16 + 456))(v16, 175); cocos2d::CCSize::CCSize((cocos2d::CCSize *)v200, v11, v15); (*(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v16 + 160))(v16, v200); (*(void (__fastcall **)(_DWORD, int, int))(**((_DWORD **)this + 121) + 232))(*((_DWORD *)this + 121), v16, -1); v17 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v16 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v240, v198 * 0.5, v199 * 0.5); v17(v16, v240); v18 = (GameManager *)(*(int (__fastcall **)(int, void *))(*(_DWORD *)v16 + 480))(v16, &unk_BEBF1C); v19 = GameManager::sharedState(v18); std::string::basic_string(v237, *(_DWORD *)(*(_DWORD *)(v19 + 404) + 1408) + 280); if ( (v237[0] & 1) != 0 ) v21 = v238; else v21 = (cocos2d::CCLabelBMFont *)((char *)v237 + 1); v22 = cocos2d::CCLabelBMFont::create(v21, "bigFont.fnt", v20); std::string::~string((int)v237); v23 = v15 * 0.5; v24 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v22 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v240, v198 * 0.5, (float)(v23 + (float)(v199 * 0.5)) - 20.0); v24(v22, v240); (*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 121) + 228))(*((_DWORD *)this + 121), v22); (*(void (__fastcall **)(int, int))(*(_DWORD *)v22 + 172))(v22, 1); v25 = (cocos2d::CCMenu *)PauseLayer::setupProgressBars(this); v26 = (cocos2d::CCMenu *)cocos2d::CCMenu::create(v25); (*(void (__fastcall **)(_DWORD, cocos2d::CCMenu *))(**((_DWORD **)this + 121) + 228))(*((_DWORD *)this + 121), v26); v28 = (GameManager *)cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_menuBtn_001.png", v27); v29 = (GameManager *)GameManager::sharedState(v28); if ( *(_DWORD *)(*(_DWORD *)(*((_DWORD *)v29 + 101) + 1408) + 952) == 2 || (v31 = (GameManager *)GameManager::sharedState(v29), *((_DWORD *)v31 + 205) - *((_DWORD *)v31 + 206) > 0) ) { v167 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_editBtn_001.png", v30); v168 = *(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v167 + 80); v169 = *(float *)(*(int (__fastcall **)(GameManager *))(*(_DWORD *)v28 + 164))(v28); v170 = (float *)(*(int (__fastcall **)(int))(*(_DWORD *)v167 + 164))(v167); v168(v167, v169 / *v170); v212 = 0; v211 = PauseLayer::onTryEdit; v171 = CCMenuItemSpriteExtra::create(v167, 0, (int)this, (int)PauseLayer::onTryEdit, 0); v31 = (GameManager *)(*(int (__fastcall **)(cocos2d::CCMenu *, int))(*(_DWORD *)v26 + 228))(v26, v171); } v32 = (GameManager *)GameManager::sharedState(v31); if ( *(_BYTE *)(*(_DWORD *)(*((_DWORD *)v32 + 101) + 2084) + 281) ) { v34 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_replayFullBtn_001.png", v33); v214 = 0; v213 = PauseLayer::onRestartFull; v35 = CCMenuItemSpriteExtra::create(v34, 0, (int)this, (int)PauseLayer::onRestartFull, 0); v32 = (GameManager *)(*(int (__fastcall **)(cocos2d::CCMenu *, int))(*(_DWORD *)v26 + 228))(v26, v35); } v37 = *(_DWORD *)(GameManager::sharedState(v32) + 404); v38 = *(unsigned __int8 *)(v37 + 10784); if ( *(_BYTE *)(v37 + 10784) ) { v41 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_normalBtn_001.png", v36); v218 = 0; v217 = PauseLayer::onNormalMode; v40 = CCMenuItemSpriteExtra::create(v41, 0, (int)this, (int)PauseLayer::onNormalMode, 0); } else { v39 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_practiceBtn_001.png", v36); v216 = v38; v215 = PauseLayer::onPracticeMode; v40 = CCMenuItemSpriteExtra::create(v39, v38, (int)this, (int)PauseLayer::onPracticeMode, v38); } v184 = v40; (*(void (__fastcall **)(cocos2d::CCMenu *, int))(*(_DWORD *)v26 + 228))(v26, v40); v43 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_playBtn2_001.png", v42); v220 = 0; v219 = PauseLayer::onResume; v185 = CCMenuItemSpriteExtra::create(v43, 0, (int)this, (int)PauseLayer::onResume, 0); (*(void (__fastcall **)(cocos2d::CCMenu *, int))(*(_DWORD *)v26 + 228))(v26, v185); v222 = 0; v221 = PauseLayer::tryQuit; v186 = CCMenuItemSpriteExtra::create((int)v28, 0, (int)this, (int)PauseLayer::tryQuit, 0); (*(void (__fastcall **)(cocos2d::CCMenu *, int))(*(_DWORD *)v26 + 228))(v26, v186); v45 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_replayBtn_001.png", v44); v224 = 0; v223 = PauseLayer::onRestart; v46 = CCMenuItemSpriteExtra::create(v45, 0, (int)this, (int)PauseLayer::onRestart, 0); v47 = (GameManager *)(*(int (__fastcall **)(cocos2d::CCMenu *, int))(*(_DWORD *)v26 + 228))(v26, v46); if ( *(_DWORD *)(*(_DWORD *)(*(_DWORD *)(GameManager::sharedState(v47) + 404) + 1408) + 952) == 2 ) v48 = 10.0; else v48 = 15.0; cocos2d::CCMenu::alignItemsHorizontallyWithPadding(v26, v48); v49 = *(int (__fastcall **)(cocos2d::CCMenu *, _DWORD *))(*(_DWORD *)v26 + 92); v50 = (float *)(*(int (__fastcall **)(cocos2d::CCMenu *))(*(_DWORD *)v26 + 96))(v26); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v240, *v50, (float)(v199 * 0.5) - 30.0); v51 = (GameManager *)v49(v26, v240); v52 = (GameManager *)GameManager::sharedState(v51); if ( !*((_BYTE *)v52 + 730) ) { v53 = (GameManager *)GameManager::sharedState(v52); if ( *(_DWORD *)(*(_DWORD *)(*((_DWORD *)v53 + 101) + 1408) + 952) != 2 && !*(_BYTE *)(*(_DWORD *)(*(_DWORD *)(GameManager::sharedState(v53) + 404) + 2084) + 281) ) { v172 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_practiceTxt_001.png", v54); (*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 121) + 228))(*((_DWORD *)this + 121), v172); v173 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v172 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v240, (float)(v198 * 0.5) - 190.0, (float)(v199 * 0.5) - 12.0); v173(v172, v240); } } v55 = v11 * 0.5; v56 = 0; cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)v201, (float)(v55 + (float)(v198 * 0.5)) - 26.0, (float)(v23 + (float)(v199 * 0.5)) - 26.0); v57 = (GameManager *)cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)v203, (float)((float)((float)(v198 * 0.5) - v55) + 26.0) + 0.0, v202); v58 = *(_DWORD *)(*(_DWORD *)(*(_DWORD *)(GameManager::sharedState(v57) + 404) + 1408) + 952) == 2; while ( 2 ) { v237[0] = 0; v237[1] = 0; v238 = nullptr; v59 = (GameManager *)std::string::__init(v237, "GJ_plainBtn_001.png", 0x13u); switch ( v56 ) { case 1: v60 = "sideBtn_hide_001.png"; goto LABEL_21; case 2: v65 = GameManager::sharedState(v59); if ( GJGameLevel::isPlatformer(*(GJGameLevel **)(*(_DWORD *)(v65 + 404) + 1408)) ) goto LABEL_53; v62 = "sideBtn_death_001.png"; goto LABEL_28; case 3: v62 = "sideBtn_marker_001.png"; goto LABEL_28; case 4: if ( v58 || *(_DWORD *)(*(_DWORD *)(*(_DWORD *)(GameManager::sharedState(v59) + 404) + 1408) + 952) == 1 ) goto LABEL_53; v62 = "sideBtn_chat_001.png"; goto LABEL_28; case 5: if ( v58 ) goto LABEL_53; v62 = "sideBtn_quests_001.png"; goto LABEL_28; case 6: if ( !v58 ) goto LABEL_53; v64 = (GameManager *)GameManager::sharedState(v59); if ( GameManager::getGameVariable(v64, "0173") ) v62 = "sideBtn_damageOff_001.png"; else v62 = "sideBtn_damageOn_001.png"; goto LABEL_28; case 7: v63 = GameManager::sharedState(v59); if ( !GJGameLevel::isPlatformer(*(GJGameLevel **)(*(_DWORD *)(v63 + 404) + 1408)) ) goto LABEL_53; v62 = "sideBtn_platUI_001.png"; LABEL_28: std::string::assign(v237, v62); v61 = 1; goto LABEL_42; case 8: if ( !v58 ) goto LABEL_53; v60 = "sideBtn_time_001.png"; goto LABEL_21; case 9: if ( !*(_BYTE *)(*(_DWORD *)(GameManager::sharedState(v59) + 404) + 10784) ) goto LABEL_53; v60 = "sideBtn_practiceUI_001.png"; LABEL_21: std::string::assign(v237, v60); v61 = 0; LABEL_42: if ( (v237[0] & 1) != 0 ) v66 = v238; else v66 = (cocos2d::CCSprite *)((char *)v237 + 1); v187 = cocos2d::CCSprite::createWithSpriteFrameName(v66, (const char *)(LOBYTE(v237[0]) << 31)); v226 = 0; v225 = PauseLayer::onSideButtonPressed; v67 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::create( v187, 0, (int)this, (int)PauseLayer::onSideButtonPressed, 0); (*(void (__fastcall **)(cocos2d::CCObject *, int))(*(_DWORD *)v67 + 36))(v67, v56); (*(void (__fastcall **)(cocos2d::CCMenu *, cocos2d::CCObject *))(*(_DWORD *)v26 + 228))(v26, v67); v68 = *(_DWORD *)v67; if ( v61 ) { v69 = *(int (__fastcall **)(cocos2d::CCObject *, _DWORD *))(v68 + 92); cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v240, v26); v70 = (GameManager *)v69(v67, v240); v204 = v204 - 34.0; } else { v71 = *(int (__fastcall **)(cocos2d::CCObject *, _DWORD *))(v68 + 92); cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v240, v26); v70 = (GameManager *)v71(v67, v240); v202 = v202 - 34.0; } if ( v56 == 5 ) { *((_DWORD *)this + 125) = v187; PauseLayer::checkQuestsStatus(this); } else if ( v56 == 8 && *(float *)(*(_DWORD *)(GameManager::sharedState(v70) + 404) + 11148) != 1.0 ) { PauseLayer::onSideButtonPressed((cocos2d::CCSpriteFrameCache **)this, v67); } LABEL_53: ++v56; std::string::~string((int)v237); if ( v56 != 10 ) continue; v73 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"hideBtn_001.png", v72); (*(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v73 + 456))(v73, 0); v228 = 0; v227 = PauseLayer::onToggleUI; v74 = (cocos2d::CCMenu *)CCMenuItemSpriteExtra::create(v73, 0, (int)this, (int)PauseLayer::onToggleUI, 0); v76 = cocos2d::CCMenu::createWithItem(v74, v75); v77 = *(_DWORD *)this; *((_DWORD *)this + 124) = v76; v78 = (cocos2d::CCDirector *)(*(int (__fastcall **)(PauseLayer *, int, int))(v77 + 232))(this, v76, 100); v79 = *((_DWORD *)this + 124); v80 = *(void (__fastcall **)(int, _DWORD, _DWORD))(*(_DWORD *)v79 + 100); v81 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v78); v82 = COERCE_FLOAT(cocos2d::CCDirector::getScreenRight(v81)); v83 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)LODWORD(v82)); v84 = COERCE_FLOAT(cocos2d::CCDirector::getScreenTop(v83)); v80(v79, v82 - 17.0, v84 - 15.0); (*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 124) + 172))(*((_DWORD *)this + 124), 0); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v205, v198 * 0.5, (float)(v199 * 0.5) - 90.0); v230 = 0; v229 = PauseLayer::musicSliderChanged; v85 = (Slider *)Slider::create((int)this, (int)PauseLayer::musicSliderChanged, 0, 0.7); *((_DWORD *)this + 122) = v85; Slider::setBarVisibility(v85, 1); (*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 121) + 228))( *((_DWORD *)this + 121), *((_DWORD *)this + 122)); v188 = *((_DWORD *)this + 122); v86 = *(int (__fastcall **)(int, _DWORD *))(*(_DWORD *)v188 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v236, -100.0, 0.0); cocos2d::CCPoint::operator+(v240, v205, v236); v87 = (FMODAudioEngine *)v86(v188, v240); v88 = *((Slider **)this + 122); v89 = (FMODAudioEngine *)FMODAudioEngine::sharedEngine(v87); BackgroundMusicVolume = FMODAudioEngine::getBackgroundMusicVolume(v89); Slider::setValue(v88, *(float *)&BackgroundMusicVolume); v232 = 0; v231 = PauseLayer::sfxSliderChanged; v91 = (Slider *)Slider::create((int)this, (int)PauseLayer::sfxSliderChanged, 0, 0.7); *((_DWORD *)this + 123) = v91; Slider::setBarVisibility(v91, 1); (*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 121) + 228))( *((_DWORD *)this + 121), *((_DWORD *)this + 123)); v92 = *((_DWORD *)this + 123); v93 = *(int (__fastcall **)(int, _DWORD *))(*(_DWORD *)v92 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v236, 100.0, 0.0); cocos2d::CCPoint::operator+(v240, v205, v236); v94 = (FMODAudioEngine *)v93(v92, v240); v95 = *((Slider **)this + 123); v96 = (FMODAudioEngine *)FMODAudioEngine::sharedEngine(v94); EffectsVolume = FMODAudioEngine::getEffectsVolume(v96); v98 = (GameManager *)Slider::setValue(v95, *(float *)&EffectsVolume); *(_DWORD *)(GameManager::sharedState(v98) + 744) = (char *)this + 456; v100 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"gj_songIcon_001.png", v99); (*(void (__fastcall **)(int, int))(*(_DWORD *)v100 + 80))(v100, 1067030938); (*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 121) + 228))(*((_DWORD *)this + 121), v100); v101 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v100 + 92); v102 = (*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 122) + 96))(*((_DWORD *)this + 122)); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v236, -90.0, 0.0); cocos2d::CCPoint::operator+(v240, v102, v236); v101(v100, v240); v104 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_sfxIcon_001.png", v103); (*(void (__fastcall **)(int, int))(*(_DWORD *)v104 + 80))(v104, 1067030938); (*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 121) + 228))(*((_DWORD *)this + 121), v104); v105 = *(int (__fastcall **)(int, _DWORD *))(*(_DWORD *)v104 + 92); v106 = (*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 123) + 96))(*((_DWORD *)this + 123)); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v236, -90.0, 0.0); cocos2d::CCPoint::operator+(v240, v106, v236); v107 = (GameManager *)v105(v104, v240); v108 = COERCE_FLOAT(GameManager::sharedState(v107)); v109 = *(GJGameLevel **)(*(_DWORD *)(LODWORD(v108) + 404) + 1408); v192 = *((_DWORD *)v109 + 197); if ( v192 > 0 ) { v108 = COERCE_FLOAT(GameManager::sharedState((GameManager *)LODWORD(v108))); if ( !*(_BYTE *)(*(_DWORD *)(LODWORD(v108) + 404) + 10784) ) { v110 = *((_DWORD *)v109 + 238); if ( v110 != 2 ) { v111 = v110 != 1; v112 = 1; v189 = *((_DWORD *)v109 + 198) - *((_DWORD *)v109 + 199) == 1; v113 = (cocos2d::CCArray *)cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)v236, v198 * 0.5, (float)((float)(v199 * 0.5) - v23) + 23.0); v114 = (GameManager *)cocos2d::CCArray::create(v113); v195 = v114; do { v115 = GameManager::sharedState(v114); v116 = (GameStatsManager *)GJBaseGameLayer::didPickupItem(*(GJBaseGameLayer **)(v115 + 404), v112); v117 = v116; if ( v111 ) { v174 = (GameStatsManager *)GameStatsManager::sharedState(v116); CoinKey = (const char *)GJGameLevel::getCoinKey(v109, v112); if ( v189 ) hasUserCoin = GameStatsManager::hasUserCoin(v174, CoinKey); else hasUserCoin = GameStatsManager::hasPendingUserCoin(v174, CoinKey); } else { v118 = (GameStatsManager *)GameStatsManager::sharedState(v116); v119 = (const char *)GJGameLevel::getCoinKey(v109, v112); hasUserCoin = GameStatsManager::hasSecretCoin(v118, v119); } v122 = hasUserCoin; if ( hasUserCoin ) { v123 = "gjCoinUI_02_collected_001.png"; v124 = !v111; v125 = "gjCoinUI_01_collected_001.png"; } else { v124 = !v111; if ( v117 ) { v123 = "gjCoinUI_02_on_001.png"; v125 = "gjCoinUI_01_on_001.png"; } else { v123 = "gjCoinUI_02_off_001.png"; v125 = "gjCoinUI_01_off_001.png"; } } if ( v124 ) v126 = (cocos2d::CCSprite *)v125; else v126 = (cocos2d::CCSprite *)v123; v197 = v122; v127 = (cocos2d::CCObject *)cocos2d::CCSprite::createWithSpriteFrameName(v126, v121); (*(void (__fastcall **)(cocos2d::CCObject *, int))(*(_DWORD *)v127 + 80))(v127, 1066192077); (*(void (__fastcall **)(_DWORD, cocos2d::CCObject *, int))(**((_DWORD **)this + 121) + 232))( *((_DWORD *)this + 121), v127, 8); v114 = (GameManager *)cocos2d::CCArray::addObject(v195, v127); v128 = v197; if ( v111 && !v189 ) { v176 = *(int (__fastcall **)(cocos2d::CCObject *, _DWORD *))(*(_DWORD *)v127 + 480); LOWORD(v240[0]) = -20481; BYTE2(v240[0]) = 75; v114 = (GameManager *)v176(v127, v240); v128 = v197; } if ( !v117 ) { if ( v128 ) v177 = 125; else v177 = 191; v178 = 0.75; if ( v128 ) v178 = 0.5; if ( v111 && !v189 ) { v178 = v178 * 0.5; if ( v128 ) v177 = 150; } v179 = (unsigned __int8 *)(*(int (__fastcall **)(cocos2d::CCObject *))(*(_DWORD *)v127 + 472))(v127); v180 = *(void (__fastcall **)(cocos2d::CCObject *, _DWORD *))(*(_DWORD *)v127 + 480); v181 = v179[1]; v182 = v179[2]; v183 = *v179; BYTE1(v240[0]) = (unsigned int)(float)((float)v181 * v178); BYTE2(v240[0]) = (unsigned int)(float)((float)v182 * v178); LOBYTE(v240[0]) = (unsigned int)(float)((float)v183 * v178); v180(v127, v240); v114 = (GameManager *)(*(int (__fastcall **)(cocos2d::CCObject *, int))(*(_DWORD *)v127 + 456))( v127, v177); } ++v112; } while ( v112 <= v192 ); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v240, (const cocos2d::CCPoint *)v236); v108 = GameToolbox::alignItemsHorisontally(*(float *)&v195, 20.0, (int)v240, 0); } } } v129 = GameManager::sharedState((GameManager *)LODWORD(v108)); StartPosObjectsForCurrentMode = (cocos2d::CCObject *)GJBaseGameLayer::getStartPosObjectsForCurrentMode(*(GJBaseGameLayer **)(v129 + 404)); *((_DWORD *)this + 118) = StartPosObjectsForCurrentMode; cocos2d::CCObject::retain(StartPosObjectsForCurrentMode); if ( cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 118)) || (v131 = (PlatformToolbox *)GameManager::sharedState(nullptr), *(_DWORD *)(*(_DWORD *)(*((_DWORD *)v131 + 101) + 1408) + 952) == 2) ) { v132 = (GameManager *)cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)v206, v198 * 0.5, (float)((float)(v199 * 0.5) - v23) + 17.0); v133 = *(GameManager **)(*(_DWORD *)(GameManager::sharedState(v132) + 404) + 10720); if ( v133 ) { v135 = *((cocos2d::CCArray **)this + 118); v136 = GameManager::sharedState(v133); v133 = (GameManager *)(cocos2d::CCArray::indexOfObject( v135, *(cocos2d::CCObject **)(*(_DWORD *)(v136 + 404) + 10720)) + 1); } *((_DWORD *)this + 117) = v133; v137 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)"StartPos:", "goldFont.fnt", v134); (*(void (__fastcall **)(int, int))(*(_DWORD *)v137 + 80))(v137, 1056964608); (*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 121) + 228))(*((_DWORD *)this + 121), v137); v138 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v137 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v240, v206[0] - 130.0, v206[1] + 1.0); v138(v137, v240); v140 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)"StartPos", "bigFont.fnt", v139); *((_DWORD *)this + 116) = v140; (*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 121) + 228))(*((_DWORD *)this + 121), v140); (*(void (__fastcall **)(_DWORD, float *))(**((_DWORD **)this + 116) + 92))(*((_DWORD *)this + 116), v206); v142 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_arrow_01_001.png", v141); (*(void (__fastcall **)(int, int))(*(_DWORD *)v142 + 80))(v142, 1057803469); v234 = 0; v233 = PauseLayer::onChangeStartpos; v143 = CCMenuItemSpriteExtra::create(v142, 0, (int)this, (int)PauseLayer::onChangeStartpos, 0); (*(void (__fastcall **)(cocos2d::CCMenu *, int))(*(_DWORD *)v26 + 228))(v26, v143); v196 = *(char **)(*(_DWORD *)v143 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v235, -75.0, 0.0); cocos2d::CCPoint::operator+(v236, v206, v235); cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v240, v26); ((void (__fastcall *)(int, _DWORD *))v196)(v143, v240); CCMenuItemSpriteExtra::setSizeMult(v143, 1.6); (*(void (__fastcall **)(int, int))(*(_DWORD *)v143 + 36))(v143, -1); v145 = (cocos2d::CCSprite *)cocos2d::CCSprite::createWithSpriteFrameName( (cocos2d::CCSprite *)"GJ_arrow_01_001.png", v144); cocos2d::CCSprite::setFlipX(v145, 1); (*(void (__fastcall **)(cocos2d::CCSprite *, int))(*(_DWORD *)v145 + 80))(v145, 1057803469); v235[0] = PauseLayer::onChangeStartpos; v235[1] = 0; v146 = CCMenuItemSpriteExtra::create((int)v145, 0, (int)this, (int)PauseLayer::onChangeStartpos, 0); (*(void (__fastcall **)(cocos2d::CCMenu *, int))(*(_DWORD *)v26 + 228))(v26, v146); v193 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v146 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v210, 75.0, 0.0); cocos2d::CCPoint::operator+(v236, v206, v210); cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v240, v26); v193(v146, v240); CCMenuItemSpriteExtra::setSizeMult(v146, 1.6); (*(void (__fastcall **)(int, int))(*(_DWORD *)v146 + 36))(v146, 1); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v240, 110.0, 0.0); cocos2d::CCPoint::operator+(v207, v206, v240); v148 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_menuBtn_001.png", v147); (*(void (__fastcall **)(int, int))(*(_DWORD *)v148 + 80))(v148, 1053105848); v236[1] = 0; v236[0] = PauseLayer::onShowStartposBrowser; v190 = CCMenuItemSpriteExtra::create(v148, 0, (int)this, (int)PauseLayer::onShowStartposBrowser, 0); (*(void (__fastcall **)(cocos2d::CCMenu *, int))(*(_DWORD *)v26 + 228))(v26, v190); v194 = v190; v191 = *(int (__fastcall **)(int, _DWORD *))(*(_DWORD *)v190 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v209, 0.0, 0.0); cocos2d::CCPoint::operator+(v210, v207, v209); cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v240, v26); v149 = (GameManager *)v191(v194, v240); if ( *(_DWORD *)(*(_DWORD *)(*(_DWORD *)(GameManager::sharedState(v149) + 404) + 1408) + 952) == 2 ) { v151 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_plusBtn_001.png", v150); (*(void (__fastcall **)(int, int))(*(_DWORD *)v151 + 80))(v151, 1056796836); v240[1] = 0; v240[0] = PauseLayer::onCreateStartpos; v152 = CCMenuItemSpriteExtra::create(v151, 0, (int)this, (int)PauseLayer::onCreateStartpos, 0); (*(void (__fastcall **)(cocos2d::CCMenu *, int))(*(_DWORD *)v26 + 228))(v26, v152); v153 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v152 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v208, 30.0, 0.0); cocos2d::CCPoint::operator+(v209, v207, v208); cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v210, v26); v153(v152, v210); } v131 = (PlatformToolbox *)PauseLayer::onChangeStartpos((cocos2d::CCArray **)this, nullptr); *((_BYTE *)this + 476) = 0; } result = PlatformToolbox::isControllerConnected(v131); if ( result ) { v156 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"controllerBtn_Start_001.png", v155); (*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 121) + 228))(*((_DWORD *)this + 121), v156); v157 = (const cocos2d::CCPoint *)(*(int (__fastcall **)(int))(*(_DWORD *)v185 + 256))(v185); (*(void (__fastcall **)(int))(*(_DWORD *)v185 + 96))(v185); cocos2d::CCNode::convertToWorldSpace((cocos2d::CCNode *)v210, v157); cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v208, this); v158 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v156 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v209, 0.0, -37.0); cocos2d::CCPoint::operator+(v210, v208, v209); v158(v156, v210); v160 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"controllerBtn_B_001.png", v159); (*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 121) + 228))(*((_DWORD *)this + 121), v160); v161 = (const cocos2d::CCPoint *)(*(int (__fastcall **)(int))(*(_DWORD *)v186 + 256))(v186); (*(void (__fastcall **)(int))(*(_DWORD *)v186 + 96))(v186); cocos2d::CCNode::convertToWorldSpace((cocos2d::CCNode *)v209, v161); cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v210, this); cocos2d::CCPoint::operator=(v208, v210); v162 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v160 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v209, 0.0, -30.0); cocos2d::CCPoint::operator+(v210, v208, v209); v162(v160, v210); (*(void (__fastcall **)(int, int))(*(_DWORD *)v160 + 80))(v160, 1061997773); v164 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"controllerBtn_X_001.png", v163); (*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 121) + 228))(*((_DWORD *)this + 121), v164); v165 = (const cocos2d::CCPoint *)(*(int (__fastcall **)(int))(*(_DWORD *)v184 + 256))(v184); (*(void (__fastcall **)(int))(*(_DWORD *)v184 + 96))(v184); cocos2d::CCNode::convertToWorldSpace((cocos2d::CCNode *)v209, v165); cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v210, this); cocos2d::CCPoint::operator=(v208, v210); v166 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v164 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v209, 0.0, -30.0); cocos2d::CCPoint::operator+(v210, v208, v209); v166(v164, v210); return (*(int (__fastcall **)(int, int))(*(_DWORD *)v164 + 80))(v164, 1061997773); } return result; default: v60 = "sideBtn_options_001.png"; goto LABEL_21; } } }
GD Web Decomp Icon

GD Web Decomp

Raw Source