// // LevelSearchLayer::init from 0x6d1358 to 0x6d2fb4 (7260 bytes) // // 2 xrefs: // > LevelSearchLayer::create @ 0x6d30c4 // > @ 0x7a3a0 // // 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 LevelSearchLayer::init(LevelSearchLayer *a1, int a2) { GameManager *v5; // x0 LevelSearchLayer_vtbl *v6; // x2 cocos2d::CCDictionary *v7; // x0 cocos2d::CCDirector *v8; // x0 const char *v9; // x1 cocos2d::CCNode *v10; // x19 void (__fastcall *setAnchorPoint)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x23 void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x22 int (__fastcall *getTag)(const cocos2d::CCObject *__hidden); // x2 cocos2d::CCSprite *v14; // x20 void (__fastcall *v15)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x22 void (__fastcall *v16)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x22 cocos2d::CCDirector *v17; // x0 float v18; // s0 float v19; // s9 cocos2d::CCDirector *v20; // x0 float v21; // s0 cocos2d::CCSprite *v22; // x19 void (__fastcall *v23)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x20 void (__fastcall *v24)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x20 cocos2d::CCDirector *v25; // x0 float v26; // s0 float v27; // s9 cocos2d::CCDirector *v28; // x0 float v29; // s0 cocos2d::CCMenu *v30; // x19 cocos2d::CCDirector *v31; // x0 float v32; // s0 float v33; // s8 cocos2d::CCDirector *v34; // x0 float v35; // s0 cocos2d::CCSprite *v36; // x20 CCMenuItemSpriteExtra *v37; // x20 void (__fastcall *v38)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x21 cocos2d::CCSprite *v39; // x22 CCMenuItemSpriteExtra *v40; // x21 CCMenuItemSpriteExtra *v41; // x0 const cocos2d::CCPoint *(__fastcall *getPosition)(cocos2d::CCNode *__hidden); // x1 void (__fastcall *v43)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x20 __int64 v44; // x22 const char *v45; // x0 cocos2d::CCSprite *v46; // x23 CCMenuItemSpriteExtra *v47; // x23 void (__fastcall *v48)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x19 __int64 v49; // x21 cocos2d::CCNode *v50; // x21 int (__fastcall *v51)(const cocos2d::CCObject *__hidden); // x2 cocos2d::CCNode *v52; // x19 void (__fastcall *v53)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x21 int (__fastcall *v54)(const cocos2d::CCObject *__hidden); // x2 char *v55; // x1 CCTextInputNode *v56; // x0 LevelSearchLayer_vtbl *v57; // x3 CCTextInputNode *m_searchInput; // x19 void (__fastcall *v59)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x21 cocos2d::CCTextFieldTTF *m_textField; // x19 void (__fastcall *v61)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x21 cocos2d::CCLabelBMFont *m_textLabel; // x19 void (__fastcall *v63)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // x21 CCTextInputNode *v64; // x19 void *v65; // x0 cocos2d::CCMenu *v66; // x19 cocos2d::CCSprite *v67; // x0 CCMenuItemSpriteExtra *v68; // x21 void (__fastcall *v69)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x22 cocos2d::CCSprite *v70; // x0 CCMenuItemSpriteExtra *v71; // x21 void (__fastcall *v72)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x22 cocos2d::CCSprite *v73; // x0 CCMenuItemSpriteExtra *v74; // x21 void (__fastcall *v75)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x22 cocos2d::CCLabelBMFont *v76; // x19 void (__fastcall *v77)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x20 cocos2d::CCNode *v78; // x19 int (__fastcall *v79)(const cocos2d::CCObject *__hidden); // x2 cocos2d::CCMenu *v80; // x19 SearchButton *v81; // x0 SearchButton *v82; // x0 SearchButton *v83; // x0 cocos2d::CCSprite *m_icon; // x21 cocos2d::CCNode *v85; // x22 void (__fastcall *v86)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x23 __int64 v87; // x24 CCMenuItemSpriteExtra *v88; // x23 SearchButton *v89; // x0 CCMenuItemSpriteExtra *v90; // x24 SearchButton *v91; // x0 SearchButton *v92; // x0 SearchButton *v93; // x0 SearchButton *v94; // x0 SearchButton *v95; // x0 CCMenuItemSpriteExtra *v96; // x22 void (__fastcall *v97)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x21 void (__fastcall *v98)(char *, cocos2d::CCRect *); // x21 void (__fastcall *v99)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x21 void (__fastcall *v100)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x21 void (__fastcall *v101)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x21 void (__fastcall *v102)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x21 void (__fastcall *v103)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x21 void (__fastcall *v104)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x21 void (__fastcall *v105)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x21 GJAccountManager *v106; // x0 cocos2d::CCLabelBMFont *v107; // x19 void (__fastcall *v108)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x20 cocos2d::CCNode *v109; // x19 int (__fastcall *v110)(const cocos2d::CCObject *__hidden); // x2 cocos2d::CCArray *v111; // x0 cocos2d::CCArray *v112; // x0 cocos2d::CCArray *v113; // x0 cocos2d::CCArray *v114; // x25 cocos2d::CCMenu *v115; // x19 int v116; // w24 unsigned int v117; // w21 cocos2d::CCString *i; // x0 const char *CString; // x0 cocos2d::CCSprite *v120; // x20 void (__fastcall *v121)(cocos2d::CCSprite *__hidden, const cocos2d::ccColor3B *); // x2 CCMenuItemSpriteExtra *v122; // x22 unsigned int j; // w20 cocos2d::CCArray *v124; // x0 CCMenuItemSpriteExtra *v125; // x0 cocos2d::CCSprite *v126; // x0 CCMenuItemSpriteExtra *v127; // x0 cocos2d::CCMenu_vtbl *v128; // x2 CCMenuItemSpriteExtra *m_demonTypeButton; // x20 cocos2d::CCNode *v130; // x0 void (__fastcall *v131)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x19 cocos2d::CCNode *v132; // x19 int (__fastcall *v133)(const cocos2d::CCObject *__hidden); // x2 cocos2d::CCArray *v134; // x0 cocos2d::CCArray *v135; // x0 cocos2d::CCMenu *v136; // x19 cocos2d::CCSprite *v137; // x0 CCMenuItemSpriteExtra *v138; // x20 int v139; // w1 unsigned int k; // w21 cocos2d::CCLabelBMFont *v141; // x20 void *v142; // x0 void (__fastcall *v143)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::ccColor3B *); // x2 CCMenuItemSpriteExtra *v144; // x20 cocos2d::CCSprite *v145; // x0 CCMenuItemSpriteExtra *v146; // x20 unsigned int m; // w20 cocos2d::CCArray *v148; // x0 CCMenuItemSpriteExtra *v149; // x0 cocos2d::CCSprite *v150; // x0 CCMenuItemSpriteExtra *v151; // x20 cocos2d::CCNode *v152; // x19 void (__fastcall *v153)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x21 cocos2d::CCDirector *v154; // x0 float v155; // s0 float v156; // s8 cocos2d::CCDirector *v157; // x0 float v158; // s0 int n; // w19 GameLevelManager *v160; // x0 bool DiffVal; // w0 int ii; // w19 GameLevelManager *v163; // x0 bool LenVal; // w0 GameLevelManager *v165; // x0 bool BoolForKey; // w0 char v167; // w2 cocos2d::CCSprite *m_starsSprite; // x0 void (__fastcall *v169)(cocos2d::CCSprite *__hidden, const cocos2d::ccColor3B *); // x3 cocos2d::CCDictionary *m_difficultyDict; // x19 char *DiffKey; // x0 cocos2d::CCString *v172; // x0 _BOOL4 v173; // w19 void *v174; // x0 void (__fastcall *demonFilterSelectClosed)(LevelSearchLayer *__hidden, int); // x19 GameLevelManager *v176; // x0 unsigned int IntForKey; // w0 TextArea **p_m_textArea; // x19 unsigned int *p_m_kerningAmount; // x20 int m_kerningAmount; // w0 unsigned int *v181; // x1 int v182; // w2 SearchButton *v183; // x0 CCMenuItemSpriteExtra *v184; // x21 void (__fastcall *v185)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x19 void (__fastcall *setColor)(cocos2d::CCSprite *__hidden, const cocos2d::ccColor3B *); // x3 unsigned int *v187; // x1 int v188; // w2 unsigned int *v189; // x1 int v190; // w2 CCMenuItemSpriteExtra *v191; // [xsp+A0h] [xbp+A0h] CCMenuItemSpriteExtra *v192; // [xsp+A8h] [xbp+A8h] CCMenuItemSpriteExtra *v193; // [xsp+B0h] [xbp+B0h] CCMenuItemSpriteExtra *v194; // [xsp+C0h] [xbp+C0h] bool v195; // [xsp+DFh] [xbp+DFh] char *v196; // [xsp+E0h] [xbp+E0h] CCMenuItemSpriteExtra *v197; // [xsp+E8h] [xbp+E8h] float v198; // [xsp+108h] [xbp+108h] float v199; // [xsp+10Ch] [xbp+10Ch] cocos2d::CCPoint v200; // [xsp+110h] [xbp+110h] BYREF cocos2d::CCPoint v201; // [xsp+118h] [xbp+118h] BYREF cocos2d::CCSize v202; // [xsp+120h] [xbp+120h] BYREF cocos2d::CCSize v203; // [xsp+128h] [xbp+128h] BYREF CCTextInputNode *v204; // [xsp+130h] [xbp+130h] BYREF __int64 v205; // [xsp+138h] [xbp+138h] BYREF cocos2d::CCPoint v206; // [xsp+140h] [xbp+140h] BYREF char v207[8]; // [xsp+148h] [xbp+148h] BYREF cocos2d::CCPoint v208; // [xsp+150h] [xbp+150h] BYREF cocos2d::CCPoint v209; // [xsp+158h] [xbp+158h] BYREF cocos2d::CCPoint v210; // [xsp+160h] [xbp+160h] BYREF cocos2d::CCRect v211; // [xsp+168h] [xbp+168h] BYREF cocos2d::CCRect v212; // [xsp+178h] [xbp+178h] BYREF cocos2d::CCPoint v213; // 0:kr08_8.8 cocos2d::CCPoint v214; // 0:kr10_8.8 cocos2d::CCPoint v215; // 0:kr18_8.8 cocos2d::CCPoint v216; // 0:kr20_8.8 cocos2d::SEL_MenuHandler v217; // 0:x2.16 cocos2d::SEL_MenuHandler v218; // 0:x2.16 cocos2d::SEL_MenuHandler v219; // 0:x2.16 cocos2d::SEL_MenuHandler v220; // 0:x2.16 cocos2d::SEL_MenuHandler v221; // 0:x2.16 cocos2d::SEL_MenuHandler v222; // 0:x2.16 cocos2d::SEL_MenuHandler v223; // 0:x2.16 cocos2d::SEL_MenuHandler v224; // 0:x2.16 cocos2d::SEL_MenuHandler v225; // 0:x2.16 cocos2d::SEL_MenuHandler v226; // 0:x2.16 cocos2d::SEL_MenuHandler v227; // 0:x2.16 cocos2d::SEL_MenuHandler v228; // 0:x2.16 cocos2d::SEL_MenuHandler v229; // 0:x2.16 cocos2d::SEL_MenuHandler v230; // 0:x2.16 cocos2d::SEL_MenuHandler v231; // 0:x2.16 cocos2d::SEL_MenuHandler v232; // 0:x2.16 cocos2d::SEL_MenuHandler v233; // 0:x2.16 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::CCPoint v239; // 0:s1.4,4:s2.4 cocos2d::CCPoint v240; // 0:s1.4,4:s2.4 cocos2d::CCRect v241; // 0:s0.4,4:s1.4,8:s2.4,12:s3.4 cocos2d::CCRect v242; // 0:s0.4,4:s1.4,8:s2.4,12:s3.4 cocos2d::CCRect v243; // 0:s0.4,4:s1.4,8:s2.4,12:s3.4 cocos2d::CCRect v244; // 0:s0.4,4:s1.4,8:s2.4,12:s3.4 cocos2d::CCRect v245; // 0:s0.4,4:s1.4,8:s2.4,12:s3.4 v195 = cocos2d::CCLayer::init(a1); if ( !v195 ) return v195; GameManager::sharedState()->m_currentLevelID = -1; GameManager::sharedState()->m_sceneEnum = 4; a1->m_type = a2; v5 = GameManager::sharedState(); v6 = a1->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v5->m_levelSearchType = a2; v6->setKeypadEnabled(a1, 1); a1->setKeyboardEnabled(a1, 1); v7 = cocos2d::CCDictionary::create(); a1->m_difficultyDict = v7; cocos2d::CCObject::retain(v7); v8 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize(v8); v10 = (cocos2d::CCNode *)cocos2d::CCSprite::create((cocos2d::CCSprite *)"GJ_gradientBG.png", v9); setAnchorPoint = v10->setAnchorPoint; cocos2d::CCPoint::CCPoint(&v212.origin, 0.0, 0.0); setAnchorPoint(v10, &v212.origin); a1->addChild_0(a1, v10, -3); v10->setScaleX(v10, (float)(v198 + 10.0) / v10[1].m_obContentSize.height); v10->setScaleY(v10, (float)(v199 + 10.0) / v10[1].m_sAdditionalTransform.a); setPosition = v10->setPosition; cocos2d::CCPoint::CCPoint(&v212.origin, -5.0, -5.0); setPosition(v10, &v212.origin); getTag = v10->__vftable[1].getTag; BYTE2(v212.origin.x) = -1; LOWORD(v212.origin.x) = 26112; ((void (__fastcall *)(cocos2d::CCNode *, cocos2d::CCRect *))getTag)(v10, &v212); v14 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_sideArt_001.png"); v15 = v14->setAnchorPoint; cocos2d::CCPoint::CCPoint(&v212.origin, 0.0, 0.0); v15(v14, &v212.origin); v16 = v14->setPosition; v17 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getScreenLeft(v17); v19 = v18; v20 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getScreenBottom(v20); cocos2d::CCPoint::CCPoint(&v212.origin, v19 - 1.0, v21 - 1.0); v16(v14, &v212.origin); a1->addChild_0(a1, v14, 1); v22 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_sideArt_001.png"); v23 = v22->setAnchorPoint; cocos2d::CCPoint::CCPoint(&v212.origin, 1.0, 0.0); v23(v22, &v212.origin); v24 = v22->setPosition; v25 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getScreenRight(v25); v27 = v26; v28 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getScreenBottom(v28); cocos2d::CCPoint::CCPoint(&v212.origin, v27 + 1.0, v29 - 1.0); v24(v22, &v212.origin); cocos2d::CCSprite::setFlipX(v22, 1); a1->addChild_0(a1, v22, 1); cocos2d::CCRect::CCRect(&v211, 0.0, 0.0, 80.0, 80.0); v30 = cocos2d::CCMenu::create(); a1->addChild_0(a1, v30, 2); v31 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getScreenRight(v31); v33 = v32; v34 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getScreenTop(v34); cocos2d::CCPoint::CCPoint(&v200, v33 - 25.0, v35 - 25.0); v36 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_closeBtn_001.png"); v36->setScale(v36, 0.8); v217.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v217.adj = (size_t)LevelSearchLayer::confirmClearFilters; v37 = CCMenuItemSpriteExtra::create(v36, nullptr, v217); v30->addChild(v30, v37); v38 = v37->setPosition; v213 = cocos2d::CCNode::convertToNodeSpace(v30, &v200); ((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCRect *, float, float))v38)(v37, &v212, v213.x, v213.y); v39 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_plusBtn_001.png"); v39->setScale(v39, 0.8); v218.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v218.adj = (size_t)LevelSearchLayer::onMoreOptions; v40 = CCMenuItemSpriteExtra::create(v39, nullptr, v218); v30->addChild(v30, v40); CCMenuItemSpriteExtra::setSizeMult(v40, 1.5); if ( a1->m_type == 1 ) { setColor = v39->setColor; memset(&v212, 125, 3); setColor(v39, (const cocos2d::ccColor3B *)&v212); v40->setEnabled(v40, 0); } v41 = v37; getPosition = v37->getPosition; v43 = v40->setPosition; v44 = (__int64)getPosition(v41); cocos2d::CCPoint::CCPoint(&v210, 0.0, -50.0); cocos2d::CCPoint::operator+(&v212, v44, &v210); v43(v40, &v212.origin); if ( a1->m_type ) v45 = "GJ_viewLevelsBtn_001.png"; else v45 = "GJ_viewListsBtn_001.png"; v46 = cocos2d::CCSprite::createWithSpriteFrameName(v45); v46->setScale(v46, 0.8); v219.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v219.adj = (size_t)LevelSearchLayer::onSearchMode; v47 = CCMenuItemSpriteExtra::create(v46, nullptr, v219); v30->addChild(v30, v47); v48 = v47->setPosition; v49 = (__int64)v40->getPosition(v40); cocos2d::CCPoint::CCPoint(&v210, 0.0, -50.0); cocos2d::CCPoint::operator+(&v212, v49, &v210); v48(v47, &v212.origin); cocos2d::CCPoint::CCPoint(&v201, v198 * 0.5, (float)(v199 * 0.5) + 130.0); cocos2d::CCRect::CCRect(&v212, &v211); v50 = (cocos2d::CCNode *)cocos2d::extension::CCScale9Sprite::create( (cocos2d::extension::CCScale9Sprite *)"square02b_001.png", (const char *)&v212, v241); ((void (__fastcall *)(cocos2d::CCNode *, __int64))v50->__vftable[1].~CCNode_0)(v50, 0xFFFFFFFFLL); cocos2d::CCSize::CCSize(&v202, 365.0, 40.0); v50->setContentSize(v50, &v202); a1->addChild_0(a1, v50, -2); v50->setPosition(v50, &v201); v51 = v50->__vftable[1].getTag; LOWORD(v212.origin.x) = 14336; BYTE2(v212.origin.x) = -115; ((void (__fastcall *)(cocos2d::CCNode *, cocos2d::CCRect *))v51)(v50, &v212); cocos2d::CCRect::CCRect(&v212, 0.0, 0.0, 40.0, 40.0); v52 = (cocos2d::CCNode *)cocos2d::extension::CCScale9Sprite::create( (cocos2d::extension::CCScale9Sprite *)"square02b_small.png", (const char *)&v212, v242); ((void (__fastcall *)(cocos2d::CCNode *, __int64))v52->__vftable[1].~CCNode_0)(v52, 0xFFFFFFFFLL); cocos2d::CCSize::CCSize(&v203, 210.0, 30.0); v52->setContentSize(v52, &v203); a1->addChild_0(a1, v52, -1); v53 = v52->setPosition; cocos2d::CCPoint::CCPoint(&v210, -73.0, 0.0); cocos2d::CCPoint::operator+(&v212, &v201, &v210); v53(v52, &v212.origin); v54 = v52->__vftable[1].getTag; LOWORD(v212.origin.x) = 9984; BYTE2(v212.origin.x) = 98; ((void (__fastcall *)(cocos2d::CCNode *, cocos2d::CCRect *))v54)(v52, &v212); if ( a1->m_type == 1 ) v55 = "Enter a list or id"; else v55 = "Enter a level, user or id"; sub_D153B8((int)&v204, v55); v56 = CCTextInputNode::create(194.0, 50.0, (const char *)v204, "Thonburi"); v57 = a1->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; a1->m_searchInput = v56; v57->addChild_0(a1, v56, 20); a1->m_searchInput->m_delegate = &a1->TextInputDelegate; m_searchInput = a1->m_searchInput; v59 = m_searchInput->setPosition; cocos2d::CCPoint::CCPoint(&v210, -174.0, 0.0); cocos2d::CCPoint::operator+(&v212, &v201, &v210); v59(m_searchInput, &v212.origin); m_textField = a1->m_searchInput->m_textField; v61 = m_textField->setAnchorPoint; cocos2d::CCPoint::CCPoint(&v212.origin, 0.0, 0.5); v61(m_textField, &v212.origin); m_textLabel = a1->m_searchInput->m_textLabel; v63 = m_textLabel->setAnchorPoint; cocos2d::CCPoint::CCPoint(&v212.origin, 0.0, 0.5); v63(m_textLabel, &v212.origin); CCTextInputNode::setMaxLabelScale(a1->m_searchInput, 0.7); CCTextInputNode::setMaxLabelWidth(a1->m_searchInput, 194.0); a1->m_searchInput->m_textField->setVisible(a1->m_searchInput->m_textField, 0); v64 = a1->m_searchInput; v64->m_maxLabelLength = 20; sub_D153B8((int)&v205, " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"); CCTextInputNode::setAllowedChars((__int64)v64, (__int64)&v205); v65 = (void *)(v205 - 24); if ( (__int64 *)(v205 - 24) != &qword_124B6B0 ) { if ( &pthread_create ) { v189 = (unsigned int *)(v205 - 8); do v190 = __ldaxr(v189); while ( __stlxr(v190 - 1, v189) ); } else { v190 = *(_DWORD *)(v205 - 8); *(_DWORD *)(v205 - 8) = v190 - 1; } if ( v190 <= 0 ) operator delete(v65); } LevelSearchLayer::updateSearchLabel(a1, (const char *)v204); v66 = cocos2d::CCMenu::create(); a1->addChild(a1, v66); v67 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_longBtn06_001.png"); v220.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v220.adj = (size_t)LevelSearchLayer::onSearch; v68 = CCMenuItemSpriteExtra::create(v67, nullptr, v220); v66->addChild(v66, v68); v69 = v68->setPosition; cocos2d::CCPoint::CCPoint(&v209, 63.0, 0.0); cocos2d::CCPoint::operator+(&v210, &v201, &v209); v214 = cocos2d::CCNode::convertToNodeSpace(v66, &v210); ((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCRect *, float, float))v69)(v68, &v212, v214.x, v214.y); v70 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_longBtn05_001.png"); v221.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v221.adj = (size_t)LevelSearchLayer::onSearchUser; v71 = CCMenuItemSpriteExtra::create(v70, nullptr, v221); v66->addChild(v66, v71); v72 = v71->setPosition; cocos2d::CCPoint::CCPoint(&v209, 110.0, 0.0); cocos2d::CCPoint::operator+(&v210, &v201, &v209); v215 = cocos2d::CCNode::convertToNodeSpace(v66, &v210); ((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCRect *, float, float))v72)(v71, &v212, v215.x, v215.y); v73 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_longBtn07_001.png"); v222.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v222.adj = (size_t)LevelSearchLayer::onClearFreeSearch; v74 = CCMenuItemSpriteExtra::create(v73, nullptr, v222); v66->addChild(v66, v74); v75 = v74->setPosition; cocos2d::CCPoint::CCPoint(&v209, 157.0, 0.0); cocos2d::CCPoint::operator+(&v210, &v201, &v209); v216 = cocos2d::CCNode::convertToNodeSpace(v66, &v210); ((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCRect *, float, float))v75)(v74, &v212, v216.x, v216.y); cocos2d::CCPoint::CCPoint(&v206, v198 * 0.5, (float)(v199 * 0.5) + 28.0); v76 = cocos2d::CCLabelBMFont::create(); v77 = v76->setPosition; cocos2d::CCPoint::CCPoint(&v210, 0.0, 69.5); cocos2d::CCPoint::operator+(&v212, &v206, &v210); v77(v76, &v212.origin); a1->addChild(a1, v76); v76->setScale(v76, 0.5); cocos2d::CCRect::CCRect(&v212, &v211); v78 = (cocos2d::CCNode *)cocos2d::extension::CCScale9Sprite::create( (cocos2d::extension::CCScale9Sprite *)"square02b_001.png", (const char *)&v212, v243); ((void (__fastcall *)(cocos2d::CCNode *, __int64))v78->__vftable[1].~CCNode_0)(v78, 0xFFFFFFFFLL); cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v212, 365.0, 115.0); cocos2d::CCSize::operator=(&v202, &v212); v78->setContentSize(v78, &v202); a1->addChild_0(a1, v78, -1); v78->setPosition(v78, &v206); v79 = v78->__vftable[1].getTag; LOWORD(v212.origin.x) = 11776; BYTE2(v212.origin.x) = 117; ((void (__fastcall *)(cocos2d::CCNode *, cocos2d::CCRect *))v79)(v78, &v212); v80 = cocos2d::CCMenu::create(); a1->addChild(a1, v80); cocos2d::CCNode::convertToNodeSpace(v80, &v206); v81 = SearchButton::create("GJ_longBtn04_001.png", "Downloads", 0.43, "GJ_sDownloadIcon_001.png"); v223.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v223.adj = (size_t)LevelSearchLayer::onMostDownloaded; v197 = CCMenuItemSpriteExtra::create(v81, nullptr, v223); ((void (__fastcall *)(cocos2d::CCMenu *))v80->addChild)(v80); v82 = SearchButton::create("GJ_longBtn04_001.png", "Likes", 0.5, "GJ_sLikeIcon_001.png"); v224.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v224.adj = (size_t)LevelSearchLayer::onMostLikes; v196 = (char *)CCMenuItemSpriteExtra::create(v82, nullptr, v224); v80->addChild(v80, (cocos2d::CCNode *)v196); v83 = SearchButton::create("GJ_longBtn04_001.png", "Sent", 0.5, "GJ_sModIcon_001.png"); m_icon = v83->m_icon; v85 = v83; v86 = m_icon->setPosition; v87 = (__int64)m_icon->getPosition(m_icon); cocos2d::CCPoint::CCPoint(&v210, 0.0, 0.5); cocos2d::CCPoint::operator+(&v212, v87, &v210); v86(m_icon, &v212.origin); v225.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v225.adj = (size_t)LevelSearchLayer::onSuggested; v88 = CCMenuItemSpriteExtra::create(v85, nullptr, v225); v80->addChild(v80, v88); v89 = SearchButton::create("GJ_longBtn04_001.png", "Trending", 0.5, "GJ_sTrendingIcon_001.png"); v226.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v226.adj = (size_t)LevelSearchLayer::onTrending; v90 = CCMenuItemSpriteExtra::create(v89, nullptr, v226); v80->addChild(v80, v90); v91 = SearchButton::create("GJ_longBtn04_001.png", "Recent", 0.5, "GJ_sRecentIcon_001.png"); v227.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v227.adj = (size_t)LevelSearchLayer::onMostRecent; v194 = CCMenuItemSpriteExtra::create(v91, nullptr, v227); v80->addChild(v80, v194); v92 = SearchButton::create("GJ_longBtn04_001.png", "Magic", 0.5, "GJ_sMagicIcon_001.png"); v228.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v228.adj = (size_t)LevelSearchLayer::onMagic; v193 = CCMenuItemSpriteExtra::create(v92, nullptr, v228); v80->addChild(v80, v193); v93 = SearchButton::create("GJ_longBtn04_001.png", "Awarded", 0.5, "GJ_sStarsIcon_001.png"); v229.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v229.adj = (size_t)LevelSearchLayer::onLatestStars; v192 = CCMenuItemSpriteExtra::create(v93, nullptr, v229); v80->addChild(v80, v192); v94 = SearchButton::create("GJ_longBtn04_001.png", "Followed", 0.5, "GJ_sFollowedIcon_001.png"); v230.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v230.adj = (size_t)LevelSearchLayer::onFollowed; v191 = CCMenuItemSpriteExtra::create(v94, nullptr, v230); v80->addChild(v80, v191); v95 = SearchButton::create("GJ_longBtn04_001.png", "Friends", 0.5, "GJ_sFriendsIcon_001.png"); v231.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v231.adj = (size_t)LevelSearchLayer::onFriends; v96 = CCMenuItemSpriteExtra::create(v95, nullptr, v231); v80->addChild(v80, v96); v97 = v197->setPosition; cocos2d::CCPoint::CCPoint(&v210, -119.0, 36.0); cocos2d::CCPoint::operator+(&v212, v207, &v210); v97(v197, &v212.origin); v98 = *(void (__fastcall **)(char *, cocos2d::CCRect *))(*(_QWORD *)v196 + 184LL); cocos2d::CCPoint::CCPoint(&v210, 0.0, 36.0); cocos2d::CCPoint::operator+(&v212, v207, &v210); v98(v196, &v212); v99 = v88->setPosition; cocos2d::CCPoint::CCPoint(&v210, 119.0, 36.0); cocos2d::CCPoint::operator+(&v212, v207, &v210); v99(v88, &v212.origin); v100 = v90->setPosition; cocos2d::CCPoint::CCPoint(&v210, -119.0, 0.0); cocos2d::CCPoint::operator+(&v212, v207, &v210); v100(v90, &v212.origin); v101 = v194->setPosition; cocos2d::CCPoint::CCPoint(&v210, 0.0, 0.0); cocos2d::CCPoint::operator+(&v212, v207, &v210); v101(v194, &v212.origin); v102 = v193->setPosition; cocos2d::CCPoint::CCPoint(&v210, 119.0, 0.0); cocos2d::CCPoint::operator+(&v212, v207, &v210); v102(v193, &v212.origin); v103 = v192->setPosition; cocos2d::CCPoint::CCPoint(&v210, -119.0, -36.0); cocos2d::CCPoint::operator+(&v212, v207, &v210); v103(v192, &v212.origin); v104 = v191->setPosition; cocos2d::CCPoint::CCPoint(&v210, 0.0, -36.0); cocos2d::CCPoint::operator+(&v212, v207, &v210); v104(v191, &v212.origin); v105 = v96->setPosition; cocos2d::CCPoint::CCPoint(&v210, 119.0, -36.0); cocos2d::CCPoint::operator+(&v212, v207, &v210); v105(v96, &v212.origin); v106 = GJAccountManager::sharedState(); if ( v106->m_accountID - v106->m_unkInt1 == 2795 ) { v183 = SearchButton::create("GJ_longBtn04_001.png", "Star Award", 0.5, "GJ_sMagicIcon_001.png"); v238.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v238.adj = (size_t)LevelSearchLayer::onStarAward; v184 = CCMenuItemSpriteExtra::create(v183, nullptr, v238); v80->addChild(v80, v184); v185 = v184->setPosition; cocos2d::CCPoint::CCPoint(&v210, 0.0, -76.0); cocos2d::CCPoint::operator+(&v212, v207, &v210); v185(v184, &v212.origin); } cocos2d::CCPoint::CCPoint(&v208, v198 * 0.5, (float)(v199 * 0.5) + -77.0); v107 = cocos2d::CCLabelBMFont::create(); v108 = v107->setPosition; cocos2d::CCPoint::CCPoint(&v210, 0.0, 37.0); cocos2d::CCPoint::operator+(&v212, &v208, &v210); v108(v107, &v212.origin); a1->addChild(a1, v107); v107->setScale(v107, 0.5); cocos2d::CCRect::CCRect(&v212, &v211); v109 = (cocos2d::CCNode *)cocos2d::extension::CCScale9Sprite::create( (cocos2d::extension::CCScale9Sprite *)"square02b_001.png", (const char *)&v212, v244); ((void (__fastcall *)(cocos2d::CCNode *, __int64))v109->__vftable[1].~CCNode_0)(v109, 0xFFFFFFFFLL); cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v212, 365.0, 50.0); cocos2d::CCSize::operator=(&v202, &v212); v109->setContentSize(v109, &v202); a1->addChild_0(a1, v109, -1); v109->setPosition(v109, &v208); v110 = v109->__vftable[1].getTag; LOWORD(v212.origin.x) = 9216; BYTE2(v212.origin.x) = 91; v111 = (cocos2d::CCArray *)((__int64 (__fastcall *)(cocos2d::CCNode *, cocos2d::CCRect *))v110)(v109, &v212); v112 = (cocos2d::CCArray *)cocos2d::CCArray::create(v111); a1->m_difficultySprites = v112; cocos2d::CCObject::retain(v112); v114 = (cocos2d::CCArray *)cocos2d::CCArray::create(v113); v115 = cocos2d::CCMenu::create(); a1->addChild_0(a1, v115, 10); v116 = 1; v117 = 0; for ( i = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"difficulty_%02d_btn_001.png", nullptr); ; i = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"difficulty_%02d_btn_001.png", (const char *)v117) ) { CString = cocos2d::CCString::getCString(i); if ( v117 == 7 ) CString = "difficulty_auto_btn_001.png"; v120 = cocos2d::CCSprite::createWithSpriteFrameName(CString); v121 = v120->setColor; memset(&v212, 125, 3); v121(v120, (const cocos2d::ccColor3B *)&v212); cocos2d::CCArray::addObject(a1->m_difficultySprites, v120); v120->setScale(v120, 0.8); v232.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v232.adj = (size_t)LevelSearchLayer::toggleDifficulty; v122 = CCMenuItemSpriteExtra::create(v120, nullptr, v232); v122->setTag(v122, v117); v115->addChild(v115, v122); cocos2d::CCArray::addObject(v114, v122); if ( v117 != 6 ) break; a1->m_lastDifficultySprite = v120; LABEL_13: ++v117; ++v116; } if ( v116 != 8 ) goto LABEL_13; LODWORD(v239.x) = COERCE_UNSIGNED_INT(cocos2d::CCNode::convertToNodeSpace(v115, &v208).y); GameToolbox::alignItemsHorisontally(v114, 18.0, v239, (bool)&v212); for ( j = 0; j < v115->getChildrenCount(v115); ++j ) { v124 = v115->getChildren(v115); v125 = (CCMenuItemSpriteExtra *)cocos2d::CCArray::objectAtIndex(v124, j); CCMenuItemSpriteExtra::setSizeMult(v125, 1.5); } v126 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_plus2Btn_001.png"); v233.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v233.adj = (size_t)LevelSearchLayer::onSpecialDemon; v127 = CCMenuItemSpriteExtra::create(v126, nullptr, v233); v128 = v115->cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; a1->m_demonTypeButton = v127; v128->addChild(v115, v127); m_demonTypeButton = a1->m_demonTypeButton; v130 = v115; v131 = m_demonTypeButton->setPosition; cocos2d::CCNode::convertToNodeSpace(v130, &v208); cocos2d::CCPoint::CCPoint(&v210, 202.5, 0.0); cocos2d::CCPoint::operator+(&v212, &v209, &v210); v131(m_demonTypeButton, &v212.origin); cocos2d::CCPoint::CCPoint(&v209, v198 * 0.5, (float)(v199 * 0.5) + -128.0); cocos2d::CCRect::CCRect(&v212, &v211); v132 = (cocos2d::CCNode *)cocos2d::extension::CCScale9Sprite::create( (cocos2d::extension::CCScale9Sprite *)"square02b_001.png", (const char *)&v212, v245); ((void (__fastcall *)(cocos2d::CCNode *, __int64))v132->__vftable[1].~CCNode_0)(v132, 0xFFFFFFFFLL); cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v212, 365.0, 35.0); cocos2d::CCSize::operator=(&v202, &v212); v132->setContentSize(v132, &v202); a1->addChild_0(a1, v132, -1); v132->setPosition(v132, &v209); v133 = v132->__vftable[1].getTag; LOWORD(v212.origin.x) = 7936; BYTE2(v212.origin.x) = 79; v134 = (cocos2d::CCArray *)((__int64 (__fastcall *)(cocos2d::CCNode *, cocos2d::CCRect *))v133)(v132, &v212); v135 = (cocos2d::CCArray *)cocos2d::CCArray::create(v134); a1->m_lengthSprites = v135; cocos2d::CCObject::retain(v135); cocos2d::CCArray::removeAllObjects(v114); v136 = cocos2d::CCMenu::create(); a1->addChild_0(a1, v136, 10); if ( !a1->m_type ) { v137 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_timeIcon_001.png"); v234.ptr = nullptr; v234.adj = 0; v138 = CCMenuItemSpriteExtra::create(v137, nullptr, v234); v136->addChild(v136, v138); v138->setEnabled(v138, 0); cocos2d::CCArray::addObject(v114, v138); for ( k = 0; k != 6; ++k ) { GJGameLevel::lengthKeyToString((__int64 *)&v210, (GJGameLevel *)k, v139); v141 = cocos2d::CCLabelBMFont::create(); v142 = (void *)(*(_QWORD *)&v210 - 24LL); if ( (__int64 *)(*(_QWORD *)&v210 - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v181 = (unsigned int *)(*(_QWORD *)&v210 - 8LL); do v182 = __ldaxr(v181); while ( __stlxr(v182 - 1, v181) ); } else { v182 = *(_DWORD *)(*(_QWORD *)&v210 - 8LL); *(_DWORD *)(*(_QWORD *)&v210 - 8LL) = v182 - 1; } if ( v182 <= 0 ) operator delete(v142); } v143 = v141->setColor; memset(&v212, 125, 3); v143(v141, (const cocos2d::ccColor3B *)&v212); cocos2d::CCArray::addObject(a1->m_lengthSprites, v141); v141->setScale(v141, 0.42); v235.adj = (size_t)LevelSearchLayer::toggleTime; v235.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v144 = CCMenuItemSpriteExtra::create(v141, nullptr, v235); v144->setTag(v144, k); v136->addChild(v136, v144); cocos2d::CCArray::addObject(v114, v144); } } v145 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_starsIcon_001.png"); a1->m_starsSprite = v145; v236.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v236.adj = (size_t)LevelSearchLayer::toggleStar; v146 = CCMenuItemSpriteExtra::create(v145, nullptr, v236); v136->addChild(v136, v146); cocos2d::CCArray::addObject(v114, v146); LODWORD(v240.x) = COERCE_UNSIGNED_INT(cocos2d::CCNode::convertToNodeSpace(v136, &v209).y); GameToolbox::alignItemsHorisontally(v114, 12.0, v240, (bool)&v212); for ( m = 0; m < v136->getChildrenCount(v136); ++m ) { v148 = v136->getChildren(v136); v149 = (CCMenuItemSpriteExtra *)cocos2d::CCArray::objectAtIndex(v148, m); CCMenuItemSpriteExtra::setSizeMult(v149, 1.3); } v150 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_01_001.png"); v237.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v237.adj = (size_t)LevelSearchLayer::onBack; v151 = CCMenuItemSpriteExtra::create(v150, nullptr, v237); CCMenuItemSpriteExtra::setSizeMult(v151, 1.5); v152 = (cocos2d::CCNode *)cocos2d::CCMenu::create((cocos2d::CCMenu *)v151, nullptr); a1->addChild_0(a1, v152, 1); v153 = v152->setPosition; v154 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getScreenLeft(v154); v156 = v155 + 24.0; v157 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getScreenTop(v157); cocos2d::CCPoint::CCPoint(&v212.origin, v156, v158 - 23.0); v153(v152, &v212.origin); if ( PlatformToolbox::isControllerConnected() ) GameToolbox::addBackButton(a1, v151); for ( n = 0; n != 8; ++n ) { v160 = GameLevelManager::sharedState(); DiffVal = GameLevelManager::getDiffVal(v160, n); LevelSearchLayer::toggleDifficultyNum(a1, n, DiffVal); } for ( ii = 0; ii != 6; ++ii ) { v163 = GameLevelManager::sharedState(); LenVal = GameLevelManager::getLenVal(v163, ii); LevelSearchLayer::toggleTimeNum(a1, ii, LenVal); } v165 = GameLevelManager::sharedState(); BoolForKey = GameLevelManager::getBoolForKey(v165, "star_filter"); v167 = -1; if ( !BoolForKey ) v167 = 125; m_starsSprite = a1->m_starsSprite; v169 = m_starsSprite->setColor; LOBYTE(v212.origin.x) = v167; BYTE1(v212.origin.x) = v167; BYTE2(v212.origin.x) = v167; v169(m_starsSprite, (const cocos2d::ccColor3B *)&v212); m_difficultyDict = a1->m_difficultyDict; DiffKey = (char *)LevelSearchLayer::getDiffKey(a1, 6); sub_D153B8((int)&v212, DiffKey); v172 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(m_difficultyDict, (const std::string *)&v212); v173 = cocos2d::CCString::boolValue(v172); v174 = (void *)(*(_QWORD *)&v212.origin - 24LL); if ( (__int64 *)(*(_QWORD *)&v212.origin - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v187 = (unsigned int *)(*(_QWORD *)&v212.origin - 8LL); do v188 = __ldaxr(v187); while ( __stlxr(v188 - 1, v187) ); } else { v188 = *(_DWORD *)(*(_QWORD *)&v212.origin - 8LL); *(_DWORD *)(*(_QWORD *)&v212.origin - 8LL) = v188 - 1; } if ( v188 <= 0 ) operator delete(v174); } a1->m_demonTypeButton->setEnabled(a1->m_demonTypeButton, v173); a1->m_demonTypeButton->setVisible(a1->m_demonTypeButton, v173); demonFilterSelectClosed = a1->demonFilterSelectClosed; v176 = GameLevelManager::sharedState(); IntForKey = GameLevelManager::getIntForKey(v176, "demon_filter"); demonFilterSelectClosed(a1, IntForKey); p_m_textArea = &v204[-1].m_textArea; if ( &v204[-1].m_textArea != (TextArea **)&qword_124B6B0 ) { if ( &pthread_create ) { p_m_kerningAmount = (unsigned int *)&v204[-1].m_kerningAmount; do m_kerningAmount = __ldaxr(p_m_kerningAmount); while ( __stlxr(m_kerningAmount - 1, p_m_kerningAmount) ); } else { m_kerningAmount = v204[-1].m_kerningAmount; v204[-1].m_kerningAmount = m_kerningAmount - 1; } if ( m_kerningAmount <= 0 ) operator delete(p_m_textArea); } return v195; }
GD Web Decomp Icon

GD Web Decomp

Raw Source