// // LevelBrowserLayer::init from 0x10048b010 to 0x10048c901 (6385 bytes) // // 1 xrefs: // > LevelBrowserLayer::create @ 0x10048afd2 // // 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 __fastcall LevelBrowserLayer::init(LevelBrowserLayer *a1, GJSearchObject *a2) { bool m_searchIsOverlay; // al bool *p_m_isOverlay; // r13 cocos2d::CCDirector *v6; // rax cocos2d::CCTouchDispatcher *v7; // rax bool v8; // zf int v9; // eax bool v10; // r15 GJSearchObject *m_searchObject; // rdi bool v12; // al cocos2d::CCDirector *v13; // rsi const char *v14; // rax cocos2d::CCSprite *v15; // r15 cocos2d::CCSprite *v16; // r12 cocos2d::CCDirector *v17; // rax cocos2d::CCDirector *v18; // rax float v19; // xmm1_4 cocos2d::CCSprite *v20; // r15 cocos2d::CCDirector *v21; // rax cocos2d::CCDirector *v22; // rax float v23; // xmm1_4 cocos2d::CCSprite *v24; // rbx int v25; // edx int v26; // ecx int v27; // r8d int v28; // r9d __int64 v29; // r15 cocos2d::CCDirector *v30; // rax cocos2d::CCDirector *v31; // rax float v32; // xmm0_4 cocos2d::CCMenu *v33; // r12 const char *v34; // rdi const char *v35; // r15 cocos2d::CCSprite *v36; // rax CCMenuItemSpriteExtra *v37; // rax CCMenuItemSpriteExtra *m_leftArrow; // r13 cocos2d::CCDirector *v39; // rax float v40; // xmm0_4 cocos2d::CCSprite *v41; // rax cocos2d::CCNode *v42; // rbx CCMenuItemSpriteExtra *v43; // rax CCMenuItemSpriteExtra *m_rightArrow; // r15 cocos2d::CCDirector *v45; // rax float v46; // xmm0_4 cocos2d::CCSprite *v47; // r15 cocos2d::CCLabelBMFont *v48; // rax cocos2d::CCLabelBMFont *m_pageText; // r13 __int64 v50; // rax CCMenuItemSpriteExtra *v51; // rax CCMenuItemSpriteExtra *m_pageBtn; // r15 cocos2d::CCDirector *v53; // rax LoadingCircle *v54; // rax cocos2d::CCLabelBMFont *v55; // rax cocos2d::CCLabelBMFont *m_countText; // r15 cocos2d::CCDirector *v57; // rax cocos2d::CCDirector *v58; // rax float v59; // xmm1_4 cocos2d::CCLabelBMFont *v60; // rbx TextArea *m_noInternet; // rbx GJSearchObject *v62; // rax SearchType m_searchType; // ecx cocos2d::CCSprite *v64; // rbx cocos2d::CCSprite *v65; // rbx cocos2d::CCSprite *v66; // rbx cocos2d::CCSprite *v67; // rbx cocos2d::CCSprite *v68; // rbx GJSearchObject *v69; // rax cocos2d::CCMenu *v70; // rbx cocos2d::CCSprite *v71; // rax ButtonSprite *v72; // rbx CCMenuItemSpriteExtra *v73; // r15 cocos2d::CCSprite *v74; // rbx cocos2d::CCSprite *v75; // r13 CCMenuItemToggler *v76; // rax CCMenuItemToggler *m_allObjectsToggler; // rbx unsigned __int64 *v78; // r15 cocos2d::CCLabelBMFont *v79; // r15 unsigned int v80; // eax unsigned int v81; // ecx int v82; // eax cocos2d::CCMenu *v83; // r13 cocos2d::CCSprite *v84; // r15 CCMenuItemSpriteExtra *v85; // rbx cocos2d::CCDirector *v86; // rax cocos2d::CCDirector *v87; // rax float v88; // xmm1_4 GameManager *v89; // rax GJAccountManager *v90; // rax cocos2d::CCSprite *v91; // rax CCMenuItemSpriteExtra *v92; // r15 cocos2d::CCDirector *v93; // rax cocos2d::CCDirector *v94; // rax float v95; // xmm1_4 const char *v96; // rdi cocos2d::CCSprite *v97; // rbx CCMenuItemSpriteExtra *v98; // r15 unsigned __int64 *v99; // rbx int v100; // ecx cocos2d::CCMenu *v101; // r15 cocos2d::CCSprite *v102; // rbx CCMenuItemSpriteExtra *v103; // rax cocos2d::CCDirector *v104; // rax cocos2d::CCDirector *v105; // rax float v106; // xmm0_4 char v107; // r13 cocos2d::CCMenu *v108; // r15 cocos2d::CCSprite *v109; // rax CCMenuItemSpriteExtra *v110; // rbx cocos2d::CCDirector *v111; // rax cocos2d::CCDirector *v112; // rax float v113; // xmm1_4 cocos2d::CCSprite *v114; // r15 cocos2d::CCLabelBMFont *v115; // rax cocos2d::CCLabelBMFont *m_folderText; // r13 __int64 v117; // rax CCMenuItemSpriteExtra *v118; // rax CCMenuItemSpriteExtra *m_folderBtn; // rbx unsigned __int64 *v120; // r15 cocos2d::CCSprite *v121; // r15 cocos2d::CCSprite *v122; // r13 CCMenuItemSpriteExtra *v123; // rax CCMenuItemSpriteExtra *m_lastBtn; // rbx unsigned __int64 *v125; // r15 cocos2d::CCSprite *v126; // rax CCMenuItemSpriteExtra *v127; // r15 cocos2d::CCSprite *v128; // rax CCMenuItemSpriteExtra *v129; // rax CCMenuItemSpriteExtra *m_cancelSearchBtn; // rbx unsigned __int64 *v131; // r15 int v133; // eax cocos2d::CCMenu *v134; // r13 cocos2d::CCSprite *v135; // rbx void (__fastcall *v136)(LevelBrowserLayer *, cocos2d::CCObject *); // rcx CCMenuItemSpriteExtra *v137; // r15 cocos2d::CCDirector *v138; // rax cocos2d::CCDirector *v139; // rax float v140; // xmm1_4 const char *v141; // rdi cocos2d::CCSprite *v142; // rbx CCMenuItemSpriteExtra *v143; // r15 unsigned __int64 *v144; // rbx const char *v145; // rdi char v146; // bl cocos2d::CCSprite *v147; // rax void (__fastcall *v148)(LevelBrowserLayer *, cocos2d::CCObject *); // rcx CCMenuItemSpriteExtra *v149; // r15 cocos2d::CCDirector *v150; // rax float v151; // xmm1_4 __int128 v152; // [rsp+8h] [rbp-B8h] BYREF void *__p; // [rsp+18h] [rbp-A8h] GJSearchObject *v154; // [rsp+20h] [rbp-A0h] CCMenuItemSpriteExtra *v155; // [rsp+28h] [rbp-98h] CCMenuItemSpriteExtra *v156; // [rsp+30h] [rbp-90h] unsigned __int64 v157; // [rsp+38h] [rbp-88h] BYREF _BYTE v158[24]; // [rsp+40h] [rbp-80h] BYREF const cocos2d::CCPoint *v159; // [rsp+58h] [rbp-68h] bool *v160; // [rsp+60h] [rbp-60h] bool v161; // [rsp+6Fh] [rbp-51h] float v162; // [rsp+70h] [rbp-50h] BYREF float v163; // [rsp+74h] [rbp-4Ch] const cocos2d::CCPoint *v164; // [rsp+78h] [rbp-48h] float v165; // [rsp+80h] [rbp-40h] unsigned __int64 v166; // [rsp+84h] [rbp-3Ch] BYREF bool isControllerConnected; // [rsp+8Fh] [rbp-31h] unsigned __int64 v168[6]; // [rsp+90h] [rbp-30h] BYREF double v169; // 0:xmm0_8.8 double v170; // 0:xmm0_8.8 double v171; // 0:xmm0_8.8 double v172; // 0:xmm0_8.8 double v173; // 0:xmm0_8.8 double v174; // 0:xmm0_8.8 double v175; // 0:xmm0_8.8 if ( a2 ) { m_searchIsOverlay = a2->m_searchIsOverlay; p_m_isOverlay = &a1->m_isOverlay; a1->m_isOverlay = m_searchIsOverlay; if ( m_searchIsOverlay ) { v6 = cocos2d::CCDirector::sharedDirector(); v7 = (cocos2d::CCTouchDispatcher *)((__int64 (__fastcall *)(cocos2d::CCDirector *))v6->getTouchDispatcher)(v6); cocos2d::CCTouchDispatcher::registerForcePrio(v7, a1, 2); m_searchIsOverlay = a1->m_isOverlay; } } else { p_m_isOverlay = &a1->m_isOverlay; a1->m_isOverlay = 0; m_searchIsOverlay = 0; } v8 = !m_searchIsOverlay; v9 = -1778384896; if ( v8 ) v9 = 0; *(_DWORD *)v158 = v9; v10 = cocos2d::CCLayerColor::initWithColor(a1, (const cocos2d::ccColor4B *)v158); if ( v10 ) { m_searchObject = a1->m_searchObject; if ( m_searchObject != a2 ) { if ( a2 ) { cocos2d::CCObject::retain(a2); m_searchObject = a1->m_searchObject; } if ( m_searchObject ) cocos2d::CCObject::release(m_searchObject); a1->m_searchObject = a2; } v12 = *p_m_isOverlay; if ( a2 && !v12 ) { GameLevelManager::sharedState()->m_searchType = a2->m_searchType; v12 = *p_m_isOverlay; } if ( v12 ) ((void (__fastcall *)(LevelBrowserLayer *, __int64))a1->setTouchEnabled)(a1, 1); ((void (__fastcall *)(LevelBrowserLayer *, __int64))a1->setKeypadEnabled)(a1, 1); ((void (__fastcall *)(LevelBrowserLayer *, __int64))a1->setKeyboardEnabled)(a1, 1); v13 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v162); v8 = !a1->m_isOverlay; v154 = a2; v161 = v10; if ( v8 ) { v15 = cocos2d::CCSprite::create_1("GJ_gradientBG.png"); sub_10028CBE0((float *)v158, 0.0, 0.0); ((void (__fastcall *)(cocos2d::CCSprite *, _BYTE *))v15->setAnchorPoint)(v15, v158); ((void (__fastcall *)(LevelBrowserLayer *, cocos2d::CCSprite *, __int64))a1->addChild_0)(a1, v15, 4294967294LL); ((void (__fastcall *)(cocos2d::CCSprite *, float))v15->setScaleX)( v15, (float)(v162 + 10.0) / v15->m_obRect.size.width); ((void (__fastcall *)(cocos2d::CCSprite *, float))v15->setScaleY)( v15, (float)(v163 + 10.0) / v15->m_obRect.size.height); sub_10028CBE0((float *)v158, -5.0, -5.0); ((void (__fastcall *)(cocos2d::CCSprite *, _BYTE *))v15->setPosition)(v15, v158); v158[2] = -1; *(_WORD *)v158 = 26112; ((void (__fastcall *)(cocos2d::CCSprite *, _BYTE *))v15->setColor)(v15, v158); v16 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_sideArt_001.png"); sub_10028CBE0((float *)v158, 0.0, 0.0); ((void (__fastcall *)(cocos2d::CCSprite *, _BYTE *))v16->setAnchorPoint)(v16, v158); v17 = cocos2d::CCDirector::sharedDirector(); v165 = sub_100484D90((__int64)v17) + -1.0; v18 = cocos2d::CCDirector::sharedDirector(); v19 = sub_100484D80((__int64)v18) + -1.0; sub_10028CBE0((float *)v158, v165, v19); ((void (__fastcall *)(cocos2d::CCSprite *, _BYTE *))v16->setPosition)(v16, v158); ((void (__fastcall *)(LevelBrowserLayer *, cocos2d::CCSprite *, __int64))a1->addChild_0)(a1, v16, 1); v20 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_sideArt_001.png"); sub_10028CBE0((float *)v158, 1.0, 0.0); ((void (__fastcall *)(cocos2d::CCSprite *, _BYTE *))v20->setAnchorPoint)(v20, v158); v21 = cocos2d::CCDirector::sharedDirector(); v165 = sub_100484DA0((__int64)v21) + 1.0; v22 = cocos2d::CCDirector::sharedDirector(); v23 = sub_100484D80((__int64)v22) + -1.0; sub_10028CBE0((float *)v158, v165, v23); ((void (__fastcall *)(cocos2d::CCSprite *, _BYTE *))v20->setPosition)(v20, v158); cocos2d::CCSprite::setFlipX(v20, 1); v13 = (cocos2d::CCDirector *)v20; ((void (__fastcall *)(LevelBrowserLayer *, cocos2d::CCSprite *, __int64))a1->addChild_0)(a1, v20, 1); v14 = "GJ_arrow_01_001.png"; if ( a1->m_isOverlay ) v14 = "GJ_closeBtn_001.png"; } else { v14 = "GJ_closeBtn_001.png"; } v158[0] = 38; *(_OWORD *)&v158[1] = *(_OWORD *)v14; *(_DWORD *)&v158[16] = *(_DWORD *)(v14 + 15); v158[20] = 0; v24 = cocos2d::CCSprite::createWithSpriteFrameName(&v158[1]); if ( *p_m_isOverlay ) ((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCDirector *, float))v24->setScale)(v24, v13, 0.89999998); v155 = CCMenuItemSpriteExtra::create(v24, nullptr, a1, (cocos2d::SEL_MenuHandler)0x521uLL); CCMenuItemSpriteExtra::setSizeMult(v155, 1.6); v29 = sub_100792C50((_DWORD)v155, 0, v25, v26, v27, v28); ((void (__fastcall *)(LevelBrowserLayer *, __int64, __int64))a1->addChild_0)(a1, v29, 1); v30 = cocos2d::CCDirector::sharedDirector(); v165 = sub_100484D90((__int64)v30); v31 = cocos2d::CCDirector::sharedDirector(); v32 = sub_100484D70((__int64)v31); sub_10028CBE0((float *)v168, v165 + 24.0, v32 + -23.0); (*(void (__fastcall **)(__int64, unsigned __int64 *))(*(_QWORD *)v29 + 184LL))(v29, v168); isControllerConnected = PlatformToolbox::isControllerConnected(); v33 = cocos2d::CCMenu::create(); ((void (__fastcall *)(LevelBrowserLayer *, cocos2d::CCMenu *, __int64))a1->addChild_0)(a1, v33, 10); v160 = p_m_isOverlay; v165 = v163; v34 = "controllerBtn_DPad_Left_001.png"; v35 = "GJ_arrow_03_001.png"; if ( !isControllerConnected ) v34 = "GJ_arrow_03_001.png"; v36 = cocos2d::CCSprite::createWithSpriteFrameName(v34); v37 = CCMenuItemSpriteExtra::create( v36, nullptr, a1, (cocos2d::SEL_MenuHandler)(unsigned __int64)LevelBrowserLayer::onPrevPage); a1->m_leftArrow = v37; ((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))v33->addChild)(v33, v37); m_leftArrow = a1->m_leftArrow; v39 = cocos2d::CCDirector::sharedDirector(); v40 = sub_100484D90((__int64)v39); v165 = v165 * 0.5; sub_10028CBE0((float *)&v166, v40 + 24.0, v165); *(cocos2d::CCPoint *)&v169 = cocos2d::CCNode::convertToNodeSpace( (cocos2d::CCNode *)v168, (const cocos2d::CCPoint *)v33); ((void (__fastcall *)(CCMenuItemSpriteExtra *, unsigned __int64 *, double))m_leftArrow->setPosition)( m_leftArrow, v168, v169); if ( isControllerConnected ) v35 = "controllerBtn_DPad_Right_001.png"; v41 = cocos2d::CCSprite::createWithSpriteFrameName(v35); v42 = v41; if ( !isControllerConnected ) cocos2d::CCSprite::setFlipX(v41, 1); v43 = CCMenuItemSpriteExtra::create( v42, nullptr, a1, (cocos2d::SEL_MenuHandler)(unsigned __int64)LevelBrowserLayer::onNextPage); a1->m_rightArrow = v43; ((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))v33->addChild)(v33, v43); m_rightArrow = a1->m_rightArrow; v45 = cocos2d::CCDirector::sharedDirector(); v46 = sub_100484DA0((__int64)v45); sub_10028CBE0((float *)&v166, v46 + -24.0, v165); *(cocos2d::CCPoint *)&v170 = cocos2d::CCNode::convertToNodeSpace( (cocos2d::CCNode *)v168, (const cocos2d::CCPoint *)v33); ((void (__fastcall *)(CCMenuItemSpriteExtra *, unsigned __int64 *, double))m_rightArrow->setPosition)( m_rightArrow, v168, v170); v47 = cocos2d::CCSprite::create_1("GJ_button_02.png"); v48 = cocos2d::CCLabelBMFont::create_3("1", "bigFont.fnt"); a1->m_pageText = v48; ((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCLabelBMFont *, __int64))v47->addChild_0)(v47, v48, 1); m_pageText = a1->m_pageText; LODWORD(v164) = *(_DWORD *)((__int64 (__fastcall *)(cocos2d::CCSprite *))v47->getContentSize)(v47); v50 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))v47->getContentSize)(v47); sub_10028CBE0((float *)v168, *(float *)&v164 * 0.5, (float)(0.5 * *(float *)(v50 + 4)) + 1.0); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, unsigned __int64 *))m_pageText->setPosition)(m_pageText, v168); LevelBrowserLayer::updatePageLabel(a1); ((void (__fastcall *)(cocos2d::CCSprite *, float))v47->setScale)(v47, 0.69999999); v51 = CCMenuItemSpriteExtra::create( v47, nullptr, a1, (cocos2d::SEL_MenuHandler)(unsigned __int64)LevelBrowserLayer::onGoToPage); a1->m_pageBtn = v51; ((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))v33->addChild)(v33, v51); m_pageBtn = a1->m_pageBtn; v53 = cocos2d::CCDirector::sharedDirector(); *(float *)&v170 = sub_100484DA0((__int64)v53); v165 = v165 + 122.0; sub_10028CBE0((float *)&v166, (float)(*(float *)&v170 + -24.0) + 1.0, v165); *(cocos2d::CCPoint *)&v171 = cocos2d::CCNode::convertToNodeSpace( (cocos2d::CCNode *)v168, (const cocos2d::CCPoint *)v33); ((void (__fastcall *)(CCMenuItemSpriteExtra *, unsigned __int64 *, double))m_pageBtn->setPosition)( m_pageBtn, v168, v171); ((void (__fastcall *)(CCMenuItemSpriteExtra *, _QWORD))a1->m_leftArrow->setVisible)(a1->m_leftArrow, 0); ((void (__fastcall *)(CCMenuItemSpriteExtra *, _QWORD))a1->m_rightArrow->setVisible)(a1->m_rightArrow, 0); ((void (__fastcall *)(CCMenuItemSpriteExtra *, _QWORD))a1->m_pageBtn->setVisible)(a1->m_pageBtn, 0); v54 = LoadingCircle::create(); a1->m_circle = v54; v54->m_parentLayer = a1; v54->m_fade = 0; cocos2d::CCObject::retain(v54); LoadingCircle::show(a1->m_circle); ((void (__fastcall *)(LoadingCircle *, _QWORD))a1->m_circle->setVisible)(a1->m_circle, 0); v55 = cocos2d::CCLabelBMFont::create_3(" ", "goldFont.fnt"); a1->m_countText = v55; ((void (__fastcall *)(LevelBrowserLayer *, cocos2d::CCLabelBMFont *))a1->addChild)(a1, v55); m_countText = a1->m_countText; v57 = cocos2d::CCDirector::sharedDirector(); LODWORD(v164) = sub_100484DA0((__int64)v57); v58 = cocos2d::CCDirector::sharedDirector(); v59 = sub_100484D70((__int64)v58); sub_10028CBE0((float *)v168, *(float *)&v164 + -7.0, v59 + -3.0); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, unsigned __int64 *))m_countText->setPosition)(m_countText, v168); v60 = a1->m_countText; sub_10028CBE0((float *)v168, 1.0, 1.0); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, unsigned __int64 *))v60->setAnchorPoint)(v60, v168); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))a1->m_countText->setScale)(a1->m_countText, 0.60000002); __p = operator new(0x20u); *(_QWORD *)&v152 = 33; *((_QWORD *)&v152 + 1) = 31; strcpy((char *)__p, "No Internet connection!"); sub_10028CBE0((float *)v168, 0.5, 1.0); m_noInternet = (TextArea *)TextArea::create(&v152, (__int64)"bigFont.fnt", (double *)v168, 0, 1.0, 600.0, 20.0); a1->m_noInternet = m_noInternet; if ( (v152 & 1) != 0 ) { operator delete(__p); m_noInternet = a1->m_noInternet; } sub_10028CBE0((float *)v168, v162 * 0.5, (float)(v163 * 0.5) + 10.0); ((void (__fastcall *)(TextArea *, unsigned __int64 *))m_noInternet->setPosition)(m_noInternet, v168); ((void (__fastcall *)(TextArea *, float))a1->m_noInternet->setScale)(a1->m_noInternet, 0.60000002); ((void (__fastcall *)(LevelBrowserLayer *, TextArea *, __int64))a1->addChild_0)(a1, a1->m_noInternet, 2); ((void (__fastcall *)(TextArea *, _QWORD))a1->m_noInternet->setVisible)(a1->m_noInternet, 0); v62 = a1->m_searchObject; if ( v62 ) { m_searchType = v62->m_searchType; if ( (unsigned int)(m_searchType - 21) > 2 ) { switch ( m_searchType ) { case Recent|MostLiked: if ( v62->m_searchMode != 1 ) goto LABEL_39; v65 = cocos2d::CCSprite::createWithSpriteFrameName("topListsLabel_001.png"); ((void (__fastcall *)(LevelBrowserLayer *, cocos2d::CCSprite *, __int64))a1->addChild_0)(a1, v65, 2); sub_10028CBE0((float *)v168, v162 * 0.5, (float)((float)(v163 * 0.5) + 110.0) + 24.0); ((void (__fastcall *)(cocos2d::CCSprite *, unsigned __int64 *))v65->setPosition)(v65, v168); break; case FeaturedGDW: LABEL_39: v66 = cocos2d::CCSprite::createWithSpriteFrameName("featuredLabel_001.png"); ((void (__fastcall *)(LevelBrowserLayer *, cocos2d::CCSprite *, __int64))a1->addChild_0)(a1, v66, 2); sub_10028CBE0((float *)v168, v162 * 0.5, (float)((float)(v163 * 0.5) + 110.0) + 24.0); ((void (__fastcall *)(cocos2d::CCSprite *, unsigned __int64 *))v66->setPosition)(v66, v168); break; case FeaturedLite: v67 = cocos2d::CCSprite::createWithSpriteFrameName("weeklyLevelsLabel_001.png"); ((void (__fastcall *)(LevelBrowserLayer *, cocos2d::CCSprite *, __int64))a1->addChild_0)(a1, v67, 2); sub_10028CBE0((float *)v168, v162 * 0.5, (float)((float)(v163 * 0.5) + 110.0) + 24.0); ((void (__fastcall *)(cocos2d::CCSprite *, unsigned __int64 *))v67->setPosition)(v67, v168); break; case FeaturedLite|Downloaded: v68 = cocos2d::CCSprite::createWithSpriteFrameName("bonusLevelsLabel_001.png"); ((void (__fastcall *)(LevelBrowserLayer *, cocos2d::CCSprite *, __int64))a1->addChild_0)(a1, v68, 2); sub_10028CBE0((float *)v168, v162 * 0.5, (float)((float)(v163 * 0.5) + 110.0) + 24.0); ((void (__fastcall *)(cocos2d::CCSprite *, unsigned __int64 *))v68->setPosition)(v68, v168); break; default: break; } } else { v64 = cocos2d::CCSprite::createWithSpriteFrameName("theSafeLabel_001.png"); ((void (__fastcall *)(LevelBrowserLayer *, cocos2d::CCSprite *, __int64))a1->addChild_0)(a1, v64, 2); sub_10028CBE0((float *)v168, (float)(v162 * 0.5) + 13.0, (float)((float)(v163 * 0.5) + 110.0) + 24.0); ((void (__fastcall *)(cocos2d::CCSprite *, unsigned __int64 *))v64->setPosition)(v64, v168); } v69 = a1->m_searchObject; if ( v69 ) { if ( (unsigned int)(v69->m_searchType - 98) > 2 ) goto LABEL_46; if ( v69->m_searchIsOverlay ) goto LABEL_46; v70 = cocos2d::CCMenu::create(); ((void (__fastcall *)(LevelBrowserLayer *, cocos2d::CCMenu *, __int64))a1->addChild_0)(a1, v70, 2); v164 = (const cocos2d::CCPoint *)v70; v71 = cocos2d::CCSprite::createWithSpriteFrameName("edit_delBtn_001.png"); v72 = ButtonSprite::create(v71, 34, 0, 36.0, 1.0, 1, "GJ_button_04.png", 0); ((void (__fastcall *)(ButtonSprite *, float))v72->setScale)(v72, 0.40000001); v73 = CCMenuItemSpriteExtra::create( v72, nullptr, a1, (cocos2d::SEL_MenuHandler)(unsigned __int64)LevelBrowserLayer::onDeleteSelected); (*(void (__fastcall **)(const cocos2d::CCPoint *, CCMenuItemSpriteExtra *))(*(_QWORD *)v164 + 440LL))(v164, v73); sub_10028CBE0((float *)v168, (float)(v162 * 0.5) + -145.0, (float)(v163 * 0.5) + -122.0); *(cocos2d::CCPoint *)&v172 = cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)&v166, v164); ((void (__fastcall *)(CCMenuItemSpriteExtra *, unsigned __int64 *, double))v73->setPosition)(v73, &v166, v172); v74 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_checkOn_001.png"); v75 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_checkOff_001.png"); ((void (__fastcall *)(cocos2d::CCSprite *, float))v74->setScale)(v74, 0.5); ((void (__fastcall *)(cocos2d::CCSprite *, float))v75->setScale)(v75, 0.5); v76 = CCMenuItemToggler::create( v75, v74, a1, (cocos2d::SEL_MenuHandler)(unsigned __int64)LevelBrowserLayer::onToggleAllObjects); a1->m_allObjectsToggler = v76; (*(void (__fastcall **)(const cocos2d::CCPoint *, CCMenuItemToggler *))(*(_QWORD *)v164 + 440LL))(v164, v76); m_allObjectsToggler = a1->m_allObjectsToggler; v78 = (unsigned __int64 *)((__int64 (__fastcall *)(CCMenuItemSpriteExtra *))v73->getPosition)(v73); sub_10028CBE0((float *)&v157, 26.0, 0.0); sub_10028CCE0((double *)&v166, v78, &v157); ((void (__fastcall *)(CCMenuItemToggler *, unsigned __int64 *))m_allObjectsToggler->setPosition)( m_allObjectsToggler, &v166); CCMenuItemToggler::setSizeMult(a1->m_allObjectsToggler, 1.1); v79 = cocos2d::CCLabelBMFont::create_3("All", "bigFont.fnt"); ((void (__fastcall *)(LevelBrowserLayer *, cocos2d::CCLabelBMFont *, __int64))a1->addChild_0)(a1, v79, 10); sub_10028CBE0((float *)&v157, 55.0, 0.0); sub_10028CCE0((double *)&v166, v168, &v157); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, unsigned __int64 *))v79->setPosition)(v79, &v166); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v79->setScale)(v79, 0.40000001); v69 = a1->m_searchObject; if ( v69 ) { LABEL_46: v80 = v69->m_searchType; v81 = v80 - 98; if ( v80 - 98 <= 5 ) { v82 = 25; if ( _bittest(&v82, v81) ) { v83 = cocos2d::CCMenu::create(); ((void (__fastcall *)(LevelBrowserLayer *, cocos2d::CCMenu *, __int64))a1->addChild_0)(a1, v83, 2); v84 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_newBtn_001.png"); v85 = CCMenuItemSpriteExtra::create( v84, nullptr, a1, (cocos2d::SEL_MenuHandler)(unsigned __int64)LevelBrowserLayer::onNew); ((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))v83->addChild)(v83, v85); v156 = v85; sub_10028CBE0((float *)v168, v162 * 0.5, (float)((float)(v163 + -220.0) * 0.5) + -4.0); ((void (__fastcall *)(cocos2d::CCMenu *, unsigned __int64 *))v83->setPosition)(v83, v168); *(float *)&v164 = v84->m_obRect.size.width; v86 = cocos2d::CCDirector::sharedDirector(); LODWORD(v159) = sub_100484DA0((__int64)v86); v87 = cocos2d::CCDirector::sharedDirector(); v88 = sub_100484D80((__int64)v87); *(float *)&v164 = (float)(*(float *)&v164 * 0.5) + 4.0; sub_10028CBE0((float *)v168, *(float *)&v159 - *(float *)&v164, v88 + *(float *)&v164); ((void (__fastcall *)(cocos2d::CCMenu *, unsigned __int64 *))v83->setPosition)(v83, v168); if ( !*v160 ) { v89 = GameManager::sharedState(); if ( v89->m_playerUserID.random != v89->m_playerUserID.seed || (v90 = GJAccountManager::sharedState(), v90->m_accountID != v90->m_unkInt1) ) { v91 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_myServerBtn_001.png"); v92 = CCMenuItemSpriteExtra::create( v91, nullptr, a1, (cocos2d::SEL_MenuHandler)(unsigned __int64)LevelBrowserLayer::onMyOnlineLevels); ((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))v83->addChild)(v83, v92); v93 = cocos2d::CCDirector::sharedDirector(); LODWORD(v160) = sub_100484D90((__int64)v93); v94 = cocos2d::CCDirector::sharedDirector(); v95 = sub_100484D80((__int64)v94); sub_10028CBE0((float *)&v166, *(float *)&v160 + *(float *)&v164, v95 + *(float *)&v164); *(cocos2d::CCPoint *)&v173 = cocos2d::CCNode::convertToNodeSpace( (cocos2d::CCNode *)v168, (const cocos2d::CCPoint *)v83); ((void (__fastcall *)(CCMenuItemSpriteExtra *, unsigned __int64 *, double))v92->setPosition)( v92, v168, v173); } v96 = "GJ_viewLevelsBtn_001.png"; if ( a1->m_searchObject->m_searchType == MyLevels ) v96 = "GJ_viewListsBtn_001.png"; v97 = cocos2d::CCSprite::createWithSpriteFrameName(v96); ((void (__fastcall *)(cocos2d::CCSprite *, float))v97->setScale)(v97, 0.80000001); v98 = CCMenuItemSpriteExtra::create( v97, nullptr, a1, (cocos2d::SEL_MenuHandler)(unsigned __int64)LevelBrowserLayer::onLocalMode); ((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))v83->addChild)(v83, v98); v99 = (unsigned __int64 *)((__int64 (__fastcall *)(CCMenuItemSpriteExtra *))v156->getPosition)(v156); sub_10028CBE0((float *)&v166, 2.0, 52.0); sub_10028CCE0((double *)v168, v99, &v166); ((void (__fastcall *)(CCMenuItemSpriteExtra *, unsigned __int64 *))v98->setPosition)(v98, v168); } goto LABEL_60; } v133 = 34; if ( _bittest(&v133, v81) ) LOBYTE(v160) = v154->m_searchType == FavouriteLists; else LOBYTE(v160) = 1; v134 = cocos2d::CCMenu::create(); ((void (__fastcall *)(LevelBrowserLayer *, cocos2d::CCMenu *, __int64))a1->addChild_0)(a1, v134, 2); v135 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_deleteBtn_001.png"); v136 = LevelBrowserLayer::onDeleteAll; if ( (_BYTE)v160 ) v136 = LevelBrowserLayer::onRemoveAllFavorites; v137 = CCMenuItemSpriteExtra::create(v135, nullptr, a1, (cocos2d::SEL_MenuHandler)(unsigned __int64)v136); ((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))v134->addChild)(v134, v137); v156 = v137; *(float *)&v164 = v135->m_obRect.size.width; v138 = cocos2d::CCDirector::sharedDirector(); LODWORD(v159) = sub_100484DA0((__int64)v138); v139 = cocos2d::CCDirector::sharedDirector(); v140 = sub_100484D80((__int64)v139); *(float *)&v164 = (float)(*(float *)&v164 * 0.5) + 4.0; sub_10028CBE0((float *)v168, *(float *)&v159 - *(float *)&v164, v140 + *(float *)&v164); ((void (__fastcall *)(cocos2d::CCMenu *, unsigned __int64 *))v134->setPosition)(v134, v168); v141 = "GJ_viewListsBtn_001.png"; if ( a1->m_searchObject->m_searchType == FavouriteLists ) v141 = "GJ_viewLevelsBtn_001.png"; v142 = cocos2d::CCSprite::createWithSpriteFrameName(v141); ((void (__fastcall *)(cocos2d::CCSprite *, float))v142->setScale)(v142, 0.80000001); v143 = CCMenuItemSpriteExtra::create( v142, nullptr, a1, (cocos2d::SEL_MenuHandler)(unsigned __int64)LevelBrowserLayer::onSavedMode); ((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))v134->addChild)(v134, v143); v144 = (unsigned __int64 *)((__int64 (__fastcall *)(CCMenuItemSpriteExtra *))v156->getPosition)(v156); v159 = (const cocos2d::CCPoint *)v134; sub_10028CBE0((float *)&v166, 2.0, 52.0); sub_10028CCE0((double *)v168, v144, &v166); ((void (__fastcall *)(CCMenuItemSpriteExtra *, unsigned __int64 *))v143->setPosition)(v143, v168); v107 = 1; if ( a1->m_searchObject->m_searchType != FavouriteLists ) { v145 = "gj_heartOn_001.png"; v146 = (char)v160; if ( (_BYTE)v160 ) v145 = "gj_heartOff_001.png"; v147 = cocos2d::CCSprite::createWithSpriteFrameName(v145); v148 = LevelBrowserLayer::onFavorites; if ( v146 ) v148 = LevelBrowserLayer::onSaved; v149 = CCMenuItemSpriteExtra::create(v147, nullptr, a1, (cocos2d::SEL_MenuHandler)(unsigned __int64)v148); CCMenuItemSpriteExtra::setSizeMult(v149, 1.1); (*(void (__fastcall **)(const cocos2d::CCPoint *, CCMenuItemSpriteExtra *, __int64))(*(_QWORD *)v159 + 448LL))( v159, v149, 100); v150 = cocos2d::CCDirector::sharedDirector(); v151 = sub_100484D80((__int64)v150); sub_10028CBE0((float *)&v166, *(float *)&v164, (float)(v151 + *(float *)&v164) + 50.0); *(cocos2d::CCPoint *)&v175 = cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v168, v159); ((void (__fastcall *)(CCMenuItemSpriteExtra *, unsigned __int64 *, double))v149->setPosition)( v149, v168, v175); } LABEL_59: v108 = cocos2d::CCMenu::create(); ((void (__fastcall *)(LevelBrowserLayer *, cocos2d::CCMenu *, __int64))a1->addChild_0)(a1, v108, 2); v109 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_infoIcon_001.png"); v110 = CCMenuItemSpriteExtra::create( v109, nullptr, a1, (cocos2d::SEL_MenuHandler)(unsigned __int64)LevelBrowserLayer::onInfo); CCMenuItemSpriteExtra::setSizeMult(v110, 2.0); ((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))v108->addChild)(v108, v110); v111 = cocos2d::CCDirector::sharedDirector(); LODWORD(v164) = sub_100484D90((__int64)v111); v112 = cocos2d::CCDirector::sharedDirector(); v113 = sub_100484D80((__int64)v112); sub_10028CBE0((float *)v168, *(float *)&v164 + 30.0, v113 + 30.0); ((void (__fastcall *)(cocos2d::CCMenu *, unsigned __int64 *))v108->setPosition)(v108, v168); if ( !v107 ) { LABEL_63: if ( isControllerConnected ) { GameToolbox::addBackButton(a1, v155); GameToolbox::addRThumbScrollButton(a1); } LevelBrowserLayer::loadPage(a1, v154); if ( (v158[0] & 1) != 0 ) operator delete(*(void **)&v158[16]); return v161; } LABEL_60: if ( GJSearchObject::isLevelSearchObject(a1->m_searchObject) ) { v114 = cocos2d::CCSprite::createWithSpriteFrameName("gj_folderBtn_001.png"); v115 = cocos2d::CCLabelBMFont::create_3("0", "bigFont.fnt"); a1->m_folderText = v115; ((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCLabelBMFont *, __int64))v114->addChild_0)( v114, v115, 1); m_folderText = a1->m_folderText; LODWORD(v164) = *(_DWORD *)((__int64 (__fastcall *)(cocos2d::CCSprite *))v114->getContentSize)(v114); v117 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))v114->getContentSize)(v114); sub_10028CBE0((float *)v168, *(float *)&v164 * 0.5, (float)(*(float *)(v117 + 4) * 0.5) + 0.5); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, unsigned __int64 *))m_folderText->setPosition)( m_folderText, v168); v118 = CCMenuItemSpriteExtra::create( v114, nullptr, a1, (cocos2d::SEL_MenuHandler)(unsigned __int64)LevelBrowserLayer::onGoToFolder); a1->m_folderBtn = v118; ((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))v33->addChild)(v33, v118); m_folderBtn = a1->m_folderBtn; v120 = (unsigned __int64 *)((__int64 (__fastcall *)(CCMenuItemSpriteExtra *))a1->m_pageBtn->getPosition)(a1->m_pageBtn); sub_10028CBE0((float *)&v166, 0.0, -35.0); sub_10028CCE0((double *)v168, v120, &v166); ((void (__fastcall *)(CCMenuItemSpriteExtra *, unsigned __int64 *))m_folderBtn->setPosition)( m_folderBtn, v168); } v121 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_02_001.png"); ((void (__fastcall *)(cocos2d::CCSprite *, float))v121->setScale)(v121, 0.40000001); v122 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_02_001.png"); ((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCSprite *, __int64))v121->addChild_0)(v121, v122, 1); cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)&v166, (const cocos2d::CCPoint *)v121); sub_10028CBE0((float *)&v157, 15.0, 0.0); sub_10028CCE0((double *)v168, &v166, &v157); ((void (__fastcall *)(cocos2d::CCSprite *, unsigned __int64 *))v122->setPosition)(v122, v168); cocos2d::CCSprite::setFlipX(v122, 1); cocos2d::CCSprite::setFlipX(v121, 1); v123 = CCMenuItemSpriteExtra::create( v121, nullptr, a1, (cocos2d::SEL_MenuHandler)(unsigned __int64)LevelBrowserLayer::onGoToLastPage); a1->m_lastBtn = v123; CCMenuItemSpriteExtra::setSizeMult(v123, 1.2); ((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))v33->addChild)(v33, a1->m_lastBtn); m_lastBtn = a1->m_lastBtn; v125 = (unsigned __int64 *)((__int64 (__fastcall *)(CCMenuItemSpriteExtra *))a1->m_pageBtn->getPosition)(a1->m_pageBtn); sub_10028CBE0((float *)&v166, -2.0, -65.0); sub_10028CCE0((double *)v168, v125, &v166); ((void (__fastcall *)(CCMenuItemSpriteExtra *, unsigned __int64 *))m_lastBtn->setPosition)(m_lastBtn, v168); v126 = cocos2d::CCSprite::createWithSpriteFrameName("gj_findBtn_001.png"); v127 = CCMenuItemSpriteExtra::create( v126, nullptr, a1, (cocos2d::SEL_MenuHandler)(unsigned __int64)LevelBrowserLayer::onSearch); ((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))v33->addChild)(v33, v127); sub_10028CBE0((float *)&v166, 24.0, v165 + -30.0); *(cocos2d::CCPoint *)&v174 = cocos2d::CCNode::convertToNodeSpace( (cocos2d::CCNode *)v168, (const cocos2d::CCPoint *)v33); ((void (__fastcall *)(CCMenuItemSpriteExtra *, unsigned __int64 *, double))v127->setPosition)( v127, v168, v174); v128 = cocos2d::CCSprite::createWithSpriteFrameName("gj_findBtnOff_001.png"); v129 = CCMenuItemSpriteExtra::create( v128, nullptr, a1, (cocos2d::SEL_MenuHandler)(unsigned __int64)LevelBrowserLayer::onClearSearch); a1->m_cancelSearchBtn = v129; ((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))v33->addChild)(v33, v129); m_cancelSearchBtn = a1->m_cancelSearchBtn; v131 = (unsigned __int64 *)((__int64 (__fastcall *)(CCMenuItemSpriteExtra *))v127->getPosition)(v127); sub_10028CBE0((float *)&v166, 0.0, -35.0); sub_10028CCE0((double *)v168, v131, &v166); ((void (__fastcall *)(CCMenuItemSpriteExtra *, unsigned __int64 *))m_cancelSearchBtn->setPosition)( m_cancelSearchBtn, v168); ((void (__fastcall *)(CCMenuItemSpriteExtra *, _QWORD))a1->m_cancelSearchBtn->setVisible)( a1->m_cancelSearchBtn, 0); goto LABEL_63; } if ( v80 > 0xE || (v100 = 17920, !_bittest(&v100, v80)) ) { v101 = cocos2d::CCMenu::create(); ((void (__fastcall *)(LevelBrowserLayer *, cocos2d::CCMenu *, __int64))a1->addChild_0)(a1, v101, 2); v102 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_updateBtn_001.png"); v103 = CCMenuItemSpriteExtra::create( v102, nullptr, a1, (cocos2d::SEL_MenuHandler)(unsigned __int64)LevelBrowserLayer::onRefresh); a1->m_refreshBtn = v103; ((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))v101->addChild)(v101, v103); ((void (__fastcall *)(CCMenuItemSpriteExtra *, _QWORD))a1->m_refreshBtn->setVisible)(a1->m_refreshBtn, 0); *(float *)&v164 = v102->m_obRect.size.width; v104 = cocos2d::CCDirector::sharedDirector(); LODWORD(v160) = sub_100484DA0((__int64)v104); v105 = cocos2d::CCDirector::sharedDirector(); v106 = sub_100484D80((__int64)v105); sub_10028CBE0( (float *)v168, *(float *)&v160 - (float)((float)(*(float *)&v164 * 0.5) + 4.0), (float)((float)(*(float *)&v164 * 0.5) + 4.0) + v106); ((void (__fastcall *)(cocos2d::CCMenu *, unsigned __int64 *))v101->setPosition)(v101, v168); } } } } v107 = 0; goto LABEL_59; } return v10; }
GD Web Decomp Icon

GD Web Decomp

Raw Source