// // EditLevelLayer::init from 0x6e0310 to 0x6e1b38 (6184 bytes) // // 2 xrefs: // > EditLevelLayer::create @ 0x6e1c34 // > @ 0x39c60 // // 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 EditLevelLayer::init(EditLevelLayer *a1, GJGameLevel *a2) { bool v4; // w23 void *v6; // x0 __int64 v7; // x21 void *v8; // x0 GameManager *v9; // x0 void (__fastcall *setKeypadEnabled)(cocos2d::CCLayer *__hidden, bool); // x2 cocos2d::CCDirector *v11; // x0 const char *v12; // x1 cocos2d::CCNode *v13; // x21 void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x26 int (__fastcall *getTag)(const cocos2d::CCObject *__hidden); // x2 cocos2d::CCSprite *v16; // x21 cocos2d::CCDirector *v17; // x0 float v18; // s0 float v19; // s9 cocos2d::CCDirector *v20; // x0 float v21; // s0 cocos2d::CCSprite *v22; // x21 void (__fastcall *v23)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x26 void (__fastcall *v24)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x26 cocos2d::CCDirector *v25; // x0 float v26; // s0 float v27; // s9 cocos2d::CCDirector *v28; // x0 float v29; // s0 cocos2d::CCArray *v30; // x0 cocos2d::CCArray *v31; // x0 cocos2d::CCDirector *v32; // x0 float v33; // s0 cocos2d::CCNode *v34; // x21 int (__fastcall *v35)(const cocos2d::CCObject *__hidden); // x2 GJGameLevel *v36; // x1 cocos2d::CCLabelBMFont *v37; // x21 void *v38; // x0 EditLevelLayer_vtbl *v39; // x3 void (__fastcall *addChild_0)(cocos2d::CCNode *__hidden, cocos2d::CCNode *, int); // x3 cocos2d::CCNode *v41; // x21 int (__fastcall *v42)(const cocos2d::CCObject *__hidden); // x2 CCTextInputNode *v43; // x26 EditLevelLayer_vtbl *v44; // x3 CCTextInputNode_vtbl *v45; // x2 void *v46; // x0 cocos2d::CCArray *m_textInputs; // x0 TextArea *v48; // x28 void *v49; // x0 char *v50; // x28 size_t v51; // x27 cocos2d::CCPoint *v52; // x3 size_t v53; // x2 int v54; // w24 __int64 v55; // x27 __int64 *v56; // x0 cocos2d::CCMenu *v57; // x0 EditLevelLayer_vtbl *v58; // x2 cocos2d::CCSprite *v59; // x0 CCMenuItemSpriteExtra *v60; // x0 cocos2d::CCSprite *v61; // x0 cocos2d::CCSprite *v62; // x26 CCMenuItemSpriteExtra *v63; // x0 cocos2d::CCSprite *v64; // x0 CCMenuItemSpriteExtra *v65; // x0 cocos2d::CCMenu *m_buttonMenu; // x24 void (__fastcall *v67)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x27 float *v68; // x0 GJGameLevel *v69; // x0 cocos2d::CCSprite *v70; // x0 CCMenuItemSpriteExtra *v71; // x24 cocos2d::CCMenu *v72; // x28 void (__fastcall *v73)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x27 cocos2d::CCMenu *v74; // x24 cocos2d::CCDirector *v75; // x0 float v76; // s0 float v77; // s8 cocos2d::CCDirector *v78; // x0 float v79; // s0 cocos2d::CCSprite *v80; // x0 cocos2d::CCSprite *v81; // x28 CCMenuItemSpriteExtra *v82; // x27 void (__fastcall *v83)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x25 cocos2d::CCSprite *v84; // x25 cocos2d::CCSprite *v85; // x0 const cocos2d::CCSize *(__fastcall *getContentSize)(const cocos2d::CCNode *__hidden); // x1 void (__fastcall *setScale)(cocos2d::CCSprite *__hidden, float); // x28 float width; // s8 float *v89; // x0 CCMenuItemSpriteExtra *v90; // x25 void (__fastcall *v91)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x28 __int64 v92; // x27 cocos2d::CCSprite *v93; // x0 CCMenuItemSpriteExtra *v94; // x27 void (__fastcall *v95)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x28 __int64 v96; // x25 cocos2d::CCSprite *v97; // x0 CCMenuItemSpriteExtra *v98; // x25 void (__fastcall *v99)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x28 __int64 v100; // x27 cocos2d::CCSprite *v101; // x25 cocos2d::CCString *v102; // x0 cocos2d::CCLabelBMFont *v103; // x0 cocos2d::CCSprite_vtbl *v104; // x3 cocos2d::CCLabelBMFont *m_folderLabel; // x27 void (__fastcall *v106)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x28 float v107; // s8 __int64 v108; // x0 CCMenuItemSpriteExtra *v109; // x25 void (__fastcall *v110)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x27 cocos2d::CCSprite *v111; // x0 CCMenuItemSpriteExtra *v112; // x28 cocos2d::CCNode *v113; // x24 void (__fastcall *v114)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x25 cocos2d::CCDirector *v115; // x0 float v116; // s0 float v117; // s8 cocos2d::CCDirector *v118; // x0 float v119; // s0 cocos2d::CCMenu *v120; // x24 cocos2d::CCSprite *v121; // x0 CCMenuItemSpriteExtra *v122; // x25 void (__fastcall *v123)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x25 cocos2d::CCDirector *v124; // x0 float v125; // s0 float v126; // s8 cocos2d::CCDirector *v127; // x0 float v128; // s0 cocos2d::CCSprite *v129; // x25 CCMenuItemSpriteExtra *v130; // x25 void (__fastcall *v131)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x27 cocos2d::CCDirector *v132; // x0 float v133; // s0 float v134; // s8 cocos2d::CCDirector *v135; // x0 float v136; // s0 cocos2d::CCSprite *v137; // x25 CCMenuItemSpriteExtra *v138; // x25 void (__fastcall *v139)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x27 char *v140; // x19 unsigned int *v141; // x21 int v142; // w0 cocos2d::CCSprite *v143; // x27 CCMenuItemSpriteExtra *v144; // x27 void (__fastcall *v145)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x24 __int64 v146; // x25 void *v147; // x0 unsigned int *v148; // x1 int v149; // w2 GJGameLevel *m_level; // x21 void *v151; // x0 unsigned int *v152; // x1 int v153; // w2 cocos2d::CCSprite *v154; // x19 void (__fastcall *v155)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x21 float v156; // s8 __int64 v157; // x0 CCTextInputNode *v158; // x26 CCTextInputNode_vtbl *v159; // x2 GJGameLevel *v160; // x1 size_t v161; // x3 size_t v162; // x6 size_t v163; // x2 unsigned int v164; // w0 __int64 v165; // x2 char *v166; // x4 signed __int64 v167; // x3 cocos2d::CCPoint *v168; // x0 char *v169; // x0 void *v170; // x0 char *v171; // x0 unsigned int *v172; // x1 int v173; // w2 unsigned int *v174; // x28 int v175; // w1 unsigned int *v176; // x1 int v177; // w2 unsigned int *v178; // x4 int v179; // w1 unsigned int *v180; // x1 int v181; // w2 unsigned int *v182; // x1 int v183; // w2 unsigned int *v184; // x1 int v185; // w2 unsigned int *v186; // x5 int x_low; // w1 unsigned int *v188; // x1 int v189; // w2 unsigned int *v190; // x1 int v191; // w2 _QWORD v192[2]; // [xsp+0h] [xbp+0h] BYREF size_t v193; // [xsp+80h] [xbp+80h] size_t v194; // [xsp+88h] [xbp+88h] char *v195; // [xsp+90h] [xbp+90h] char *v196; // [xsp+98h] [xbp+98h] TextInputDelegate *setAnchorPoint; // [xsp+A0h] [xbp+A0h] cocos2d::CCPoint *origin; // [xsp+A8h] [xbp+A8h] __int64 v199; // [xsp+C0h] [xbp+C0h] __int64 v200; // [xsp+C8h] [xbp+C8h] float v201; // [xsp+D0h] [xbp+D0h] float v202; // [xsp+D4h] [xbp+D4h] char v203; // [xsp+D8h] [xbp+D8h] BYREF cocos2d::CCSize v204; // [xsp+E0h] [xbp+E0h] BYREF cocos2d::CCPoint v205; // [xsp+E8h] [xbp+E8h] BYREF char *v206; // [xsp+F0h] [xbp+F0h] BYREF cocos2d::CCPoint v207; // [xsp+F8h] [xbp+F8h] BYREF char *v208; // [xsp+100h] [xbp+100h] BYREF cocos2d::CCRect v209; // [xsp+108h] [xbp+108h] BYREF cocos2d::CCRect v210; // [xsp+118h] [xbp+118h] BYREF cocos2d::CCPoint v211; // 0:kr08_8.8 cocos2d::CCPoint v212; // 0:kr10_8.8 cocos2d::CCPoint v213; // 0:kr18_8.8 cocos2d::CCPoint v214; // 0:kr20_8.8 cocos2d::CCPoint v215; // 0:kr28_8.8 cocos2d::SEL_MenuHandler v216; // 0:x2.16 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::CCRect v230; // 0:s0.4,4:s1.4,8:s2.4,12:s3.4 cocos2d::CCRect v231; // 0:s0.4,4:s1.4,8:s2.4,12:s3.4 v4 = cocos2d::CCLayer::init(a1); if ( !v4 ) return v4; a1->m_level = a2; cocos2d::CCObject::retain(a2); sub_D18D28(&v210, &a1->m_level->m_levelName); v6 = (void *)(*(_QWORD *)&v210.origin - 24LL); v7 = *(_QWORD *)(*(_QWORD *)&v210.origin - 24LL); if ( (__int64 *)(*(_QWORD *)&v210.origin - 24LL) == &qword_124B6B0 ) goto LABEL_4; if ( &pthread_create ) { v176 = (unsigned int *)(*(_QWORD *)&v210.origin - 8LL); do v177 = __ldaxr(v176); while ( __stlxr(v177 - 1, v176) ); } else { v177 = *(_DWORD *)(*(_QWORD *)&v210.origin - 8LL); *(_DWORD *)(*(_QWORD *)&v210.origin - 8LL) = v177 - 1; } if ( v177 > 0 ) { LABEL_4: if ( !v7 ) goto LABEL_5; } else { operator delete(v6); if ( !v7 ) goto LABEL_5; } m_level = a1->m_level; sub_D18D28(&v210, &m_level->m_levelName); sub_D18EA8(&m_level->m_tempName, &v210); v151 = (void *)(*(_QWORD *)&v210.origin - 24LL); if ( (__int64 *)(*(_QWORD *)&v210.origin - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v152 = (unsigned int *)(*(_QWORD *)&v210.origin - 8LL); do v153 = __ldaxr(v152); while ( __stlxr(v153 - 1, v152) ); } else { v153 = *(_DWORD *)(*(_QWORD *)&v210.origin - 8LL); *(_DWORD *)(*(_QWORD *)&v210.origin - 8LL) = v153 - 1; } if ( v153 <= 0 ) operator delete(v151); } LABEL_5: sub_D18D28(&v210, &a1->m_level->m_levelName); sub_D163D4(&a1->m_levelName, &v210); v8 = (void *)(*(_QWORD *)&v210.origin - 24LL); if ( (__int64 *)(*(_QWORD *)&v210.origin - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v182 = (unsigned int *)(*(_QWORD *)&v210.origin - 8LL); do v183 = __ldaxr(v182); while ( __stlxr(v183 - 1, v182) ); } else { v183 = *(_DWORD *)(*(_QWORD *)&v210.origin - 8LL); *(_DWORD *)(*(_QWORD *)&v210.origin - 8LL) = v183 - 1; } if ( v183 <= 0 ) operator delete(v8); } a1->m_levelType = a2->m_levelType; origin = (cocos2d::CCPoint *)&v203; v9 = GameManager::sharedState(); setKeypadEnabled = a1->setKeypadEnabled; v9->m_currentLevelID = a1->m_level->m_M_ID; setKeypadEnabled(a1, 1); a1->setKeyboardEnabled(a1, 1); v11 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize(v11); v13 = (cocos2d::CCNode *)cocos2d::CCSprite::create((cocos2d::CCSprite *)"GJ_gradientBG.png", v12); setAnchorPoint = (TextInputDelegate *)v13->setAnchorPoint; cocos2d::CCPoint::CCPoint(&v210.origin, 0.0, 0.0); ((void (__fastcall *)(cocos2d::CCNode *, cocos2d::CCRect *))setAnchorPoint)(v13, &v210); a1->addChild_0(a1, v13, -2); v13->setScaleX(v13, (float)(v201 + 10.0) / v13[1].m_obContentSize.height); v13->setScaleY(v13, (float)(v202 + 10.0) / v13[1].m_sAdditionalTransform.a); setPosition = v13->setPosition; cocos2d::CCPoint::CCPoint(&v210.origin, -5.0, -5.0); setPosition(v13, &v210.origin); getTag = v13->__vftable[1].getTag; LOWORD(v210.origin.x) = 26112; BYTE2(v210.origin.x) = -1; ((void (__fastcall *)(cocos2d::CCNode *, cocos2d::CCRect *))getTag)(v13, &v210); v16 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_sideArt_001.png"); setAnchorPoint = (TextInputDelegate *)v16->setAnchorPoint; cocos2d::CCPoint::CCPoint(&v210.origin, 0.0, 0.0); ((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCRect *))setAnchorPoint)(v16, &v210); setAnchorPoint = (TextInputDelegate *)v16->setPosition; v17 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getScreenLeft(v17); v19 = v18; v20 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getScreenBottom(v20); cocos2d::CCPoint::CCPoint(&v210.origin, v19 - 1.0, v21 - 1.0); ((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCRect *))setAnchorPoint)(v16, &v210); a1->addChild_0(a1, v16, 1); v22 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_sideArt_001.png"); v23 = v22->setAnchorPoint; cocos2d::CCPoint::CCPoint(&v210.origin, 1.0, 0.0); v23(v22, &v210.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(&v210.origin, v27 + 1.0, v29 - 1.0); v24(v22, &v210.origin); cocos2d::CCSprite::setFlipX(v22, 1); v30 = (cocos2d::CCArray *)((__int64 (__fastcall *)(EditLevelLayer *, cocos2d::CCSprite *, __int64))a1->addChild_0)( a1, v22, 1); v31 = (cocos2d::CCArray *)cocos2d::CCArray::create(v30); a1->m_textInputs = v31; cocos2d::CCObject::retain(v31); cocos2d::CCRect::CCRect(&v209, 0.0, 0.0, 80.0, 80.0); v32 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getScreenTop(v32); cocos2d::CCPoint::CCPoint(origin, v201 * 0.5, v33 - 30.0); cocos2d::CCRect::CCRect(&v210, &v209); v34 = (cocos2d::CCNode *)cocos2d::extension::CCScale9Sprite::create( (cocos2d::extension::CCScale9Sprite *)"square02b_001.png", (const char *)&v210, v230); ((void (__fastcall *)(cocos2d::CCNode *, __int64))v34->__vftable[1].~CCNode_0)(v34, 0xFFFFFFFFLL); cocos2d::CCSize::CCSize(&v204, 365.0, 40.0); v34->setContentSize(v34, &v204); a1->addChild_0(a1, v34, -1); v34->setPosition(v34, origin); v35 = v34->__vftable[1].getTag; LOWORD(v210.origin.x) = 14336; BYTE2(v210.origin.x) = -115; ((void (__fastcall *)(cocos2d::CCNode *, cocos2d::CCRect *))v35)(v34, &v210); v36 = a1->m_level; if ( v36->m_levelVersion > 1 || v36->m_isUploaded ) { sub_D18D28(&v210, &v36->m_levelName); v37 = cocos2d::CCLabelBMFont::create(); v38 = (void *)(*(_QWORD *)&v210.origin - 24LL); if ( (__int64 *)(*(_QWORD *)&v210.origin - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v188 = (unsigned int *)(*(_QWORD *)&v210.origin - 8LL); do v189 = __ldaxr(v188); while ( __stlxr(v189 - 1, v188) ); } else { v189 = *(_DWORD *)(*(_QWORD *)&v210.origin - 8LL); *(_DWORD *)(*(_QWORD *)&v210.origin - 8LL) = v189 - 1; } if ( v189 <= 0 ) operator delete(v38); } v39 = a1->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; setAnchorPoint = &a1->TextInputDelegate; addChild_0 = v39->addChild_0; v196 = " #endif\n\n varying vec4 v_fragmentColor;\n varying vec2 v_texCoord;\n uniform sampler2D u_texture;\n\n uniform vec3 u_lum;\n\n void main(void) {\n vec4 color = texture2D(u_texture, v_texCoord);\n float gray = dot(color.rgb * v_fragmentColor.rgb, u_lum);\n float normalization = (v_fragmentColor.r + v_fragmentColor.g + v_fragmentColor.b) / 3.0;\n gray /= normalization; // Adjust for tint brightness\n gl_FragColor = vec4(v_fragmentColor.rgb*vec3(gray), color.a * v_fragmentColor.a);\n }\n "; addChild_0(a1, v37, 20); v37->setPosition(v37, origin); } else { v196 = " #endif\n\n varying vec4 v_fragmentColor;\n varying vec2 v_texCoord;\n uniform sampler2D u_texture;\n\n uniform vec3 u_lum;\n\n void main(void) {\n vec4 color = texture2D(u_texture, v_texCoord);\n float gray = dot(color.rgb * v_fragmentColor.rgb, u_lum);\n float normalization = (v_fragmentColor.r + v_fragmentColor.g + v_fragmentColor.b) / 3.0;\n gray /= normalization; // Adjust for tint brightness\n gl_FragColor = vec4(v_fragmentColor.rgb*vec3(gray), color.a * v_fragmentColor.a);\n }\n "; setAnchorPoint = &a1->TextInputDelegate; v158 = CCTextInputNode::create(300.0, 50.0, "Level Name", "Thonburi"); a1->addChild_0(a1, v158, 18); v159 = v158->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v158->m_delegate = setAnchorPoint; v159->setTag(v158, 1); v158->setPosition(v158, origin); v160 = a1->m_level; v158->m_maxLabelLength = 20; v158->m_filterSwearWords = 1; sub_D18D28(&v208, &v160->m_levelName); sub_D153B8((unsigned int)v192 + 280, &byte_F288A0); v195 = v208; v161 = *((_QWORD *)v208 - 3); v162 = *(_QWORD *)(*(_QWORD *)&v210.origin - 24LL); origin = (cocos2d::CCPoint *)v210.origin; v193 = v161; if ( v162 > v161 ) v163 = v161; else v163 = v162; v194 = v162; v164 = memcmp(v208, *(const void **)&v210.origin, v163); v165 = v164; v166 = v195; if ( !v164 ) { v165 = 0x7FFFFFFF; v167 = v193 - v194; if ( (__int64)(v193 - v194) <= 0x7FFFFFFF ) { if ( v167 >= (__int64)0xFFFFFFFF80000000LL ) v165 = (unsigned int)v167; else v165 = 0x80000000LL; } } v168 = origin - 3; if ( &origin[-3] != (cocos2d::CCPoint *)&qword_124B6B0 ) { if ( &pthread_create ) { v186 = (unsigned int *)&origin[-1]; do x_low = __ldaxr(v186); while ( __stlxr(x_low - 1, v186) ); } else { x_low = LODWORD(origin[-1].x); LODWORD(origin[-1].x) = x_low - 1; } if ( x_low <= 0 ) { origin = (cocos2d::CCPoint *)v165; operator delete(v168); v166 = v208; v165 = (__int64)origin; } else { v166 = v208; } } v169 = v166 - 24; if ( v166 - 24 != (char *)&qword_124B6B0 ) { if ( &pthread_create ) { v178 = (unsigned int *)(v166 - 8); do v179 = __ldaxr(v178); while ( __stlxr(v179 - 1, v178) ); } else { v179 = *((_DWORD *)v166 - 2); *((_DWORD *)v166 - 2) = v179 - 1; } if ( v179 <= 0 ) { origin = (cocos2d::CCPoint *)v165; operator delete(v169); LODWORD(v165) = (_DWORD)origin; } } if ( (_DWORD)v165 ) { sub_D18D28(&v208, &a2->m_levelName); sub_D153B8((int)&v210, v208); CCTextInputNode::setString(v158, (const unsigned __int8 **)&v210); v170 = (void *)(*(_QWORD *)&v210.origin - 24LL); if ( (__int64 *)(*(_QWORD *)&v210.origin - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v190 = (unsigned int *)(*(_QWORD *)&v210.origin - 8LL); do v191 = __ldaxr(v190); while ( __stlxr(v191 - 1, v190) ); } else { v191 = *(_DWORD *)(*(_QWORD *)&v210.origin - 8LL); *(_DWORD *)(*(_QWORD *)&v210.origin - 8LL) = v191 - 1; } if ( v191 <= 0 ) operator delete(v170); } v171 = v208 - 24; if ( v208 - 24 != (char *)&qword_124B6B0 ) { if ( &pthread_create ) { v172 = (unsigned int *)(v208 - 8); do v173 = __ldaxr(v172); while ( __stlxr(v173 - 1, v172) ); } else { v173 = *((_DWORD *)v208 - 2); *((_DWORD *)v208 - 2) = v173 - 1; } if ( v173 <= 0 ) operator delete(v171); } } LOBYTE(v199) = 120; *(_WORD *)((char *)&v199 + 1) = -3926; CCTextInputNode::setLabelPlaceholderColor(v158, (cocos2d::ccColor3B)v199); CCTextInputNode::setLabelPlaceholderScale(v158, 0.7); cocos2d::CCArray::addObject(a1->m_textInputs, v158); } origin = &v205; cocos2d::CCPoint::CCPoint(&v205, v201 * 0.5, (float)(v202 * 0.5) + 65.0); cocos2d::CCRect::CCRect(&v210, &v209); v41 = (cocos2d::CCNode *)cocos2d::extension::CCScale9Sprite::create( (cocos2d::extension::CCScale9Sprite *)"square02b_001.png", (const char *)&v210, v231); ((void (__fastcall *)(cocos2d::CCNode *, __int64))v41->__vftable[1].~CCNode_0)(v41, 0xFFFFFFFFLL); cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v210, 365.0, 60.0); cocos2d::CCSize::operator=(&v204, &v210); v41->setContentSize(v41, &v204); a1->addChild_0(a1, v41, -1); v41->setPosition(v41, origin); v42 = v41->__vftable[1].getTag; LOWORD(v210.origin.x) = 14336; BYTE2(v210.origin.x) = -115; ((void (__fastcall *)(cocos2d::CCNode *, cocos2d::CCRect *))v42)(v41, &v210); v43 = CCTextInputNode::create(365.0, 50.0, "Description [Optional]", v196 + 3112); v44 = a1->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v43->m_filterSwearWords = 0; v44->addChild_0(a1, v43, 20); v45 = v43->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v43->m_delegate = setAnchorPoint; v45->setTag(v43, 2); v43->setPosition(v43, origin); sub_D153B8( (unsigned int)v192 + 280, " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.,-!?:;)(/\\\"'`*=+-_%[]<>|@&^#{}%$~"); CCTextInputNode::setAllowedChars((__int64)v43, (__int64)&v210); v46 = (void *)(*(_QWORD *)&v210.origin - 24LL); if ( (__int64 *)(*(_QWORD *)&v210.origin - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v180 = (unsigned int *)(*(_QWORD *)&v210.origin - 8LL); do v181 = __ldaxr(v180); while ( __stlxr(v181 - 1, v180) ); } else { v181 = *(_DWORD *)(*(_QWORD *)&v210.origin - 8LL); *(_DWORD *)(*(_QWORD *)&v210.origin - 8LL) = v181 - 1; } if ( v181 <= 0 ) operator delete(v46); } m_textInputs = a1->m_textInputs; v43->m_maxLabelLength = 180; cocos2d::CCArray::addObject(m_textInputs, v43); v43->m_textField->setVisible(v43->m_textField, 0); sub_D153B8((unsigned int)v192 + 280, &byte_F288A0); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v208, 0.5, 0.5); v48 = (TextArea *)TextArea::create( (__int64)&v210, "chatFont.fnt", (const cocos2d::CCPoint *)&v208, 1, 1.0, 315.0, 20.0); v49 = (void *)(*(_QWORD *)&v210.origin - 24LL); if ( (__int64 *)(*(_QWORD *)&v210.origin - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v184 = (unsigned int *)(*(_QWORD *)&v210.origin - 8LL); do v185 = __ldaxr(v184); while ( __stlxr(v185 - 1, v184) ); } else { v185 = *(_DWORD *)(*(_QWORD *)&v210.origin - 8LL); *(_DWORD *)(*(_QWORD *)&v210.origin - 8LL) = v185 - 1; } if ( v185 <= 0 ) operator delete(v49); } CCTextInputNode::addTextArea(v43, v48); LOWORD(v200) = -21896; BYTE2(v200) = -16; CCTextInputNode::setLabelPlaceholderColor(v43, (cocos2d::ccColor3B)v200); EditLevelLayer::updateDescText(a1, &byte_F288A0); GJGameLevel::getUnpackedLevelDescription((__int64 *)&v206, a2); sub_D153B8((int)&v208, &byte_F288A0); v50 = v208; v51 = *((_QWORD *)v206 - 3); v52 = *((cocos2d::CCPoint **)v208 - 3); origin = v52; if ( (unsigned __int64)v52 > v51 ) v53 = v51; else v53 = (size_t)v52; v54 = memcmp(v206, v208, v53); if ( v54 || (v54 = 0x7FFFFFFF, v55 = v51 - (_QWORD)origin, v55 > 0x7FFFFFFF) ) { v56 = (__int64 *)(v50 - 24); if ( v50 - 24 == (char *)&qword_124B6B0 ) goto LABEL_17; } else { v56 = (__int64 *)(v50 - 24); if ( v55 >= (__int64)0xFFFFFFFF80000000LL ) v54 = v55; else v54 = 0x80000000; if ( v56 == &qword_124B6B0 ) { LABEL_17: if ( !v54 ) goto LABEL_18; LABEL_30: sub_D153B8((int)&v210, v206); CCTextInputNode::setString(v43, (const unsigned __int8 **)&v210); v147 = (void *)(*(_QWORD *)&v210.origin - 24LL); if ( (__int64 *)(*(_QWORD *)&v210.origin - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v148 = (unsigned int *)(*(_QWORD *)&v210.origin - 8LL); do v149 = __ldaxr(v148); while ( __stlxr(v149 - 1, v148) ); } else { v149 = *(_DWORD *)(*(_QWORD *)&v210.origin - 8LL); *(_DWORD *)(*(_QWORD *)&v210.origin - 8LL) = v149 - 1; } if ( v149 <= 0 ) operator delete(v147); } goto LABEL_18; } } if ( &pthread_create ) { v174 = (unsigned int *)(v50 - 8); do v175 = __ldaxr(v174); while ( __stlxr(v175 - 1, v174) ); } else { v175 = *((_DWORD *)v50 - 2); *((_DWORD *)v50 - 2) = v175 - 1; } if ( v175 > 0 ) goto LABEL_17; operator delete(v56); if ( v54 ) goto LABEL_30; LABEL_18: v57 = cocos2d::CCMenu::create(); v58 = a1->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; a1->m_buttonMenu = v57; v58->addChild(a1, v57); v59 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_editBtn_001.png"); v216.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v216.adj = (size_t)EditLevelLayer::onEdit; v60 = CCMenuItemSpriteExtra::create(v59, nullptr, v216); a1->m_buttonMenu->addChild(a1->m_buttonMenu, v60); v61 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_playBtn2_001.png"); v217.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v62 = v61; v217.adj = (size_t)EditLevelLayer::onPlay; v63 = CCMenuItemSpriteExtra::create(v61, nullptr, v217); a1->m_buttonMenu->addChild(a1->m_buttonMenu, v63); v64 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_shareBtn_001.png"); v218.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v218.adj = (size_t)EditLevelLayer::onShare; v65 = CCMenuItemSpriteExtra::create(v64, nullptr, v218); a1->m_buttonMenu->addChild(a1->m_buttonMenu, v65); cocos2d::CCMenu::alignItemsHorizontallyWithPadding(a1->m_buttonMenu, 20.0); m_buttonMenu = a1->m_buttonMenu; v67 = m_buttonMenu->setPosition; v68 = (float *)m_buttonMenu->getPosition(m_buttonMenu); cocos2d::CCPoint::CCPoint(&v210.origin, *v68, (float)(v202 * 0.5) + -25.0); v67(m_buttonMenu, &v210.origin); EditLevelLayer::setupLevelInfo(a1); v69 = a1->m_level; if ( v69->m_levelVersion > 1 || v69->m_isUploaded ) { v70 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_updateBtn_001.png"); v219.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v219.adj = (size_t)EditLevelLayer::onUpdateDescription; v71 = CCMenuItemSpriteExtra::create(v70, nullptr, v219); a1->m_buttonMenu->addChild(a1->m_buttonMenu, v71); v72 = a1->m_buttonMenu; v73 = v71->setPosition; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v208, 30.0, v205.y); v211 = cocos2d::CCNode::convertToNodeSpace(v72, (const cocos2d::CCPoint *)&v208); ((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCRect *, float, float))v73)(v71, &v210, v211.x, v211.y); } v74 = cocos2d::CCMenu::create(); a1->addChild(a1, v74); v75 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getScreenRight(v75); v77 = v76 - 30.0; v78 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getScreenTop(v78); cocos2d::CCPoint::CCPoint(&v207, v77, v79 - 30.0); v80 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_deleteBtn_001.png"); v220.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v81 = v80; v220.adj = (size_t)EditLevelLayer::confirmDelete; v82 = CCMenuItemSpriteExtra::create(v80, nullptr, v220); v74->addChild(v74, v82); v83 = v82->setPosition; v212 = cocos2d::CCNode::convertToNodeSpace(v74, &v207); ((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCRect *, float, float))v83)(v82, &v210, v212.x, v212.y); v84 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_helpBtn_001.png"); v85 = v81; getContentSize = v81->getContentSize; setScale = v84->setScale; width = getContentSize(v85)->width; v89 = (float *)v84->getContentSize(v84); setScale(v84, width / *v89); v221.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v221.adj = (size_t)EditLevelLayer::onHelp; v90 = CCMenuItemSpriteExtra::create(v84, nullptr, v221); v74->addChild(v74, v90); v91 = v90->setPosition; v92 = (__int64)v82->getPosition(v82); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v208, 0.0, -60.0); cocos2d::CCPoint::operator+(&v210, v92, &v208); v91(v90, &v210.origin); v93 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_duplicateBtn_001.png"); v222.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v222.adj = (size_t)EditLevelLayer::confirmClone; v94 = CCMenuItemSpriteExtra::create(v93, nullptr, v222); v74->addChild(v74, v94); v95 = v94->setPosition; v96 = (__int64)v90->getPosition(v90); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v208, 0.0, -60.0); cocos2d::CCPoint::operator+(&v210, v96, &v208); v95(v94, &v210.origin); v97 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_orderUpBtn_001.png"); v223.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v223.adj = (size_t)EditLevelLayer::confirmMoveToTop; v98 = CCMenuItemSpriteExtra::create(v97, nullptr, v223); v74->addChild(v74, v98); v99 = v98->setPosition; v100 = (__int64)v94->getPosition(v94); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v208, 0.0, -60.0); cocos2d::CCPoint::operator+(&v210, v100, &v208); v99(v98, &v210.origin); v101 = cocos2d::CCSprite::createWithSpriteFrameName("gj_folderBtn_001.png"); v102 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"%i", (const char *)(unsigned int)a1->m_level->m_levelFolder); cocos2d::CCString::getCString(v102); v103 = cocos2d::CCLabelBMFont::create(); v104 = v101->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; a1->m_folderLabel = v103; v104->addChild_0(v101, v103, 1); m_folderLabel = a1->m_folderLabel; v106 = m_folderLabel->setPosition; v107 = v101->getContentSize(v101)->width * 0.5; v108 = (__int64)v101->getContentSize(v101); cocos2d::CCPoint::CCPoint(&v210.origin, v107, (float)(*(float *)(v108 + 4) * 0.5) + 1.0); v106(m_folderLabel, &v210.origin); cocos2d::CCLabelBMFont::limitLabelWidth(a1->m_folderLabel, 24.0, 0.55, 0.0); v224.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v224.adj = (size_t)EditLevelLayer::onSetFolder; v109 = CCMenuItemSpriteExtra::create(v101, nullptr, v224); CCMenuItemSpriteExtra::setSizeMult(v109, 1.2); v74->addChild(v74, v109); v110 = v109->setPosition; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v208, 30.0, v205.y - 60.0); v213 = cocos2d::CCNode::convertToNodeSpace(v74, (const cocos2d::CCPoint *)&v208); ((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCRect *, float, float))v110)(v109, &v210, v213.x, v213.y); if ( GJGameLevel::isPlatformer(a1->m_level) ) { v143 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_levelLeaderboardBtn_001.png"); v143->setScale(v143, 0.8); v229.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v229.adj = (size_t)EditLevelLayer::onLevelLeaderboard; v144 = CCMenuItemSpriteExtra::create(v143, nullptr, v229); v74->addChild(v74, v144); v145 = v144->setPosition; v146 = (__int64)v109->getPosition(v109); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v208, 0.0, -50.0); cocos2d::CCPoint::operator+(&v210, v146, &v208); v145(v144, &v210.origin); } v111 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_01_001.png"); v225.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v225.adj = (size_t)EditLevelLayer::onBack; v112 = CCMenuItemSpriteExtra::create(v111, nullptr, v225); CCMenuItemSpriteExtra::setSizeMult(v112, 1.6); v113 = (cocos2d::CCNode *)cocos2d::CCMenu::create((cocos2d::CCMenu *)v112, nullptr); a1->addChild_0(a1, v113, 1); v114 = v113->setPosition; v115 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getScreenLeft(v115); v117 = v116 + 24.0; v118 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getScreenTop(v118); cocos2d::CCPoint::CCPoint(&v210.origin, v117, v119 - 23.0); v114(v113, &v210.origin); v120 = cocos2d::CCMenu::create(); a1->addChild_0(a1, v120, 2); v121 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_infoIcon_001.png"); v226.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v226.adj = (size_t)EditLevelLayer::onLevelInfo; v122 = CCMenuItemSpriteExtra::create(v121, nullptr, v226); CCMenuItemSpriteExtra::setSizeMult(v122, 2.0); v120->addChild(v120, v122); v123 = v120->setPosition; v124 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getScreenLeft(v124); v126 = v125 + 30.0; v127 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getScreenBottom(v127); cocos2d::CCPoint::CCPoint(&v210.origin, v126, v128 + 30.0); v123(v120, &v210.origin); v129 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_reportBtn_001.png"); v129->setScale(v129, 0.8); v227.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v227.adj = (size_t)EditLevelLayer::onGuidelines; v130 = CCMenuItemSpriteExtra::create(v129, nullptr, v227); CCMenuItemSpriteExtra::setSizeMult(v130, 1.2); v120->addChild(v120, v130); v131 = v130->setPosition; v132 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getScreenRight(v132); v134 = v133 - 30.0; v135 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getScreenBottom(v135); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v208, v134, v136 + 30.0); v214 = cocos2d::CCNode::convertToNodeSpace(v120, (const cocos2d::CCPoint *)&v208); ((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCRect *, float, float))v131)(v130, &v210, v214.x, v214.y); v137 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_optionsBtn_001.png"); v137->setScale(v137, 0.6); v228.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v228.adj = (size_t)EditLevelLayer::onLevelOptions; v138 = CCMenuItemSpriteExtra::create(v137, nullptr, v228); v120->addChild(v120, v138); v139 = v138->setPosition; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v208, 30.0, 70.0); v215 = cocos2d::CCNode::convertToNodeSpace(v120, (const cocos2d::CCPoint *)&v208); ((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCRect *, float, float))v139)(v138, &v210, v215.x, v215.y); if ( PlatformToolbox::isControllerConnected() ) { GameToolbox::addBackButton(a1, v112); v154 = cocos2d::CCSprite::createWithSpriteFrameName("controllerBtn_Start_001.png"); v62->addChild(v62, v154); v155 = v154->setPosition; v156 = v62->getContentSize(v62)->width * 0.5; v157 = (__int64)v62->getContentSize(v62); cocos2d::CCPoint::CCPoint(&v210.origin, v156, (float)(*(float *)(v157 + 4) * 0.5) + -40.0); v155(v154, &v210.origin); } v140 = v206 - 24; if ( v206 - 24 != (char *)&qword_124B6B0 ) { if ( &pthread_create ) { v141 = (unsigned int *)(v206 - 8); do v142 = __ldaxr(v141); while ( __stlxr(v142 - 1, v141) ); } else { v142 = *((_DWORD *)v206 - 2); *((_DWORD *)v206 - 2) = v142 - 1; } if ( v142 <= 0 ) operator delete(v140); } return v4; }
GD Web Decomp Icon

GD Web Decomp

Raw Source