// // LevelBrowserLayer::init from 0x6eab30 to 0x6ec418 (6376 bytes) // // 2 xrefs: // > LevelBrowserLayer::create @ 0x6ec588 // > @ 0x4da30 // // This function is hookable on this platform! // // Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings // bool LevelBrowserLayer::init(LevelBrowserLayer *a1, GJSearchObject *a2) { bool result; // w0 cocos2d::CCDirector *v5; // x0 cocos2d::CCTouchDispatcher *v6; // x0 char v7; // w2 cocos2d::CCDirector *v8; // x0 const char *v9; // x1 char *v10; // x1 cocos2d::CCSprite *v11; // x0 cocos2d::CCNode *v12; // x21 cocos2d::CCNode *v13; // x21 void (__fastcall *v14)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x22 cocos2d::CCDirector *v15; // x0 float v16; // s0 float v17; // s8 cocos2d::CCDirector *v18; // x0 float v19; // s0 _BOOL4 isControllerConnected; // w25 cocos2d::CCMenu *v21; // x22 float v22; // s8 const char *v23; // x0 cocos2d::CCSprite *v24; // x0 CCMenuItemSpriteExtra *v25; // x0 CCMenuItemSpriteExtra *m_leftArrow; // x28 void (__fastcall *v27)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x26 cocos2d::CCDirector *v28; // x0 float v29; // s0 const char *v30; // x0 cocos2d::CCSprite *v31; // x0 cocos2d::CCNode *v32; // x26 CCMenuItemSpriteExtra *v33; // x0 CCMenuItemSpriteExtra *m_rightArrow; // x28 void (__fastcall *v35)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x26 cocos2d::CCDirector *v36; // x0 float v37; // s0 const char *v38; // x1 cocos2d::CCNode *v39; // x28 cocos2d::CCLabelBMFont *v40; // x0 cocos2d::CCNode_vtbl *v41; // x3 cocos2d::CCLabelBMFont *m_pageText; // x27 void (__fastcall *v43)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x26 float v44; // s9 __int64 v45; // x0 CCMenuItemSpriteExtra *v46; // x0 CCMenuItemSpriteExtra *m_pageBtn; // x26 void (__fastcall *v48)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x28 cocos2d::CCDirector *v49; // x0 float v50; // s8 float v51; // s0 LoadingCircle *v52; // x0 LoadingCircle *m_circle; // x0 cocos2d::CCLabelBMFont *v54; // x0 LevelBrowserLayer_vtbl *v55; // x2 cocos2d::CCLabelBMFont *m_countText; // x28 void (__fastcall *v57)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x27 cocos2d::CCDirector *v58; // x0 float v59; // s0 float v60; // s9 cocos2d::CCDirector *v61; // x0 float v62; // s0 cocos2d::CCLabelBMFont *v63; // x28 void (__fastcall *v64)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // x27 TextArea *v65; // x0 TextArea *m_noInternet; // x26 void *v67; // x0 void (__fastcall *v68)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x28 GJSearchObject *m_searchObject; // x0 SearchType m_searchType; // w1 SearchType v71; // w0 cocos2d::CCMenu *v72; // x28 cocos2d::CCSprite *v73; // x0 cocos2d::CCSprite *v74; // x26 CCMenuItemSpriteExtra *v75; // x0 cocos2d::CCMenu_vtbl *v76; // x2 float width; // s0 void (__fastcall *v78)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x26 float v79; // s9 cocos2d::CCDirector *v80; // x0 float v81; // s0 float v82; // s11 cocos2d::CCDirector *v83; // x0 float v84; // s0 cocos2d::CCMenu *v85; // x26 cocos2d::CCSprite *v86; // x0 CCMenuItemSpriteExtra *v87; // x28 void (__fastcall *v88)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x28 cocos2d::CCDirector *v89; // x0 float v90; // s0 float v91; // s9 cocos2d::CCDirector *v92; // x0 float v93; // s0 char *p_m_fBrVertexMod; // x0 cocos2d::CCMenu *v95; // x26 cocos2d::CCSprite *v96; // x0 void (__fastcall *v97)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x28 void (__fastcall *v98)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x28 float v99; // s9 cocos2d::CCDirector *v100; // x0 float v101; // s0 float v102; // s11 cocos2d::CCDirector *v103; // x0 float v104; // s0 GameManager *v105; // x0 cocos2d::CCSprite *v106; // x0 CCMenuItemSpriteExtra *v107; // x28 cocos2d::CCDirector *v108; // x0 float v109; // s0 float v110; // s11 cocos2d::CCDirector *v111; // x0 float v112; // s0 const char *v113; // x0 cocos2d::CCSprite *v114; // x28 CCMenuItemSpriteExtra *v115; // x28 __int64 v116; // x26 cocos2d::CCSprite *v117; // x26 cocos2d::CCLabelBMFont *v118; // x0 cocos2d::CCSprite_vtbl *v119; // x3 cocos2d::CCLabelBMFont *m_folderText; // x28 float v121; // s9 __int64 v122; // x0 CCMenuItemSpriteExtra *v123; // x0 CCMenuItemSpriteExtra *m_folderBtn; // x28 const cocos2d::CCPoint *v125; // x26 cocos2d::CCSprite *v126; // x26 cocos2d::CCSprite *v127; // x28 CCMenuItemSpriteExtra *v128; // x0 CCMenuItemSpriteExtra *m_lastBtn; // x27 void (__fastcall *v130)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x28 const cocos2d::CCPoint *v131; // x26 cocos2d::CCSprite *v132; // x0 CCMenuItemSpriteExtra *v133; // x26 void (__fastcall *v134)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x27 cocos2d::CCSprite *v135; // x0 CCMenuItemSpriteExtra *v136; // x0 CCMenuItemSpriteExtra *v137; // x0 CCMenuItemSpriteExtra *m_cancelSearchBtn; // x22 const cocos2d::CCPoint *(__fastcall *getPosition)(cocos2d::CCNode *__hidden); // x1 void (__fastcall *v140)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x26 __int64 v141; // x27 cocos2d::CCSprite *v142; // x26 void (__fastcall *v143)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x28 cocos2d::CCMenu *v144; // x26 ButtonSprite *v145; // x0 cocos2d::CCNode *v146; // x28 CCMenuItemSpriteExtra *v147; // x28 void (__fastcall *v148)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x28 cocos2d::CCSprite *v149; // x28 CCMenuItemToggler *v150; // x0 cocos2d::CCMenu_vtbl *v151; // x2 CCMenuItemToggler *m_allObjectsToggler; // x28 __int64 v153; // x26 cocos2d::CCLabelBMFont *v154; // x26 void (__fastcall *v155)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x28 cocos2d::CCMenu *v156; // x26 cocos2d::CCSprite *v157; // x28 float v158; // s0 void (__fastcall *v159)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x28 float v160; // s9 cocos2d::CCDirector *v161; // x0 float v162; // s0 float v163; // s11 cocos2d::CCDirector *v164; // x0 float v165; // s0 const char *v166; // x0 cocos2d::CCSprite *v167; // x28 CCMenuItemSpriteExtra *v168; // x28 CCMenuItemSpriteExtra *v169; // x0 CCMenuItemSpriteExtra_vtbl *v170; // x1 const char *v171; // x0 cocos2d::CCSprite *v172; // x0 CCMenuItemSpriteExtra *v173; // x28 cocos2d::CCDirector *v174; // x0 float v175; // s0 cocos2d::CCNode *v176; // x21 void (__fastcall *setAnchorPoint)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x25 void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x22 int (__fastcall *getTag)(const cocos2d::CCObject *__hidden); // x2 cocos2d::CCSprite *v180; // x21 void (__fastcall *v181)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x25 void (__fastcall *v182)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x25 cocos2d::CCDirector *v183; // x0 float v184; // s0 float v185; // s9 cocos2d::CCDirector *v186; // x0 float v187; // s0 cocos2d::CCSprite *v188; // x21 void (__fastcall *v189)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x22 void (__fastcall *v190)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x22 cocos2d::CCDirector *v191; // x0 float v192; // s0 float v193; // s9 cocos2d::CCDirector *v194; // x0 float v195; // s0 cocos2d::CCSprite *v196; // x0 cocos2d::CCSprite *v197; // x28 void (__fastcall *v198)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x26 unsigned int *p_m_fTextureTop; // x2 int m_fTextureTop_low; // w1 unsigned int *v201; // x2 int v202; // w1 GJAccountManager *v203; // x0 __int64 v204; // [xsp+80h] [xbp+80h] CCMenuItemSpriteExtra *v205; // [xsp+88h] [xbp+88h] CCMenuItemSpriteExtra *v206; // [xsp+88h] [xbp+88h] CCMenuItemSpriteExtra *v207; // [xsp+88h] [xbp+88h] void (__fastcall *v208)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // [xsp+88h] [xbp+88h] int v209; // [xsp+90h] [xbp+90h] cocos2d::CCSprite *v210; // [xsp+90h] [xbp+90h] void (__fastcall *v211)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // [xsp+90h] [xbp+90h] void (__fastcall *v212)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // [xsp+90h] [xbp+90h] void (__fastcall *v213)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // [xsp+90h] [xbp+90h] void (__fastcall *v214)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // [xsp+90h] [xbp+90h] void (__fastcall *v215)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // [xsp+90h] [xbp+90h] cocos2d::CCSprite *v216; // [xsp+90h] [xbp+90h] void (__fastcall *v217)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // [xsp+90h] [xbp+90h] _BOOL4 v218; // [xsp+90h] [xbp+90h] void (__fastcall *v219)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // [xsp+90h] [xbp+90h] CCMenuItemSpriteExtra *v220; // [xsp+98h] [xbp+98h] float v221; // [xsp+A0h] [xbp+A0h] float v222; // [xsp+A4h] [xbp+A4h] cocos2d::CCSprite *v223; // [xsp+A8h] [xbp+A8h] BYREF cocos2d::CCPoint v224; // [xsp+B0h] [xbp+B0h] BYREF cocos2d::CCPoint v225; // [xsp+B8h] [xbp+B8h] BYREF cocos2d::CCPoint v226; // [xsp+C0h] [xbp+C0h] BYREF cocos2d::CCPoint v227; // 0:kr08_8.8 cocos2d::CCPoint v228; // 0:kr10_8.8 cocos2d::CCPoint v229; // 0:kr18_8.8 cocos2d::CCPoint v230; // 0:kr20_8.8 cocos2d::CCPoint v231; // 0:kr30_8.8 cocos2d::CCPoint v232; // 0:kr38_8.8 cocos2d::CCPoint v233; // 0:kr40_8.8 cocos2d::SEL_MenuHandler v234; // 0:x2.16 cocos2d::SEL_MenuHandler v235; // 0:x2.16 cocos2d::SEL_MenuHandler v236; // 0:x2.16 cocos2d::SEL_MenuHandler v237; // 0:x2.16 cocos2d::SEL_MenuHandler v238; // 0:x2.16 cocos2d::SEL_MenuHandler v239; // 0:x2.16 cocos2d::SEL_MenuHandler v240; // 0:x2.16 cocos2d::SEL_MenuHandler v241; // 0:x2.16 cocos2d::SEL_MenuHandler v242; // 0:x2.16 cocos2d::SEL_MenuHandler v243; // 0:x2.16 cocos2d::SEL_MenuHandler v244; // 0:x2.16 cocos2d::SEL_MenuHandler v245; // 0:x2.16 cocos2d::SEL_MenuHandler v246; // 0:x2.16 cocos2d::SEL_MenuHandler v247; // 0:x2.16 cocos2d::SEL_MenuHandler v248; // 0:x2.16 cocos2d::SEL_MenuHandler v249; // 0:x2.16 cocos2d::SEL_MenuHandler v250; // 0:x2.16 cocos2d::SEL_MenuHandler v251; // 0:x3.16 if ( a2 && a2->m_searchIsOverlay ) { a1->m_isOverlay = (unsigned __int8)&dword_0 + 1; v5 = cocos2d::CCDirector::sharedDirector(); v6 = v5->getTouchDispatcher(v5); cocos2d::CCTouchDispatcher::registerForcePrio(v6, a1, 2); LOWORD(v226.x) = 0; if ( a1->m_isOverlay ) v7 = -106; else v7 = 0; BYTE2(v226.x) = 0; HIBYTE(v226.x) = v7; result = cocos2d::CCLayerColor::initWithColor(a1, (const cocos2d::_ccColor4B *)&v226); if ( !result ) return result; LevelBrowserLayer::setSearchObject(a1, a2); } else { a1->m_isOverlay = 0; v226.x = 0.0; result = cocos2d::CCLayerColor::initWithColor(a1, (const cocos2d::_ccColor4B *)&v226); if ( !result ) return result; LevelBrowserLayer::setSearchObject(a1, a2); if ( !a2 ) { LABEL_62: if ( !a1->m_isOverlay ) goto LABEL_13; goto LABEL_12; } } if ( !a1->m_isOverlay ) { GameLevelManager::sharedState()->m_searchType = a2->m_searchType; goto LABEL_62; } LABEL_12: a1->setTouchEnabled(a1, 1); LABEL_13: a1->setKeypadEnabled(a1, 1); a1->setKeyboardEnabled(a1, 1); v8 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize(v8); if ( a1->m_isOverlay ) goto LABEL_14; v176 = (cocos2d::CCNode *)cocos2d::CCSprite::create((cocos2d::CCSprite *)"GJ_gradientBG.png", v9); setAnchorPoint = v176->setAnchorPoint; cocos2d::CCPoint::CCPoint(&v226, 0.0, 0.0); setAnchorPoint(v176, &v226); a1->addChild_0(a1, v176, -2); v176->setScaleX(v176, (float)(v221 + 10.0) / v176[1].m_obContentSize.height); v176->setScaleY(v176, (float)(v222 + 10.0) / v176[1].m_sAdditionalTransform.a); setPosition = v176->setPosition; cocos2d::CCPoint::CCPoint(&v226, -5.0, -5.0); setPosition(v176, &v226); getTag = v176->__vftable[1].getTag; LOWORD(v226.x) = 26112; BYTE2(v226.x) = -1; ((void (__fastcall *)(cocos2d::CCNode *, cocos2d::CCPoint *))getTag)(v176, &v226); v180 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_sideArt_001.png"); v181 = v180->setAnchorPoint; cocos2d::CCPoint::CCPoint(&v226, 0.0, 0.0); v181(v180, &v226); v182 = v180->setPosition; v183 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getScreenLeft(v183); v185 = v184; v186 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getScreenBottom(v186); cocos2d::CCPoint::CCPoint(&v226, v185 - 1.0, v187 - 1.0); v182(v180, &v226); a1->addChild_0(a1, v180, 1); v188 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_sideArt_001.png"); v189 = v188->setAnchorPoint; cocos2d::CCPoint::CCPoint(&v226, 1.0, 0.0); v189(v188, &v226); v190 = v188->setPosition; v191 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getScreenRight(v191); v193 = v192; v194 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getScreenBottom(v194); cocos2d::CCPoint::CCPoint(&v226, v193 + 1.0, v195 - 1.0); v190(v188, &v226); cocos2d::CCSprite::setFlipX(v188, 1); a1->addChild_0(a1, v188, 1); if ( a1->m_isOverlay ) LABEL_14: v10 = "GJ_closeBtn_001.png"; else v10 = "GJ_arrow_01_001.png"; sub_D153B8((int)&v223, v10); v11 = cocos2d::CCSprite::createWithSpriteFrameName((const char *)v223); v12 = v11; if ( a1->m_isOverlay ) v11->setScale(v11, 0.9); v234.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v234.adj = 1312; v220 = CCMenuItemSpriteExtra::create(v12, nullptr, v234); CCMenuItemSpriteExtra::setSizeMult(v220, 1.6); v13 = (cocos2d::CCNode *)cocos2d::CCMenu::create((cocos2d::CCMenu *)v220, nullptr); a1->addChild_0(a1, v13, 1); v14 = v13->setPosition; v15 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getScreenLeft(v15); v17 = v16 + 24.0; v18 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getScreenTop(v18); cocos2d::CCPoint::CCPoint(&v226, v17, v19 - 23.0); v14(v13, &v226); isControllerConnected = PlatformToolbox::isControllerConnected(); v21 = cocos2d::CCMenu::create(); a1->addChild_0(a1, v21, 10); v22 = v222 * 0.5; if ( isControllerConnected ) v23 = "controllerBtn_DPad_Left_001.png"; else v23 = "GJ_arrow_03_001.png"; v24 = cocos2d::CCSprite::createWithSpriteFrameName(v23); v235.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v235.adj = (size_t)LevelBrowserLayer::onPrevPage; v25 = CCMenuItemSpriteExtra::create(v24, nullptr, v235); a1->m_leftArrow = v25; CCMenuItemSpriteExtra::setSizeMult(v25, 2.0); v21->addChild(v21, a1->m_leftArrow); m_leftArrow = a1->m_leftArrow; v27 = m_leftArrow->setPosition; v28 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getScreenLeft(v28); cocos2d::CCPoint::CCPoint(&v225, v29 + 24.0, v22); v227 = cocos2d::CCNode::convertToNodeSpace(v21, &v225); ((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCPoint *, float, float))v27)( m_leftArrow, &v226, v227.x, v227.y); if ( isControllerConnected ) v30 = "controllerBtn_DPad_Right_001.png"; else v30 = "GJ_arrow_03_001.png"; v31 = cocos2d::CCSprite::createWithSpriteFrameName(v30); v32 = v31; if ( !isControllerConnected ) cocos2d::CCSprite::setFlipX(v31, 1); v236.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v236.adj = (size_t)LevelBrowserLayer::onNextPage; v33 = CCMenuItemSpriteExtra::create(v32, nullptr, v236); a1->m_rightArrow = v33; CCMenuItemSpriteExtra::setSizeMult(v33, 2.0); v21->addChild(v21, a1->m_rightArrow); m_rightArrow = a1->m_rightArrow; v35 = m_rightArrow->setPosition; v36 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getScreenRight(v36); cocos2d::CCPoint::CCPoint(&v225, v37 - 24.0, v22); v228 = cocos2d::CCNode::convertToNodeSpace(v21, &v225); ((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCPoint *, float, float))v35)( m_rightArrow, &v226, v228.x, v228.y); v39 = (cocos2d::CCNode *)cocos2d::CCSprite::create((cocos2d::CCSprite *)"GJ_button_02.png", v38); v40 = cocos2d::CCLabelBMFont::create(); v41 = v39->__vftable; a1->m_pageText = v40; v41->addChild_0(v39, v40, 1); m_pageText = a1->m_pageText; v43 = m_pageText->setPosition; v44 = v39->getContentSize(v39)->width * 0.5; v45 = (__int64)v39->getContentSize(v39); cocos2d::CCPoint::CCPoint(&v226, v44, (float)(*(float *)(v45 + 4) * 0.5) + 1.0); v43(m_pageText, &v226); LevelBrowserLayer::updatePageLabel(a1); v39->setScale(v39, 0.7); v237.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v237.adj = (size_t)LevelBrowserLayer::onGoToPage; v46 = CCMenuItemSpriteExtra::create(v39, nullptr, v237); a1->m_pageBtn = v46; CCMenuItemSpriteExtra::setSizeMult(v46, 1.2); v21->addChild(v21, a1->m_pageBtn); m_pageBtn = a1->m_pageBtn; v48 = m_pageBtn->setPosition; v49 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getScreenRight(v49); v50 = v22 + 122.0; cocos2d::CCPoint::CCPoint(&v225, (float)(v51 - 24.0) + 1.0, v50); v229 = cocos2d::CCNode::convertToNodeSpace(v21, &v225); ((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCPoint *, float, float))v48)( m_pageBtn, &v226, v229.x, v229.y); a1->m_leftArrow->setVisible(a1->m_leftArrow, 0); a1->m_rightArrow->setVisible(a1->m_rightArrow, 0); a1->m_pageBtn->setVisible(a1->m_pageBtn, 0); v52 = LoadingCircle::create(); a1->m_circle = v52; v52->m_parentLayer = a1; m_circle = a1->m_circle; m_circle->m_fade = 0; cocos2d::CCObject::retain(m_circle); LoadingCircle::show(a1->m_circle); a1->m_circle->setVisible(a1->m_circle, 0); v54 = cocos2d::CCLabelBMFont::create(); v55 = a1->cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; a1->m_countText = v54; v55->addChild(a1, v54); m_countText = a1->m_countText; v57 = m_countText->setPosition; v58 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getScreenRight(v58); v60 = v59 - 7.0; v61 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getScreenTop(v61); cocos2d::CCPoint::CCPoint(&v226, v60, v62 - 3.0); v57(m_countText, &v226); v63 = a1->m_countText; v64 = v63->setAnchorPoint; cocos2d::CCPoint::CCPoint(&v226, 1.0, 1.0); v64(v63, &v226); a1->m_countText->setScale(a1->m_countText, 0.6); sub_D153B8((int)&v226, "No Internet connection!"); cocos2d::CCPoint::CCPoint(&v225, 0.5, 1.0); v65 = (TextArea *)TextArea::create((__int64)&v226, "bigFont.fnt", &v225, 0, 1.0, 600.0, 20.0); a1->m_noInternet = v65; m_noInternet = v65; v67 = (void *)(*(_QWORD *)&v226 - 24LL); if ( (__int64 *)(*(_QWORD *)&v226 - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v201 = (unsigned int *)(*(_QWORD *)&v226 - 8LL); do v202 = __ldaxr(v201); while ( __stlxr(v202 - 1, v201) ); } else { v202 = *(_DWORD *)(*(_QWORD *)&v226 - 8LL); *(_DWORD *)(*(_QWORD *)&v226 - 8LL) = v202 - 1; } if ( v202 <= 0 ) operator delete(v67); m_noInternet = a1->m_noInternet; } v68 = m_noInternet->setPosition; cocos2d::CCPoint::CCPoint(&v226, v221 * 0.5, (float)(v222 * 0.5) + 10.0); v68(m_noInternet, &v226); a1->m_noInternet->setScale(a1->m_noInternet, 0.6); a1->addChild_0(a1, a1->m_noInternet, 2); a1->m_noInternet->setVisible(a1->m_noInternet, 0); m_searchObject = a1->m_searchObject; if ( !m_searchObject ) goto LABEL_38; m_searchType = m_searchObject->m_searchType; if ( (unsigned int)(m_searchType - 21) > 2 ) { switch ( m_searchType ) { case Recent|MostLiked: if ( m_searchObject->m_searchMode == 1 ) { v196 = cocos2d::CCSprite::createWithSpriteFrameName("topListsLabel_001.png"); goto LABEL_81; } break; case FeaturedGDW: break; case FeaturedLite: v196 = cocos2d::CCSprite::createWithSpriteFrameName("weeklyLevelsLabel_001.png"); LABEL_81: v197 = v196; a1->addChild_0(a1, v196, 2); v198 = v197->setPosition; cocos2d::CCPoint::CCPoint(&v226, v221 * 0.5, (float)((float)(v222 * 0.5) + 110.0) + 24.0); LABEL_82: v198(v197, &v226); goto LABEL_55; case FeaturedLite|Downloaded: v197 = cocos2d::CCSprite::createWithSpriteFrameName("bonusLevelsLabel_001.png"); a1->addChild_0(a1, v197, 2); v198 = v197->setPosition; cocos2d::CCPoint::CCPoint(&v226, v221 * 0.5, (float)((float)(v222 * 0.5) + 110.0) + 24.0); goto LABEL_82; default: goto LABEL_30; } v196 = cocos2d::CCSprite::createWithSpriteFrameName("featuredLabel_001.png"); goto LABEL_81; } v142 = cocos2d::CCSprite::createWithSpriteFrameName("theSafeLabel_001.png"); a1->addChild_0(a1, v142, 2); v143 = v142->setPosition; cocos2d::CCPoint::CCPoint(&v226, (float)(v221 * 0.5) + 13.0, (float)((float)(v222 * 0.5) + 110.0) + 24.0); v143(v142, &v226); LABEL_55: m_searchObject = a1->m_searchObject; if ( !m_searchObject ) { LABEL_38: v209 = 0; goto LABEL_39; } m_searchType = m_searchObject->m_searchType; LABEL_30: if ( (unsigned int)(m_searchType - 98) <= 2 && !m_searchObject->m_searchIsOverlay ) { v144 = cocos2d::CCMenu::create(); a1->addChild_0(a1, v144, 2); v145 = (ButtonSprite *)cocos2d::CCSprite::createWithSpriteFrameName("edit_delBtn_001.png"); v146 = (cocos2d::CCNode *)ButtonSprite::create( v145, (cocos2d::CCSprite *)((char *)&qword_20 + 2), 0, 1, 36.0, 1.0, (cocos2d::CCSprite *)"GJ_button_04.png", nullptr); v146->setScale(v146, 0.4); v247.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v247.adj = (size_t)LevelBrowserLayer::onDeleteSelected; v147 = CCMenuItemSpriteExtra::create(v146, nullptr, v247); v144->addChild(v144, v147); cocos2d::CCPoint::CCPoint(&v224, (float)(v221 * 0.5) + -145.0, (float)(v222 * 0.5) + -122.0); v206 = v147; v148 = v147->setPosition; v232 = cocos2d::CCNode::convertToNodeSpace(v144, &v224); ((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCPoint *, float, float))v148)(v206, &v226, v232.x, v232.y); v216 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_checkOn_001.png"); v149 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_checkOff_001.png"); v216->setScale(v216, 0.5); v149->setScale(v149, 0.5); v251.adj = 0; v251.ptr = (void (__cdecl *)(cocos2d::CCObject *))LevelBrowserLayer::onToggleAllObjects; v150 = CCMenuItemToggler::create(v149, v216, a1, v251); v151 = v144->cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; a1->m_allObjectsToggler = v150; v151->addChild(v144, v150); m_allObjectsToggler = a1->m_allObjectsToggler; v217 = m_allObjectsToggler->setPosition; v153 = (__int64)v206->getPosition(v206); cocos2d::CCPoint::CCPoint(&v225, 26.0, 0.0); cocos2d::CCPoint::operator+(&v226, v153, &v225); v217(m_allObjectsToggler, &v226); CCMenuItemToggler::setSizeMult(a1->m_allObjectsToggler, 1.1); v154 = cocos2d::CCLabelBMFont::create(); a1->addChild_0(a1, v154, 10); v155 = v154->setPosition; cocos2d::CCPoint::CCPoint(&v225, 55.0, 0.0); cocos2d::CCPoint::operator+(&v226, &v224, &v225); v155(v154, &v226); v154->setScale(v154, 0.4); m_searchObject = a1->m_searchObject; if ( !m_searchObject ) { v209 = 0; goto LABEL_39; } } v71 = m_searchObject->m_searchType; if ( (unsigned int)(v71 - 101) <= 1 || v71 == MyLevels ) { v95 = cocos2d::CCMenu::create(); a1->addChild_0(a1, v95, 2); v96 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_newBtn_001.png"); v240.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v210 = v96; v240.adj = (size_t)LevelBrowserLayer::onNew; v205 = CCMenuItemSpriteExtra::create(v96, nullptr, v240); v95->addChild(v95, v205); v97 = v95->setPosition; cocos2d::CCPoint::CCPoint(&v226, v221 * 0.5, (float)((float)(v222 - 220.0) * 0.5) + -4.0); v97(v95, &v226); v98 = v95->setPosition; v99 = (float)(v210->m_obRect.size.width * 0.5) + 4.0; v100 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getScreenRight(v100); v102 = v101 - v99; v103 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getScreenBottom(v103); cocos2d::CCPoint::CCPoint(&v226, v102, v99 + v104); v98(v95, &v226); if ( !a1->m_isOverlay ) { v105 = GameManager::sharedState(); if ( v105->m_playerUserID.random != v105->m_playerUserID.seed || (v203 = GJAccountManager::sharedState(), v203->m_accountID != v203->m_unkInt1) ) { v106 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_myServerBtn_001.png"); v241.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v241.adj = (size_t)LevelBrowserLayer::onMyOnlineLevels; v107 = CCMenuItemSpriteExtra::create(v106, nullptr, v241); v95->addChild(v95, v107); v211 = v107->setPosition; v108 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getScreenLeft(v108); v110 = v99 + v109; v111 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getScreenBottom(v111); cocos2d::CCPoint::CCPoint(&v225, v110, v99 + v112); v230 = cocos2d::CCNode::convertToNodeSpace(v95, &v225); ((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCPoint *, float, float))v211)( v107, &v226, v230.x, v230.y); } if ( a1->m_searchObject->m_searchType == MyLevels ) v113 = "GJ_viewListsBtn_001.png"; else v113 = "GJ_viewLevelsBtn_001.png"; v114 = cocos2d::CCSprite::createWithSpriteFrameName(v113); v114->setScale(v114, 0.8); v242.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v242.adj = (size_t)LevelBrowserLayer::onLocalMode; v115 = CCMenuItemSpriteExtra::create(v114, nullptr, v242); v95->addChild(v95, v115); v212 = v115->setPosition; v116 = (__int64)v205->getPosition(v205); cocos2d::CCPoint::CCPoint(&v225, 2.0, 52.0); cocos2d::CCPoint::operator+(&v226, v116, &v225); v212(v115, &v226); } goto LABEL_51; } if ( (unsigned int)(v71 - 99) > 1 && v71 != FavouriteLists ) { if ( (unsigned int)(v71 - 9) > 1 && v71 != Users && (unsigned int)(v71 - 100) > 2 ) { v72 = cocos2d::CCMenu::create(); a1->addChild_0(a1, v72, 2); v73 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_updateBtn_001.png"); v238.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v74 = v73; v238.adj = (size_t)LevelBrowserLayer::onRefresh; v75 = CCMenuItemSpriteExtra::create(v73, nullptr, v238); v76 = v72->cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; a1->m_refreshBtn = v75; v76->addChild(v72, v75); a1->m_refreshBtn->setVisible(a1->m_refreshBtn, 0); width = v74->m_obRect.size.width; v78 = v72->setPosition; v79 = (float)(width * 0.5) + 4.0; v80 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getScreenRight(v80); v82 = v81 - v79; v83 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getScreenBottom(v83); cocos2d::CCPoint::CCPoint(&v226, v82, v79 + v84); v78(v72, &v226); } goto LABEL_38; } v218 = v71 == FavouriteLevels || a2->m_searchType == FavouriteLists; v156 = cocos2d::CCMenu::create(); a1->addChild_0(a1, v156, 2); v157 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_deleteBtn_001.png"); if ( v218 ) v248.adj = (size_t)LevelBrowserLayer::onRemoveAllFavorites; else v248.adj = (size_t)LevelBrowserLayer::onDeleteAll; v248.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v207 = CCMenuItemSpriteExtra::create(v157, nullptr, v248); v156->addChild(v156, v207); v158 = v157->m_obRect.size.width; v159 = v156->setPosition; v160 = (float)(v158 * 0.5) + 4.0; v161 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getScreenRight(v161); v163 = v162 - v160; v164 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getScreenBottom(v164); cocos2d::CCPoint::CCPoint(&v226, v163, v160 + v165); v159(v156, &v226); if ( a1->m_searchObject->m_searchType == FavouriteLists ) v166 = "GJ_viewLevelsBtn_001.png"; else v166 = "GJ_viewListsBtn_001.png"; v167 = cocos2d::CCSprite::createWithSpriteFrameName(v166); v167->setScale(v167, 0.8); v249.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v249.adj = (size_t)LevelBrowserLayer::onSavedMode; v168 = CCMenuItemSpriteExtra::create(v167, nullptr, v249); v156->addChild(v156, v168); v169 = v207; v170 = v207->cocos2d::CCMenuItemSprite::cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v208 = v168->setPosition; v204 = (__int64)v170->getPosition(v169); cocos2d::CCPoint::CCPoint(&v225, 2.0, 52.0); cocos2d::CCPoint::operator+(&v226, v204, &v225); v208(v168, &v226); if ( a1->m_searchObject->m_searchType != FavouriteLists ) { if ( v218 ) v171 = "gj_heartOff_001.png"; else v171 = "gj_heartOn_001.png"; v172 = cocos2d::CCSprite::createWithSpriteFrameName(v171); if ( v218 ) v250.adj = (size_t)LevelBrowserLayer::onSaved; else v250.adj = (size_t)LevelBrowserLayer::onFavorites; v250.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v173 = CCMenuItemSpriteExtra::create(v172, nullptr, v250); CCMenuItemSpriteExtra::setSizeMult(v173, 1.1); v156->addChild_0(v156, v173, 100); v219 = v173->setPosition; v174 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getScreenBottom(v174); cocos2d::CCPoint::CCPoint(&v225, v160 + 0.0, (float)(v160 + v175) + 50.0); v233 = cocos2d::CCNode::convertToNodeSpace(v156, &v225); ((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCPoint *, float, float))v219)(v173, &v226, v233.x, v233.y); } v209 = 1; LABEL_39: v85 = cocos2d::CCMenu::create(); a1->addChild_0(a1, v85, 2); v86 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_infoIcon_001.png"); v239.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v239.adj = (size_t)LevelBrowserLayer::onInfo; v87 = CCMenuItemSpriteExtra::create(v86, nullptr, v239); CCMenuItemSpriteExtra::setSizeMult(v87, 2.0); v85->addChild(v85, v87); v88 = v85->setPosition; v89 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getScreenLeft(v89); v91 = v90 + 30.0; v92 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getScreenBottom(v92); cocos2d::CCPoint::CCPoint(&v226, v91, v93 + 30.0); v88(v85, &v226); if ( v209 ) { LABEL_51: if ( GJSearchObject::isLevelSearchObject(a1->m_searchObject) ) { v117 = cocos2d::CCSprite::createWithSpriteFrameName("gj_folderBtn_001.png"); v118 = cocos2d::CCLabelBMFont::create(); v119 = v117->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; a1->m_folderText = v118; v119->addChild_0(v117, v118, 1); m_folderText = a1->m_folderText; v213 = m_folderText->setPosition; v121 = v117->getContentSize(v117)->width * 0.5; v122 = (__int64)v117->getContentSize(v117); cocos2d::CCPoint::CCPoint(&v226, v121, (float)(*(float *)(v122 + 4) * 0.5) + 0.5); v213(m_folderText, &v226); v243.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v243.adj = (size_t)LevelBrowserLayer::onGoToFolder; v123 = CCMenuItemSpriteExtra::create(v117, nullptr, v243); a1->m_folderBtn = v123; CCMenuItemSpriteExtra::setSizeMult(v123, 1.2); v21->addChild(v21, a1->m_folderBtn); m_folderBtn = a1->m_folderBtn; v214 = m_folderBtn->setPosition; v125 = a1->m_pageBtn->getPosition(a1->m_pageBtn); cocos2d::CCPoint::CCPoint(&v225, 0.0, -35.0); cocos2d::CCPoint::operator+(&v226, v125, &v225); v214(m_folderBtn, &v226); } v126 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_02_001.png"); v126->setScale(v126, 0.4); v127 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_02_001.png"); v126->addChild_0(v126, v127, 1); v215 = v127->setPosition; cocos2d::CCNode::convertToNodeSpace(v126, &stru_1242320); cocos2d::CCPoint::CCPoint(&v225, 15.0, 0.0); cocos2d::CCPoint::operator+(&v226, &v224, &v225); v215(v127, &v226); cocos2d::CCSprite::setFlipX(v127, 1); cocos2d::CCSprite::setFlipX(v126, 1); v244.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v244.adj = (size_t)LevelBrowserLayer::onGoToLastPage; v128 = CCMenuItemSpriteExtra::create(v126, nullptr, v244); a1->m_lastBtn = v128; CCMenuItemSpriteExtra::setSizeMult(v128, 1.2); v21->addChild(v21, a1->m_lastBtn); m_lastBtn = a1->m_lastBtn; v130 = m_lastBtn->setPosition; v131 = a1->m_pageBtn->getPosition(a1->m_pageBtn); cocos2d::CCPoint::CCPoint(&v225, -2.0, -65.0); cocos2d::CCPoint::operator+(&v226, v131, &v225); v130(m_lastBtn, &v226); v132 = cocos2d::CCSprite::createWithSpriteFrameName("gj_findBtn_001.png"); v245.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v245.adj = (size_t)LevelBrowserLayer::onSearch; v133 = CCMenuItemSpriteExtra::create(v132, nullptr, v245); CCMenuItemSpriteExtra::setSizeMult(v133, 1.2); v21->addChild(v21, v133); v134 = v133->setPosition; cocos2d::CCPoint::CCPoint(&v225, 24.0, v50 - 30.0); v231 = cocos2d::CCNode::convertToNodeSpace(v21, &v225); ((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCPoint *, float, float))v134)(v133, &v226, v231.x, v231.y); v135 = cocos2d::CCSprite::createWithSpriteFrameName("gj_findBtnOff_001.png"); v246.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v246.adj = (size_t)LevelBrowserLayer::onClearSearch; v136 = CCMenuItemSpriteExtra::create(v135, nullptr, v246); a1->m_cancelSearchBtn = v136; CCMenuItemSpriteExtra::setSizeMult(v136, 1.2); v21->addChild(v21, a1->m_cancelSearchBtn); v137 = v133; m_cancelSearchBtn = a1->m_cancelSearchBtn; getPosition = v133->getPosition; v140 = m_cancelSearchBtn->setPosition; v141 = (__int64)getPosition(v137); cocos2d::CCPoint::CCPoint(&v225, 0.0, -35.0); cocos2d::CCPoint::operator+(&v226, v141, &v225); v140(m_cancelSearchBtn, &v226); a1->m_cancelSearchBtn->setVisible(a1->m_cancelSearchBtn, 0); } if ( isControllerConnected ) { GameToolbox::addBackButton(a1, v220); GameToolbox::addRThumbScrollButton(a1); } LevelBrowserLayer::loadPage(a1, a2); p_m_fBrVertexMod = (char *)&v223[-1].m_fBrVertexMod; if ( (__int64 *)&v223[-1].m_fBrVertexMod == &qword_124B6B0 ) return 1; if ( &pthread_create ) { p_m_fTextureTop = (unsigned int *)&v223[-1].m_fTextureTop; do m_fTextureTop_low = __ldaxr(p_m_fTextureTop); while ( __stlxr(m_fTextureTop_low - 1, p_m_fTextureTop) ); } else { m_fTextureTop_low = LODWORD(v223[-1].m_fTextureTop); LODWORD(v223[-1].m_fTextureTop) = m_fTextureTop_low - 1; } if ( m_fTextureTop_low > 0 ) return 1; operator delete(p_m_fBrVertexMod); return 1; }
GD Web Decomp Icon

GD Web Decomp

Raw Source