//
// LevelBrowserLayer::init from 0x4a6c74 to 0x4a818c (5400 bytes)
//
// 1 xrefs:
// > LevelBrowserLayer::create @ 0x4a82f2
//
// 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:56 +0000
//
int __fastcall LevelBrowserLayer::init(LevelBrowserLayer *this, GJSearchObject *a2)
{
int v3; // r3
int v4; // r0
cocos2d::CCTouchDispatcher *v5; // r0
int v6; // r2
char v7; // r2
GJSearchObject **v8; // r0
GameManager *v9; // r0
GJSearchObject **IsCurated; // r0
int v11; // r0
cocos2d::CCDirector *v12; // r0
const char *v13; // r1
int v14; // r0
int v15; // r7
void (__fastcall *v16)(int, _DWORD *); // r8
int v17; // r7
void (__fastcall *v18)(int, _DWORD *); // r8
const char *v19; // r1
int v20; // r7
int (__fastcall *v21)(int, _DWORD *); // r9
cocos2d::CCDirector *v22; // r0
void (__fastcall *v23)(int, _DWORD *); // r9
cocos2d::CCDirector *v24; // r0
float v25; // s17
cocos2d::CCDirector *v26; // r0
float v27; // r0
const char *v28; // r1
cocos2d::CCSprite *v29; // r7
int (__fastcall *v30)(cocos2d::CCSprite *, _DWORD *); // r8
cocos2d::CCDirector *v31; // r0
void (__fastcall *v32)(cocos2d::CCSprite *, _DWORD *); // r8
cocos2d::CCDirector *v33; // r0
float v34; // s17
cocos2d::CCDirector *v35; // r0
float v36; // r0
const char *v37; // r1
cocos2d::CCSprite *v38; // r0
int v39; // r0
int v40; // r7
int v41; // r7
cocos2d::CCDirector *v42; // r0
int (__fastcall *v43)(int, _DWORD *); // r8
cocos2d::CCDirector *v44; // r0
float v45; // r0
float v46; // s16
cocos2d::CCDirector *v47; // r0
float v48; // r0
PlatformToolbox *v49; // r0
const cocos2d::CCPoint *v50; // r11
float v51; // s16
int v52; // r1
const char *v53; // r1
char *v54; // r0
int v55; // r0
int v56; // r0
cocos2d::CCDirector *v57; // r0
int v58; // r8
void (__fastcall *v59)(int, _DWORD *); // r9
cocos2d::CCDirector *v60; // r0
float v61; // r0
const char *v62; // r1
char *v63; // r0
cocos2d::CCSprite *v64; // r0
int v65; // r6
int v66; // r0
cocos2d::CCDirector *v67; // r0
int v68; // r8
void (__fastcall *v69)(int, _DWORD *); // r9
cocos2d::CCDirector *v70; // r0
float v71; // r0
const char *v72; // r1
int v73; // r6
const char *v74; // r2
int v75; // r0
int v76; // r9
void (__fastcall *v77)(int, _DWORD *); // r10
float v78; // s17
int v79; // r0
int v80; // r0
cocos2d::CCDirector *v81; // r0
int v82; // r6
void (__fastcall *v83)(int, _DWORD *); // r8
cocos2d::CCDirector *v84; // r0
float v85; // r0
float v86; // s18
LoadingCircle *v87; // r0
cocos2d::CCLayerColor *v88; // r0
const char *v89; // r2
int v90; // r0
int v91; // r3
cocos2d::CCDirector *v92; // r0
int v93; // r6
void (__fastcall *v94)(int, _DWORD *); // r8
cocos2d::CCDirector *v95; // r0
float v96; // r0
float v97; // s16
cocos2d::CCDirector *v98; // r0
float v99; // r0
int v100; // r6
void (__fastcall *v101)(int, _DWORD *); // r8
int v102; // r6
void (__fastcall *v103)(int, _DWORD *); // r8
int v104; // r1
cocos2d::CCMenu *isSafeType; // r0
const char *v106; // r1
int v107; // r7
int (__fastcall *v108)(int, _DWORD *); // r8
float v109; // s15
float v110; // s14
int v111; // r2
int v112; // r3
char *v113; // r0
int v114; // r3
int v115; // r7
GJSelectionStrip *v116; // r0
int v117; // r0
int v118; // r2
int v119; // r0
int v120; // r0
GJSelectionStrip **updated; // r0
int v122; // r0
int v123; // r3
int v124; // r3
_BOOL4 v125; // r7
const cocos2d::CCPoint *v126; // r6
const char *v127; // r1
int v128; // r0
int v129; // r8
int *v130; // kr04_4
int v131; // r3
int v132; // r9
cocos2d::CCDirector *v133; // r0
int (__fastcall *v134)(const cocos2d::CCPoint *, _DWORD *); // r10
float v135; // s17
cocos2d::CCDirector *v136; // r0
float v137; // r0
float v138; // s19
cocos2d::CCDirector *v139; // r0
float v140; // r0
GameManager *v141; // r0
GameManager *v142; // r0
const char *v143; // r1
char *v144; // r0
int v145; // r8
int v146; // r8
char *v147; // r0
int v148; // r0
int *v149; // kr00_4
int v150; // r3
int v151; // r7
cocos2d::CCDirector *v152; // r0
int (__fastcall *v153)(int, _DWORD *); // r10
cocos2d::CCDirector *v154; // r0
float v155; // r0
int v156; // r10
int v157; // r6
const char *v158; // r1
int v159; // r7
int v160; // r0
cocos2d::CCDirector *v161; // r0
int (__fastcall *v162)(int, _DWORD *); // r8
float v163; // s17
cocos2d::CCDirector *v164; // r0
float v165; // r0
float v166; // s19
cocos2d::CCDirector *v167; // r0
float v168; // r0
int v169; // r6
const char *v170; // r1
int v171; // r0
int v172; // r7
cocos2d::CCDirector *v173; // r0
void (__fastcall *v174)(int, _DWORD *); // r8
cocos2d::CCDirector *v175; // r0
float v176; // r0
float v177; // s17
cocos2d::CCDirector *v178; // r0
float v179; // r0
int v180; // r1
int v181; // r1
cocos2d::CCMenuItem *v182; // r2
cocos2d::CCMenu *isVaultType; // r0
int v184; // r3
int v185; // r7
cocos2d::CCDirector *v186; // r0
void (__fastcall *v187)(int, _DWORD *); // r8
cocos2d::CCDirector *v188; // r0
float v189; // r0
int i; // r6
char *v191; // r0
int v192; // r0
int v193; // r8
const cocos2d::CCPoint *v194; // r6
const char *v195; // r1
int v196; // r9
int v197; // r7
int (__fastcall *v198)(const cocos2d::CCPoint *, _DWORD *); // r10
cocos2d::CCDirector *v199; // r0
float v200; // s17
int (__fastcall *v201)(const cocos2d::CCPoint *, _DWORD *); // r9
cocos2d::CCDirector *v202; // r0
float v203; // r0
float v204; // s19
cocos2d::CCDirector *v205; // r0
float v206; // r0
GameManager *v207; // r0
const char *v208; // r1
const cocos2d::CCPoint *v209; // r7
const char *v210; // r1
cocos2d::CCSprite *v211; // r8
void (__fastcall *v212)(cocos2d::CCSprite *, _DWORD *); // r10
int v213; // r0
int v214; // r7
void (__fastcall *v215)(int, _DWORD *); // r9
int v216; // r10
const char *v217; // r1
int v218; // r0
int v219; // r7
void (__fastcall *v220)(int, _DWORD *); // r9
const char *v221; // r1
int v222; // r0
int v223; // r0
int v224; // r5
void (__fastcall *v225)(int, _BYTE *); // r9
int v226; // r7
int v227; // r7
const char *v228; // r2
int v229; // r0
int v230; // r8
void (__fastcall *v231)(int, _DWORD *); // r9
float v232; // s17
int v233; // r0
int v234; // r0
int v235; // r7
void (__fastcall *v236)(int, _DWORD *); // r9
int v237; // r10
cocos2d::CCLayer *v238; // r1
GJSearchObject *v240; // r0
GameManager *v241; // r0
GameManager *v242; // r0
const char *v243; // r1
GJAccountManager *v244; // r0
int v245; // r0
int v246; // r8
cocos2d::CCDirector *v247; // r0
cocos2d::CCDirector *v248; // r0
float v249; // r0
float v250; // s19
cocos2d::CCDirector *v251; // r0
float v252; // r0
GameManager *v253; // r0
const char *v254; // r1
int v255; // r0
int v256; // r8
cocos2d::CCDirector *v257; // r0
cocos2d::CCDirector *v258; // r0
float v259; // r0
float v260; // s20
cocos2d::CCDirector *v261; // r0
float v262; // r0
const char *v263; // r1
int v264; // r0
int v265; // r8
cocos2d::CCDirector *v266; // r0
cocos2d::CCDirector *v267; // r0
float v268; // r0
float v269; // s19
cocos2d::CCDirector *v270; // r0
float v271; // r0
cocos2d::CCNotificationCenter *v272; // r0
int v273; // r0
char *v274; // r0
int v275; // r8
int v276; // r8
void (__fastcall *v277)(int, _DWORD *); // r9
int v278; // r10
GJSearchObject *v279; // [sp+14h] [bp-128h]
cocos2d::CCMenu *isControllerConnected; // [sp+18h] [bp-124h]
int v281; // [sp+1Ch] [bp-120h]
cocos2d::CCLayer *v282; // [sp+20h] [bp-11Ch]
int (__fastcall *v283)(int, _DWORD *); // [sp+24h] [bp-118h]
char *v284; // [sp+24h] [bp-118h]
int (__fastcall *v285)(int, _DWORD *); // [sp+24h] [bp-118h]
void (__fastcall *v286)(int, _DWORD *); // [sp+24h] [bp-118h]
int (__fastcall *v287)(int, _DWORD *); // [sp+24h] [bp-118h]
int v288; // [sp+28h] [bp-114h]
void (__fastcall *v289)(int, _DWORD *); // [sp+28h] [bp-114h]
int v290; // [sp+40h] [bp-FCh]
float v291; // [sp+44h] [bp-F8h] BYREF
float v292; // [sp+48h] [bp-F4h]
_BYTE v293[8]; // [sp+4Ch] [bp-F0h] BYREF
_BYTE v294[8]; // [sp+54h] [bp-E8h] BYREF
int v295; // [sp+5Ch] [bp-E0h]
int v296; // [sp+60h] [bp-DCh]
_DWORD (*v297)(LevelBrowserLayer *__hidden, cocos2d::CCObject *); // [sp+64h] [bp-D8h]
int v298; // [sp+68h] [bp-D4h]
_DWORD (*v299)(LevelBrowserLayer *__hidden, cocos2d::CCObject *); // [sp+6Ch] [bp-D0h]
int v300; // [sp+70h] [bp-CCh]
int (__fastcall *v301)(int, cocos2d::CCObject *); // [sp+74h] [bp-C8h]
int v302; // [sp+78h] [bp-C4h]
CCMenuItemToggler *(__fastcall *v303)(LevelBrowserLayer *, cocos2d::CCObject *); // [sp+7Ch] [bp-C0h]
int v304; // [sp+80h] [bp-BCh]
cocos2d::CCArray *(__fastcall *v305)(cocos2d::CCArray *, cocos2d::CCObject *); // [sp+84h] [bp-B8h]
int v306; // [sp+88h] [bp-B4h]
int (__fastcall *v307)(LevelBrowserLayer *, cocos2d::CCObject *); // [sp+8Ch] [bp-B0h]
int v308; // [sp+90h] [bp-ACh]
GJSelectionStrip **(__fastcall *v309)(GJSelectionStrip **, cocos2d::CCObject *); // [sp+94h] [bp-A8h]
int v310; // [sp+98h] [bp-A4h]
int (__fastcall *v311)(LevelBrowserLayer *, cocos2d::CCObject *); // [sp+9Ch] [bp-A0h]
int v312; // [sp+A0h] [bp-9Ch]
_DWORD (*v313)(LevelBrowserLayer *__hidden, cocos2d::CCObject *); // [sp+A4h] [bp-98h]
int v314; // [sp+A8h] [bp-94h]
_DWORD (*v315)(LevelBrowserLayer *__hidden, cocos2d::CCObject *); // [sp+ACh] [bp-90h]
int v316; // [sp+B0h] [bp-8Ch]
int (__fastcall *v317)(LevelBrowserLayer *, cocos2d::CCObject *); // [sp+B4h] [bp-88h]
int v318; // [sp+B8h] [bp-84h]
_DWORD (*v319)(LevelBrowserLayer *__hidden, cocos2d::CCObject *); // [sp+BCh] [bp-80h]
int v320; // [sp+C0h] [bp-7Ch]
_DWORD (*v321)(LevelBrowserLayer *__hidden, cocos2d::CCObject *); // [sp+C4h] [bp-78h]
int v322; // [sp+C8h] [bp-74h]
int v323; // [sp+CCh] [bp-70h]
int v324; // [sp+D0h] [bp-6Ch]
_DWORD (*v325)(LevelBrowserLayer *__hidden, cocos2d::CCObject *); // [sp+D4h] [bp-68h]
int v326; // [sp+D8h] [bp-64h]
int v327; // [sp+DCh] [bp-60h]
int v328; // [sp+E0h] [bp-5Ch]
_DWORD (*v329)(LevelBrowserLayer *__hidden, cocos2d::CCObject *); // [sp+E4h] [bp-58h]
int v330; // [sp+E8h] [bp-54h]
int (__fastcall *v331)(LevelBrowserLayer *, cocos2d::CCObject *); // [sp+ECh] [bp-50h]
int v332; // [sp+F0h] [bp-4Ch]
_DWORD (*v333)(LevelBrowserLayer *__hidden, cocos2d::CCObject *); // [sp+F4h] [bp-48h]
int v334; // [sp+F8h] [bp-44h]
int (__fastcall *v335)(int, cocos2d::CCObject *, int, int); // [sp+FCh] [bp-40h]
int v336; // [sp+100h] [bp-3Ch]
_DWORD v337[2]; // [sp+104h] [bp-38h] BYREF
_DWORD v338[2]; // [sp+10Ch] [bp-30h] BYREF
_DWORD v339[2]; // [sp+114h] [bp-28h] BYREF
int v340[2]; // [sp+11Ch] [bp-20h] BYREF
cocos2d::CCSprite *v341; // [sp+124h] [bp-18h]
int v342[3]; // [sp+128h] [bp-14h] BYREF
v279 = a2;
if ( a2 )
v3 = *((unsigned __int8 *)a2 + 342);
else
v3 = 0;
*((_BYTE *)this + 548) = v3;
if ( v3 )
{
v4 = cocos2d::CCDirector::sharedDirector(this);
v5 = (cocos2d::CCTouchDispatcher *)(*(int (__fastcall **)(int))(*(_DWORD *)v4 + 80))(v4);
cocos2d::CCTouchDispatcher::registerForcePrio(v5, this, 2, 0);
}
v6 = *((unsigned __int8 *)this + 548);
LOBYTE(v339[0]) = 0;
if ( v6 )
v7 = -106;
else
v7 = 0;
*(_WORD *)((char *)v339 + 1) = 0;
HIBYTE(v339[0]) = v7;
v281 = cocos2d::CCLayerColor::initWithColor(this, v339);
if ( v281 )
{
v8 = LevelBrowserLayer::setSearchObject((GJSearchObject **)this, v279);
v9 = (GameManager *)GameManager::sharedState((GameManager *)v8);
IsCurated = (GJSearchObject **)GameManager::onlyCuratedLevels(v9);
if ( IsCurated )
{
if ( *((_DWORD *)this + 125) )
{
v11 = GameLevelManager::sharedState((GameLevelManager *)IsCurated);
IsCurated = (GJSearchObject **)GameLevelManager::searchTypeIsCurated(
v11,
*(_DWORD *)(*((_DWORD *)this + 125) + 264));
if ( !IsCurated )
{
v240 = (GJSearchObject *)GJSearchObject::create(6);
IsCurated = LevelBrowserLayer::setSearchObject((GJSearchObject **)this, v240);
v279 = *((GJSearchObject **)this + 125);
}
}
}
if ( v279 && !*((_BYTE *)this + 548) )
*(_DWORD *)(GameLevelManager::sharedState((GameLevelManager *)IsCurated) + 948) = *((_DWORD *)v279 + 66);
if ( *((_BYTE *)this + 548) )
(*(void (__fastcall **)(LevelBrowserLayer *, int))(*(_DWORD *)this + 500))(this, 1);
(*(void (__fastcall **)(LevelBrowserLayer *, int))(*(_DWORD *)this + 536))(this, 1);
v12 = (cocos2d::CCDirector *)(*(int (__fastcall **)(LevelBrowserLayer *, int))(*(_DWORD *)this + 544))(this, 1);
cocos2d::CCDirector::sharedDirector(v12);
cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v291);
if ( !*((_BYTE *)this + 548) )
{
v14 = cocos2d::CCSprite::create((cocos2d::CCSprite *)"GJ_gradientBG.png", v13);
*((_DWORD *)this + 146) = v14;
v15 = v14;
v16 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v14 + 148);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v339, 0.0, 0.0);
v16(v15, v339);
(*(void (__fastcall **)(LevelBrowserLayer *, _DWORD, int))(*(_DWORD *)this + 232))(
this,
*((_DWORD *)this + 146),
-2);
(*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 146) + 64))(
*((_DWORD *)this + 146),
(float)(v291 + 10.0) / *(float *)(*((_DWORD *)this + 146) + 344));
(*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 146) + 72))(
*((_DWORD *)this + 146),
(float)(v292 + 10.0) / *(float *)(*((_DWORD *)this + 146) + 348));
v17 = *((_DWORD *)this + 146);
v18 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v17 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v339, -5.0, -5.0);
v18(v17, v339);
LevelBrowserLayer::updateBackgroundColor((int)this);
v20 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_sideArt_001.png", v19);
v21 = *(int (__fastcall **)(int, _DWORD *))(*(_DWORD *)v20 + 148);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v339, 0.0, 0.0);
v22 = (cocos2d::CCDirector *)v21(v20, v339);
v23 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v20 + 92);
v24 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v22);
v25 = COERCE_FLOAT(cocos2d::CCDirector::getScreenLeft(v24));
v26 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)LODWORD(v25));
v27 = COERCE_FLOAT(cocos2d::CCDirector::getScreenBottom(v26));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v339, v25 - 1.0, v27 - 1.0);
v23(v20, v339);
(*(void (__fastcall **)(LevelBrowserLayer *, int, int))(*(_DWORD *)this + 232))(this, v20, 1);
v29 = (cocos2d::CCSprite *)cocos2d::CCSprite::createWithSpriteFrameName(
(cocos2d::CCSprite *)"GJ_sideArt_001.png",
v28);
v30 = *(int (__fastcall **)(cocos2d::CCSprite *, _DWORD *))(*(_DWORD *)v29 + 148);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v339, 1.0, 0.0);
v31 = (cocos2d::CCDirector *)v30(v29, v339);
v32 = *(void (__fastcall **)(cocos2d::CCSprite *, _DWORD *))(*(_DWORD *)v29 + 92);
v33 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v31);
v34 = COERCE_FLOAT(cocos2d::CCDirector::getScreenRight(v33));
v35 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)LODWORD(v34));
v36 = COERCE_FLOAT(cocos2d::CCDirector::getScreenBottom(v35));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v339, v34 + 1.0, v36 - 1.0);
v32(v29, v339);
cocos2d::CCSprite::setFlipX(v29, 1);
(*(void (__fastcall **)(LevelBrowserLayer *, cocos2d::CCSprite *, int))(*(_DWORD *)this + 232))(this, v29, 1);
}
if ( *((_BYTE *)this + 548) )
v37 = "GJ_closeBtn_001.png";
else
v37 = "GJ_arrow_01_001.png";
v340[0] = 0;
v340[1] = 0;
v341 = nullptr;
std::string::__init(v340, v37, 0x13u);
if ( (v340[0] & 1) != 0 )
v38 = v341;
else
v38 = (cocos2d::CCSprite *)((char *)v340 + 1);
v39 = cocos2d::CCSprite::createWithSpriteFrameName(v38, (const char *)(LOBYTE(v340[0]) << 31));
v40 = v39;
if ( *((_BYTE *)this + 548) )
(*(void (__fastcall **)(int, int))(*(_DWORD *)v39 + 80))(v39, 1063675494);
v295 = 664;
v296 = 1;
v282 = (cocos2d::CCLayer *)CCMenuItemSpriteExtra::create(v40, 0, (int)this, 664, 1);
CCMenuItemSpriteExtra::setSizeMult((int)v282, 1.6);
v41 = cocos2d::CCMenu::create(v282, nullptr);
v42 = (cocos2d::CCDirector *)(*(int (__fastcall **)(LevelBrowserLayer *, int, int))(*(_DWORD *)this + 232))(
this,
v41,
1);
v43 = *(int (__fastcall **)(int, _DWORD *))(*(_DWORD *)v41 + 92);
v44 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v42);
v45 = COERCE_FLOAT(cocos2d::CCDirector::getScreenLeft(v44));
v46 = v45 + 24.0;
v47 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)LODWORD(v45));
v48 = COERCE_FLOAT(cocos2d::CCDirector::getScreenTop(v47));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v339, v46, v48 - 23.0);
v49 = (PlatformToolbox *)v43(v41, v339);
isControllerConnected = (cocos2d::CCMenu *)PlatformToolbox::isControllerConnected(v49);
v50 = (const cocos2d::CCPoint *)cocos2d::CCMenu::create(isControllerConnected);
(*(void (__fastcall **)(LevelBrowserLayer *, const cocos2d::CCPoint *, int))(*(_DWORD *)this + 232))(this, v50, 10);
v51 = v292 * 0.5;
if ( LevelBrowserLayer::isSafeType(this, v52) )
v51 = v51 - 30.0;
if ( isControllerConnected )
v54 = "controllerBtn_DPad_Left_001.png";
else
v54 = "GJ_arrow_03_001.png";
v55 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)v54, v53);
v298 = 0;
v297 = LevelBrowserLayer::onPrevPage;
v56 = CCMenuItemSpriteExtra::create(v55, 0, (int)this, (int)LevelBrowserLayer::onPrevPage, 0);
*((_DWORD *)this + 120) = v56;
CCMenuItemSpriteExtra::setSizeMult(v56, 2.0);
v57 = (cocos2d::CCDirector *)(*(int (__fastcall **)(const cocos2d::CCPoint *, _DWORD))(*(_DWORD *)v50 + 228))(
v50,
*((_DWORD *)this + 120));
v58 = *((_DWORD *)this + 120);
v59 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v58 + 92);
v60 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v57);
v61 = COERCE_FLOAT(cocos2d::CCDirector::getScreenLeft(v60));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v338, v61 + 24.0, v51);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v339, v50);
v59(v58, v339);
if ( isControllerConnected )
v63 = "controllerBtn_DPad_Right_001.png";
else
v63 = "GJ_arrow_03_001.png";
v64 = (cocos2d::CCSprite *)cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)v63, v62);
v65 = (int)v64;
if ( !isControllerConnected )
cocos2d::CCSprite::setFlipX(v64, 1);
v300 = 0;
v299 = LevelBrowserLayer::onNextPage;
v66 = CCMenuItemSpriteExtra::create(v65, 0, (int)this, (int)LevelBrowserLayer::onNextPage, 0);
*((_DWORD *)this + 119) = v66;
CCMenuItemSpriteExtra::setSizeMult(v66, 2.0);
v67 = (cocos2d::CCDirector *)(*(int (__fastcall **)(const cocos2d::CCPoint *, _DWORD))(*(_DWORD *)v50 + 228))(
v50,
*((_DWORD *)this + 119));
v68 = *((_DWORD *)this + 119);
v69 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v68 + 92);
v70 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v67);
v71 = COERCE_FLOAT(cocos2d::CCDirector::getScreenRight(v70));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v338, v71 - 24.0, v51);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v339, v50);
v69(v68, v339);
v73 = cocos2d::CCSprite::create((cocos2d::CCSprite *)"GJ_button_02.png", v72);
v75 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)a1i2r3e45s789g, "bigFont.fnt", v74);
*((_DWORD *)this + 127) = v75;
(*(void (__fastcall **)(int, int, int))(*(_DWORD *)v73 + 232))(v73, v75, 1);
v76 = *((_DWORD *)this + 127);
v77 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v76 + 92);
v78 = *(float *)(*(int (__fastcall **)(int))(*(_DWORD *)v73 + 164))(v73);
v79 = (*(int (__fastcall **)(int))(*(_DWORD *)v73 + 164))(v73);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v339, v78 * 0.5, (float)(*(float *)(v79 + 4) * 0.5) + 1.0);
v77(v76, v339);
LevelBrowserLayer::updatePageLabel(this);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v73 + 80))(v73, 1060320051);
v302 = 0;
v301 = LevelBrowserLayer::onGoToPage;
v80 = CCMenuItemSpriteExtra::create(v73, 0, (int)this, (int)LevelBrowserLayer::onGoToPage, 0);
*((_DWORD *)this + 128) = v80;
CCMenuItemSpriteExtra::setSizeMult(v80, 1.2);
v81 = (cocos2d::CCDirector *)(*(int (__fastcall **)(const cocos2d::CCPoint *, _DWORD))(*(_DWORD *)v50 + 228))(
v50,
*((_DWORD *)this + 128));
v82 = *((_DWORD *)this + 128);
v83 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v82 + 92);
v84 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v81);
v85 = COERCE_FLOAT(cocos2d::CCDirector::getScreenRight(v84));
v86 = v51 + 122.0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v338, (float)(v85 - 24.0) + 1.0, v51 + 122.0);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v339, v50);
v83(v82, v339);
(*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 120) + 172))(*((_DWORD *)this + 120), 0);
(*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 119) + 172))(*((_DWORD *)this + 119), 0);
v87 = (LoadingCircle *)(*(int (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 128) + 172))(
*((_DWORD *)this + 128),
0);
v88 = LoadingCircle::create(v87);
*((_DWORD *)this + 135) = v88;
*((_DWORD *)v88 + 111) = this;
*(_BYTE *)(*((_DWORD *)this + 135) + 448) = 0;
cocos2d::CCObject::retain(*((cocos2d::CCObject **)this + 135));
LoadingCircle::show(*((cocos2d::CCNode ***)this + 135));
(*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 135) + 172))(*((_DWORD *)this + 135), 0);
v90 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)" ", "goldFont.fnt", v89);
v91 = *(_DWORD *)this;
*((_DWORD *)this + 126) = v90;
v92 = (cocos2d::CCDirector *)(*(int (__fastcall **)(LevelBrowserLayer *, int))(v91 + 228))(this, v90);
v93 = *((_DWORD *)this + 126);
v94 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v93 + 92);
v95 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v92);
v96 = COERCE_FLOAT(cocos2d::CCDirector::getScreenRight(v95));
v97 = v96 - 7.0;
v98 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)LODWORD(v96));
v99 = COERCE_FLOAT(cocos2d::CCDirector::getScreenTop(v98));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v339, v97, v99 - 3.0);
v94(v93, v339);
v100 = *((_DWORD *)this + 126);
v101 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v100 + 148);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v339, 1.0, 1.0);
v101(v100, v339);
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 126) + 80))(*((_DWORD *)this + 126), 1058642330);
memset(v342, 0, sizeof(v342));
std::string::__init(v342, "No Internet connection!", 0x1Fu);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v339, 0.5, 1.0);
*((_DWORD *)this + 117) = TextArea::create(
(int)v342,
"bigFont.fnt",
COERCE_INT(1.0),
1142292480,
(const cocos2d::CCPoint *)v339,
1101004800,
0,
0);
std::string::~string((int)v342);
v102 = *((_DWORD *)this + 117);
v103 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v102 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v339, v291 * 0.5, (float)(v292 * 0.5) + 10.0);
v103(v102, v339);
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 117) + 80))(*((_DWORD *)this + 117), 1058642330);
(*(void (__fastcall **)(LevelBrowserLayer *, _DWORD, int))(*(_DWORD *)this + 232))(this, *((_DWORD *)this + 117), 2);
(*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 117) + 172))(*((_DWORD *)this + 117), 0);
isSafeType = (cocos2d::CCMenu *)LevelBrowserLayer::isSafeType(this, v104);
if ( isSafeType )
{
v107 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"theSafeLabel_001.png", v106);
(*(void (__fastcall **)(LevelBrowserLayer *, int, int))(*(_DWORD *)this + 232))(this, v107, 2);
v108 = *(int (__fastcall **)(int, _DWORD *))(*(_DWORD *)v107 + 92);
v109 = (float)(v292 * 0.5) + 110.0;
v110 = (float)(v291 * 0.5) + 13.0;
LABEL_51:
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v339, v110, v109 + 24.0);
isSafeType = (cocos2d::CCMenu *)v108(v107, v339);
goto LABEL_52;
}
v111 = *((_DWORD *)this + 125);
if ( v111 )
{
v112 = *(_DWORD *)(v111 + 264);
switch ( v112 )
{
case 6:
if ( *(_DWORD *)(v111 + 344) == 1 )
{
v113 = "topListsLabel_001.png";
LABEL_50:
v107 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)v113, v106);
(*(void (__fastcall **)(LevelBrowserLayer *, int, int))(*(_DWORD *)this + 232))(this, v107, 2);
v108 = *(int (__fastcall **)(int, _DWORD *))(*(_DWORD *)v107 + 92);
v109 = (float)(v292 * 0.5) + 110.0;
v110 = v291 * 0.5;
goto LABEL_51;
}
LABEL_49:
v113 = "featuredLabel_001.png";
goto LABEL_50;
case 17:
goto LABEL_49;
case 28:
v113 = "weeklyLevelsLabel_001.png";
goto LABEL_50;
case 29:
v113 = "bonusLevelsLabel_001.png";
goto LABEL_50;
}
}
LABEL_52:
v114 = *((_DWORD *)this + 125);
if ( v114 && (unsigned int)(*(_DWORD *)(v114 + 264) - 98) <= 2 && !*(_BYTE *)(v114 + 342) )
{
v115 = cocos2d::CCMenu::create(isSafeType);
(*(void (__fastcall **)(LevelBrowserLayer *, int, int))(*(_DWORD *)this + 232))(this, v115, 2);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v338, (float)(v291 * 0.5) - 150.0, (float)(v292 * 0.5) - 121.5);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v339, (const cocos2d::CCPoint *)v338);
v303 = LevelBrowserLayer::onToggleAllObjects;
v304 = 0;
v116 = (GJSelectionStrip *)GJSelectionStrip::create(
v115,
this,
v339,
1060571709,
this,
LevelBrowserLayer::onToggleAllObjects,
0);
*((_DWORD *)this + 131) = v116;
GJSelectionStrip::addCountLabel(v116, 27.0, 10);
if ( *(_DWORD *)(*((_DWORD *)this + 125) + 264) == 98 )
{
v117 = *((_DWORD *)this + 131);
v306 = 0;
v305 = LevelBrowserLayer::onExportSelected;
GJSelectionStrip::addAction(
v117,
(int)"threadBtn_export_001.png",
1112801280,
(int)LevelBrowserLayer::onExportSelected,
0,
1.4);
v118 = 1117650944;
}
else
{
v118 = 1112801280;
}
v308 = 0;
v119 = *((_DWORD *)this + 131);
v307 = LevelBrowserLayer::onProcessSelected;
v120 = GJSelectionStrip::addAction(
v119,
(int)"threadBtn_delete_001.png",
v118,
(int)LevelBrowserLayer::onProcessSelected,
0,
1.2);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v120 + 36))(v120, 5);
updated = LevelBrowserLayer::updateSelectUI((GJSelectionStrip **)this);
v122 = cocos2d::CCNotificationCenter::sharedNotificationCenter((cocos2d::CCNotificationCenter *)updated);
v309 = LevelBrowserLayer::onSelectionChanged;
v310 = 0;
isSafeType = (cocos2d::CCMenu *)cocos2d::CCNotificationCenter::addObserver(
v122,
(int)this,
(int)LevelBrowserLayer::onSelectionChanged,
0,
"LevelSelectionChangedNotification",
0);
}
v123 = *((_DWORD *)this + 125);
if ( v123 )
{
v124 = *(_DWORD *)(v123 + 264);
if ( v124 == 98 || (unsigned int)(v124 - 101) <= 1 )
{
v194 = (const cocos2d::CCPoint *)cocos2d::CCMenu::create(isSafeType);
(*(void (__fastcall **)(LevelBrowserLayer *, const cocos2d::CCPoint *, int))(*(_DWORD *)this + 232))(
this,
v194,
2);
v196 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_newBtn_001.png", v195);
v312 = 0;
v311 = LevelBrowserLayer::onNew;
v197 = CCMenuItemSpriteExtra::create(v196, 0, (int)this, (int)LevelBrowserLayer::onNew, 0);
(*(void (__fastcall **)(const cocos2d::CCPoint *, int))(*(_DWORD *)v194 + 228))(v194, v197);
v198 = *(int (__fastcall **)(const cocos2d::CCPoint *, _DWORD *))(*(_DWORD *)v194 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v339, v291 * 0.5, (float)((float)(v292 - 220.0) * 0.5) - 4.0);
v199 = (cocos2d::CCDirector *)v198(v194, v339);
v200 = (float)(*(float *)(v196 + 344) * 0.5) + 4.0;
v201 = *(int (__fastcall **)(const cocos2d::CCPoint *, _DWORD *))(*(_DWORD *)v194 + 92);
v202 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v199);
v203 = COERCE_FLOAT(cocos2d::CCDirector::getScreenRight(v202));
v204 = v203 - v200;
v205 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)LODWORD(v203));
v206 = COERCE_FLOAT(cocos2d::CCDirector::getScreenBottom(v205));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v339, v204, v206 + v200);
v207 = (GameManager *)v201(v194, v339);
if ( !*((_BYTE *)this + 548) )
{
v241 = (GameManager *)GameManager::sharedState(v207);
v242 = (GameManager *)GameManager::onlyCuratedLevels(v241);
if ( !v242 )
{
v244 = (GJAccountManager *)GameManager::sharedState(nullptr);
if ( *((_DWORD *)v244 + 116) != *((_DWORD *)v244 + 117)
|| (v242 = (GameManager *)GJAccountManager::sharedState(v244),
*((_DWORD *)v242 + 70) != *((_DWORD *)v242 + 71)) )
{
v245 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_myServerBtn_001.png", v243);
v314 = 0;
v313 = LevelBrowserLayer::onMyOnlineLevels;
v246 = CCMenuItemSpriteExtra::create(v245, 0, (int)this, (int)LevelBrowserLayer::onMyOnlineLevels, 0);
v247 = (cocos2d::CCDirector *)(*(int (__fastcall **)(const cocos2d::CCPoint *, int))(*(_DWORD *)v194 + 228))(
v194,
v246);
v285 = *(int (__fastcall **)(int, _DWORD *))(*(_DWORD *)v246 + 92);
v248 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v247);
v249 = COERCE_FLOAT(cocos2d::CCDirector::getScreenLeft(v248));
v250 = v249 + v200;
v251 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)LODWORD(v249));
v252 = COERCE_FLOAT(cocos2d::CCDirector::getScreenBottom(v251));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v338, v250, v252 + v200);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v339, v194);
v242 = (GameManager *)v285(v246, v339);
}
}
if ( *(_DWORD *)(*((_DWORD *)this + 125) + 264) == 98 )
{
v255 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_importBtn_001.png", v243);
v316 = 0;
v315 = LevelBrowserLayer::onImportLevels;
v256 = CCMenuItemSpriteExtra::create(v255, 0, (int)this, (int)LevelBrowserLayer::onImportLevels, 0);
v257 = (cocos2d::CCDirector *)(*(int (__fastcall **)(const cocos2d::CCPoint *, int))(*(_DWORD *)v194 + 228))(
v194,
v256);
v286 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v256 + 92);
v258 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v257);
v259 = COERCE_FLOAT(cocos2d::CCDirector::getScreenLeft(v258));
v260 = (float)((float)(v259 + v200) - 5.0) + 0.0;
v261 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)LODWORD(v259));
v262 = COERCE_FLOAT(cocos2d::CCDirector::getScreenBottom(v261));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v338, v260, (float)(v262 + v200) + 46.0);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v339, v194);
v286(v256, v339);
v264 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_manageBackupBtn_001.png", v263);
v318 = 0;
v317 = LevelBrowserLayer::onBackups;
v265 = CCMenuItemSpriteExtra::create(v264, 0, (int)this, (int)LevelBrowserLayer::onBackups, 0);
v266 = (cocos2d::CCDirector *)(*(int (__fastcall **)(const cocos2d::CCPoint *, int))(*(_DWORD *)v194 + 228))(
v194,
v265);
v287 = *(int (__fastcall **)(int, _DWORD *))(*(_DWORD *)v265 + 92);
v267 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v266);
v268 = COERCE_FLOAT(cocos2d::CCDirector::getScreenLeft(v267));
v269 = (float)((float)(v268 + v200) - 5.0) + 0.0;
v270 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)LODWORD(v268));
v271 = COERCE_FLOAT(cocos2d::CCDirector::getScreenBottom(v270));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v338, v269, (float)(v271 + v200) + 82.0);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v339, v194);
v272 = (cocos2d::CCNotificationCenter *)v287(v265, v339);
v273 = cocos2d::CCNotificationCenter::sharedNotificationCenter(v272);
v319 = LevelBrowserLayer::onLevelsImported;
v320 = 0;
v242 = (GameManager *)cocos2d::CCNotificationCenter::addObserver(
v273,
(int)this,
(int)LevelBrowserLayer::onLevelsImported,
0,
"LevelsImportedNotification",
0);
}
v253 = (GameManager *)GameManager::sharedState(v242);
if ( !GameManager::onlyCuratedLevels(v253) )
{
if ( *(_DWORD *)(*((_DWORD *)this + 125) + 264) == 98 )
v274 = "GJ_viewListsBtn_001.png";
else
v274 = "GJ_viewLevelsBtn_001.png";
v275 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)v274, v254);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v275 + 80))(v275, 1061997773);
v322 = 0;
v321 = LevelBrowserLayer::onLocalMode;
v276 = CCMenuItemSpriteExtra::create(v275, 0, (int)this, (int)LevelBrowserLayer::onLocalMode, 0);
(*(void (__fastcall **)(const cocos2d::CCPoint *, int))(*(_DWORD *)v194 + 228))(v194, v276);
v277 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v276 + 92);
v278 = (*(int (__fastcall **)(int))(*(_DWORD *)v197 + 96))(v197);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v338, 2.0, 52.0);
cocos2d::CCPoint::operator+(v339, v278, v338);
v277(v276, v339);
}
}
LABEL_104:
if ( GJSearchObject::isLevelSearchObject(*((GJSearchObject **)this + 125)) )
{
v227 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"gj_folderBtn_001.png", v208);
v229 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)"0", "bigFont.fnt", v228);
*((_DWORD *)this + 129) = v229;
(*(void (__fastcall **)(int, int, int))(*(_DWORD *)v227 + 232))(v227, v229, 1);
v230 = *((_DWORD *)this + 129);
v231 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v230 + 92);
v232 = *(float *)(*(int (__fastcall **)(int))(*(_DWORD *)v227 + 164))(v227);
v233 = (*(int (__fastcall **)(int))(*(_DWORD *)v227 + 164))(v227);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v339, v232 * 0.5, (float)(*(float *)(v233 + 4) * 0.5) + 0.5);
v231(v230, v339);
v336 = 0;
v335 = LevelBrowserLayer::onGoToFolder;
v234 = CCMenuItemSpriteExtra::create(v227, 0, (int)this, (int)LevelBrowserLayer::onGoToFolder, 0);
*((_DWORD *)this + 130) = v234;
CCMenuItemSpriteExtra::setSizeMult(v234, 1.2);
(*(void (__fastcall **)(const cocos2d::CCPoint *, _DWORD))(*(_DWORD *)v50 + 228))(
v50,
*((_DWORD *)this + 130));
v235 = *((_DWORD *)this + 130);
v236 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v235 + 92);
v237 = (*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 128) + 96))(*((_DWORD *)this + 128));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v338, 0.0, -35.0);
cocos2d::CCPoint::operator+(v339, v237, v338);
v236(v235, v339);
}
v209 = (const cocos2d::CCPoint *)cocos2d::CCSprite::createWithSpriteFrameName(
(cocos2d::CCSprite *)"GJ_arrow_02_001.png",
v208);
(*(void (__fastcall **)(const cocos2d::CCPoint *, int))(*(_DWORD *)v209 + 80))(v209, 1053609165);
v211 = (cocos2d::CCSprite *)cocos2d::CCSprite::createWithSpriteFrameName(
(cocos2d::CCSprite *)"GJ_arrow_02_001.png",
v210);
(*(void (__fastcall **)(const cocos2d::CCPoint *, cocos2d::CCSprite *, int))(*(_DWORD *)v209 + 232))(
v209,
v211,
1);
v212 = *(void (__fastcall **)(cocos2d::CCSprite *, _DWORD *))(*(_DWORD *)v211 + 92);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v337, v209);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v338, 15.0, 0.0);
cocos2d::CCPoint::operator+(v339, v337, v338);
v212(v211, v339);
cocos2d::CCSprite::setFlipX(v211, 1);
cocos2d::CCSprite::setFlipX(v209, 1);
v337[1] = 0;
v337[0] = LevelBrowserLayer::onGoToLastPage;
v213 = CCMenuItemSpriteExtra::create((int)v209, 0, (int)this, (int)LevelBrowserLayer::onGoToLastPage, 0);
*((_DWORD *)this + 121) = v213;
CCMenuItemSpriteExtra::setSizeMult(v213, 1.2);
(*(void (__fastcall **)(const cocos2d::CCPoint *, _DWORD))(*(_DWORD *)v50 + 228))(v50, *((_DWORD *)this + 121));
v214 = *((_DWORD *)this + 121);
v215 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v214 + 92);
v216 = (*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 128) + 96))(*((_DWORD *)this + 128));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v338, -2.0, -65.0);
cocos2d::CCPoint::operator+(v339, v216, v338);
v215(v214, v339);
v218 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"gj_findBtn_001.png", v217);
v338[1] = 0;
v338[0] = LevelBrowserLayer::onSearch;
v219 = CCMenuItemSpriteExtra::create(v218, 0, (int)this, (int)LevelBrowserLayer::onSearch, 0);
CCMenuItemSpriteExtra::setSizeMult(v219, 1.2);
(*(void (__fastcall **)(const cocos2d::CCPoint *, int))(*(_DWORD *)v50 + 228))(v50, v219);
v220 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v219 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v294, 24.0, v86 - 30.0);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v339, v50);
v220(v219, v339);
v222 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"gj_findBtnOff_001.png", v221);
v339[1] = 0;
v339[0] = LevelBrowserLayer::onClearSearch;
v223 = CCMenuItemSpriteExtra::create(v222, 0, (int)this, (int)LevelBrowserLayer::onClearSearch, 0);
*((_DWORD *)this + 122) = v223;
CCMenuItemSpriteExtra::setSizeMult(v223, 1.2);
(*(void (__fastcall **)(const cocos2d::CCPoint *, _DWORD))(*(_DWORD *)v50 + 228))(v50, *((_DWORD *)this + 122));
v224 = *((_DWORD *)this + 122);
v225 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v224 + 92);
v226 = (*(int (__fastcall **)(int))(*(_DWORD *)v219 + 96))(v219);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v293, 0.0, -35.0);
cocos2d::CCPoint::operator+(v294, v226, v293);
v225(v224, v294);
(*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 122) + 172))(*((_DWORD *)this + 122), 0);
LABEL_107:
if ( isControllerConnected )
{
GameToolbox::addBackButton(this, v282, v182);
GameToolbox::addRThumbScrollButton(this, v238);
}
LevelBrowserLayer::loadPage((GJSearchObject **)this, v279);
std::string::~string((int)v340);
return v281;
}
if ( (unsigned int)(v124 - 99) <= 1 )
{
if ( v124 == 100 )
{
v125 = 1;
goto LABEL_66;
}
LABEL_63:
v125 = *((_DWORD *)v279 + 66) == 103;
LABEL_66:
v126 = (const cocos2d::CCPoint *)cocos2d::CCMenu::create(isSafeType);
(*(void (__fastcall **)(LevelBrowserLayer *, const cocos2d::CCPoint *, int))(*(_DWORD *)this + 232))(
this,
v126,
2);
v128 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_deleteBtn_001.png", v127);
v129 = v128;
if ( v125 )
v130 = (int *)&LevelBrowserLayer::onRemoveAllFavorites;
else
v130 = (int *)&LevelBrowserLayer::onDeleteAll;
v131 = *v130;
v324 = 0;
v323 = v131;
v132 = CCMenuItemSpriteExtra::create(v128, 0, (int)this, v131, 0);
v133 = (cocos2d::CCDirector *)(*(int (__fastcall **)(const cocos2d::CCPoint *, int))(*(_DWORD *)v126 + 228))(
v126,
v132);
v134 = *(int (__fastcall **)(const cocos2d::CCPoint *, _DWORD *))(*(_DWORD *)v126 + 92);
v135 = (float)(*(float *)(v129 + 344) * 0.5) + 4.0;
v136 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v133);
v137 = COERCE_FLOAT(cocos2d::CCDirector::getScreenRight(v136));
v138 = v137 - v135;
v139 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)LODWORD(v137));
v140 = COERCE_FLOAT(cocos2d::CCDirector::getScreenBottom(v139));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v339, v138, v140 + v135);
v141 = (GameManager *)v134(v126, v339);
v142 = (GameManager *)GameManager::sharedState(v141);
isSafeType = (cocos2d::CCMenu *)GameManager::onlyCuratedLevels(v142);
if ( !isSafeType )
{
if ( *(_DWORD *)(*((_DWORD *)this + 125) + 264) == 103 )
v144 = "GJ_viewLevelsBtn_001.png";
else
v144 = "GJ_viewListsBtn_001.png";
v145 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)v144, v143);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v145 + 80))(v145, 1061997773);
v326 = 0;
v325 = LevelBrowserLayer::onSavedMode;
v146 = CCMenuItemSpriteExtra::create(v145, 0, (int)this, (int)LevelBrowserLayer::onSavedMode, 0);
(*(void (__fastcall **)(const cocos2d::CCPoint *, int))(*(_DWORD *)v126 + 228))(v126, v146);
v283 = *(int (__fastcall **)(int, _DWORD *))(*(_DWORD *)v146 + 92);
v288 = (*(int (__fastcall **)(int))(*(_DWORD *)v132 + 96))(v132);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v338, 2.0, 52.0);
cocos2d::CCPoint::operator+(v339, v288, v338);
isSafeType = (cocos2d::CCMenu *)v283(v146, v339);
}
if ( *(_DWORD *)(*((_DWORD *)this + 125) + 264) != 103 )
{
if ( v125 )
v147 = "gj_heartOff_001.png";
else
v147 = "gj_heartOn_001.png";
v148 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)v147, v143);
if ( v125 )
v149 = (int *)&LevelBrowserLayer::onSaved;
else
v149 = (int *)&LevelBrowserLayer::onFavorites;
v150 = *v149;
v328 = 0;
v327 = v150;
v151 = CCMenuItemSpriteExtra::create(v148, 0, (int)this, v150, 0);
CCMenuItemSpriteExtra::setSizeMult(v151, 1.1);
v152 = (cocos2d::CCDirector *)(*(int (__fastcall **)(const cocos2d::CCPoint *, int, int))(*(_DWORD *)v126 + 232))(
v126,
v151,
100);
v153 = *(int (__fastcall **)(int, _DWORD *))(*(_DWORD *)v151 + 92);
v154 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v152);
v155 = COERCE_FLOAT(cocos2d::CCDirector::getScreenBottom(v154));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v338, v135 + 0.0, (float)(v155 + v135) + 50.0);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v339, v126);
isSafeType = (cocos2d::CCMenu *)v153(v151, v339);
}
v156 = 1;
LABEL_89:
v169 = cocos2d::CCMenu::create(isSafeType);
(*(void (__fastcall **)(LevelBrowserLayer *, int, int))(*(_DWORD *)this + 232))(this, v169, 2);
v171 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_infoIcon_001.png", v170);
v332 = 0;
v331 = LevelBrowserLayer::onInfo;
v172 = CCMenuItemSpriteExtra::create(v171, 0, (int)this, (int)LevelBrowserLayer::onInfo, 0);
CCMenuItemSpriteExtra::setSizeMult(v172, 2.0);
v173 = (cocos2d::CCDirector *)(*(int (__fastcall **)(int, int))(*(_DWORD *)v169 + 228))(v169, v172);
v174 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v169 + 92);
v175 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v173);
v176 = COERCE_FLOAT(cocos2d::CCDirector::getScreenLeft(v175));
v177 = v176 + 30.0;
v178 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)LODWORD(v176));
v179 = COERCE_FLOAT(cocos2d::CCDirector::getScreenBottom(v178));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v339, v177, v179 + 30.0);
v174(v169, v339);
if ( LevelBrowserLayer::isSafeType(this, v180) )
{
isVaultType = (cocos2d::CCMenu *)LevelBrowserLayer::isVaultType(this, v181);
if ( isVaultType )
v184 = *(unsigned __int8 *)(*((_DWORD *)this + 125) + 316);
else
v184 = 2;
dword_D1E020 = v184;
v185 = cocos2d::CCMenu::create(isVaultType);
v186 = (cocos2d::CCDirector *)(*(int (__fastcall **)(LevelBrowserLayer *, int, int))(*(_DWORD *)this + 232))(
this,
v185,
2);
v187 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v185 + 92);
v188 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v186);
v189 = COERCE_FLOAT(cocos2d::CCDirector::getScreenLeft(v188));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v339, (float)(v189 + 30.0) + 0.0, v292 * 0.5);
v187(v185, v339);
v284 = (char *)this + 584;
for ( i = 0; i != 3; ++i )
{
if ( i == 1 )
{
v191 = "threadBtn_uncompletedOn_001.png";
}
else if ( i == 2 )
{
v191 = "threadBtn_timeOn_001.png";
}
else
{
v191 = "threadBtn_vaultOn_001.png";
}
LOWORD(v290) = -26986;
BYTE2(v290) = -106;
v192 = GameToolbox::createOnOffSprite(
(cocos2d::CCSprite *)v191,
(const char *)(dword_D1E020 == i),
v290,
215);
*((_DWORD *)v284 + 1) = v192;
v284 += 4;
v334 = 0;
v333 = LevelBrowserLayer::onSafeMode;
v193 = CCMenuItemSpriteExtra::create(v192, 0, (int)this, (int)LevelBrowserLayer::onSafeMode, 0);
CCMenuItemSpriteExtra::setSizeMult(v193, 1.2);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v193 + 36))(v193, i);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v185 + 228))(v185, v193);
v289 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v193 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v339, 0.0, (float)(-35 * i + 90));
v289(v193, v339);
}
}
if ( !v156 )
goto LABEL_107;
goto LABEL_104;
}
if ( v124 == 103 )
goto LABEL_63;
if ( (unsigned int)(v124 - 9) > 1 && v124 != 14 && (unsigned int)(v124 - 100) > 2 )
{
v157 = cocos2d::CCMenu::create(isSafeType);
(*(void (__fastcall **)(LevelBrowserLayer *, int, int))(*(_DWORD *)this + 232))(this, v157, 2);
v159 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_updateBtn_001.png", v158);
v330 = 0;
v329 = LevelBrowserLayer::onRefresh;
v160 = CCMenuItemSpriteExtra::create(v159, 0, (int)this, (int)LevelBrowserLayer::onRefresh, 0);
*((_DWORD *)this + 123) = v160;
(*(void (__fastcall **)(int, int))(*(_DWORD *)v157 + 228))(v157, v160);
v161 = (cocos2d::CCDirector *)(*(int (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 123) + 172))(
*((_DWORD *)this + 123),
0);
v162 = *(int (__fastcall **)(int, _DWORD *))(*(_DWORD *)v157 + 92);
v163 = (float)(*(float *)(v159 + 344) * 0.5) + 4.0;
v164 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v161);
v165 = COERCE_FLOAT(cocos2d::CCDirector::getScreenRight(v164));
v166 = v165 - v163;
v167 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)LODWORD(v165));
v168 = COERCE_FLOAT(cocos2d::CCDirector::getScreenBottom(v167));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v339, v166, v168 + v163);
isSafeType = (cocos2d::CCMenu *)v162(v157, v339);
}
}
v156 = 0;
goto LABEL_89;
}
return v281;
}