// // EditLevelLayer::init from 0x7f00b8 to 0x7f17e0 (5928 bytes) // // 2 xrefs: // > EditLevelLayer::create @ 0x7f190c // > @ 0x54238 // // This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True! // // Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings // Generated at Fri, 27 Nov 2026 12:54:35 +0000 // __int64 __fastcall EditLevelLayer::init(EditLevelLayer *this, GJGameLevel *a2) { unsigned __int8 v4; // w0 unsigned int v5; // w23 __int64 v7; // x0 size_t v8; // x1 size_t v9; // x19 __int64 v10; // x19 size_t v11; // x1 char *v12; // x1 size_t v13; // x2 __int64 v14; // x0 size_t v15; // x1 size_t v16; // x1 GameManager *v17; // x0 cocos2d::CCDirector *v18; // x0 cocos2d::CCDirector *v19; // x0 const char *v20; // x1 float *v21; // x26 void (__fastcall *v22)(float *, __int64 *); // x2 const char *v23; // x1 cocos2d::CCDirector **v24; // x26 cocos2d::CCDirector *v25; // x0 cocos2d::CCDirector *ScreenLeft; // x0 float v27; // s0 float v28; // s9 cocos2d::CCDirector *v29; // x0 float v30; // s0 const char *v31; // x1 cocos2d::CCDirector **v32; // x26 cocos2d::CCDirector *v33; // x0 cocos2d::CCDirector *ScreenRight; // x0 float v35; // s0 float v36; // s9 cocos2d::CCDirector *v37; // x0 float v38; // s0 cocos2d::CCArray *v39; // x0 cocos2d::CCObject *v40; // x0 cocos2d::CCDirector *v41; // x0 float v42; // s8 cocos2d::CCDirector *v43; // x0 float v44; // s0 __int64 v45; // x26 void (__fastcall *v46)(__int64, __int64 *); // x2 __int64 v47; // x0 cocos2d::CCMenu **v48; // x2 size_t v49; // x1 cocos2d::CCLabelBMFont *v50; // x0 __int64 v51; // x26 __int64 v52; // x26 void (__fastcall *v53)(__int64, __int64 *); // x2 const char *v54; // x4 __int64 v55; // x25 __int64 v56; // x2 __int64 *v57; // x0 EmoteSprite *v58; // x0 int v59; // w0 TextArea *v60; // x1 cocos2d::CCSprite *v61; // x3 long double v62; // q1 __int64 v63; // x0 __int64 v64; // x28 cocos2d::CCMenu *v65; // x0 int v66; // w24 const char *v67; // x1 size_t v68; // x0 __int64 v69; // x0 __int64 v70; // x2 const char *v71; // x1 __int64 v72; // x0 __int64 v73; // x0 const char *v74; // x1 __int64 v75; // x0 const char *v76; // x1 __int64 v77; // x0 __int64 v78; // x0 __int64 v79; // x22 void (__fastcall *v80)(__int64, __int64 *); // x24 float *v81; // x0 cocos2d::CCMenu *v82; // x0 cocos2d::CCNode *v83; // x25 cocos2d::CCDirector *v84; // x0 cocos2d::CCDirector *v85; // x0 cocos2d::CCDirector *v86; // x0 float v87; // s0 float v88; // s8 cocos2d::CCDirector *v89; // x0 float v90; // s0 const char *v91; // x1 __int64 v92; // x0 __int64 v93; // x22 __int64 (__fastcall *v94)(__int64, __int64 *); // x24 cocos2d::CCDirector *v95; // x0 cocos2d::CCDirector *v96; // x0 float v97; // s0 float v98; // s8 const char *v99; // x1 __int64 v100; // x22 __int64 v101; // x22 void (__fastcall *v102)(__int64, __int64 *); // x26 const char *v103; // x1 cocos2d::CCSprite *v104; // x24 __int64 v105; // x24 void (__fastcall *v106)(__int64, __int64 *); // x28 __int64 v107; // x26 const char *v108; // x1 __int64 v109; // x24 cocos2d::CCString *v110; // x0 cocos2d::CCLabelBMFont *CString; // x0 const char *v112; // x2 __int64 v113; // x0 __int64 v114; // x26 void (__fastcall *v115)(__int64, __int64 *); // x28 float v116; // s8 __int64 v117; // x0 __int64 v118; // x24 __int64 v119; // x0 __int64 (__fastcall *v120)(__int64); // x1 __int64 (__fastcall *v121)(__int64, __int64 *); // x22 __int64 v122; // x26 cocos2d::CCDirector *v123; // x0 cocos2d::CCDirector *v124; // x0 cocos2d::CCArray *v125; // x0 float v126; // s0 float v127; // s9 cocos2d::CCArray *v128; // x26 const char *v129; // x1 __int64 v130; // x24 cocos2d::CCObject *v131; // x0 const char *v132; // x1 __int64 v133; // x22 void (__fastcall *v134)(__int64, float); // x28 float v135; // s8 float *v136; // x0 cocos2d::CCObject *v137; // x0 const char *v138; // x1 __int64 v139; // x22 __int64 v140; // x0 __int64 (__fastcall *v141)(__int64); // x1 void (__fastcall *v142)(__int64, float); // x24 float v143; // s8 float *v144; // x0 cocos2d::CCObject *v145; // x0 __int64 v146; // x0 cocos2d::CCObject *v147; // x0 const char *v148; // x1 __int64 v149; // x0 cocos2d::CCObject *v150; // x0 float v151; // s8 unsigned int v152; // w22 float v153; // s8 __int64 v154; // x24 void (__fastcall *v155)(__int64, __int64 *); // x28 const char *v156; // x1 __int64 v157; // x0 cocos2d::CCMenu *v158; // x24 cocos2d::CCDirector **v159; // x22 __int64 (__fastcall *v160)(cocos2d::CCDirector **, __int64 *); // x25 cocos2d::CCDirector *v161; // x0 cocos2d::CCDirector *v162; // x0 float v163; // s0 float v164; // s8 cocos2d::CCDirector *v165; // x0 float v166; // s0 cocos2d::CCMenu *v167; // x0 cocos2d::CCDirector **v168; // x22 const char *v169; // x1 __int64 v170; // x0 __int64 v171; // x25 __int64 (__fastcall *v172)(cocos2d::CCDirector **, __int64 *); // x25 cocos2d::CCDirector *v173; // x0 cocos2d::CCDirector *v174; // x0 float v175; // s0 float v176; // s8 cocos2d::CCDirector *v177; // x0 float v178; // s0 PlatformToolbox *v179; // x0 cocos2d::CCMenuItem *v180; // x2 __int64 v181; // x0 cocos2d::CCObject *v182; // x0 char *v183; // x26 char *v184; // x0 int v185; // w19 __int64 v186; // x2 size_t v187; // x2 const char *v188; // x1 cocos2d::CCPoint *v189; // x24 __int64 v190; // x20 void (__fastcall *v191)(__int64, __int64 *); // x22 float v192; // s8 __int64 v193; // x0 __int64 v194; // x2 __int64 v195; // x0 __int64 v196; // x1 _BOOL4 v197; // w28 char v198; // w0 __int64 v199; // x5 void *v200; // x0 const char *v201; // x1 size_t v202; // x0 unsigned __int64 v203; // x0 unsigned __int64 v204; // x0 unsigned __int8 v205; // w2 _QWORD *v206; // [xsp+80h] [xbp+80h] void (__fastcall *v207)(float *, __int64 *); // [xsp+90h] [xbp+90h] void (__fastcall *v208)(float *, __int64 *); // [xsp+90h] [xbp+90h] void (__fastcall *v209)(cocos2d::CCDirector **, __int64 *); // [xsp+90h] [xbp+90h] void (__fastcall *v210)(cocos2d::CCDirector **, __int64 *); // [xsp+90h] [xbp+90h] void (__fastcall *v211)(cocos2d::CCDirector **, __int64 *); // [xsp+90h] [xbp+90h] void (__fastcall *v212)(cocos2d::CCDirector **, __int64 *); // [xsp+90h] [xbp+90h] char *v213; // [xsp+90h] [xbp+90h] __int64 v214; // [xsp+90h] [xbp+90h] void (__fastcall *v215)(__int64, __int64 *); // [xsp+90h] [xbp+90h] cocos2d::CCPoint *v216; // [xsp+98h] [xbp+98h] cocos2d::CCPoint *v217; // [xsp+98h] [xbp+98h] cocos2d::CCPoint *v218; // [xsp+98h] [xbp+98h] cocos2d::CCPoint *v219; // [xsp+98h] [xbp+98h] cocos2d::CCPoint *v220; // [xsp+98h] [xbp+98h] int v221; // [xsp+A0h] [xbp+A0h] int v222; // [xsp+A8h] [xbp+A8h] __int64 v223; // [xsp+B0h] [xbp+B0h] BYREF char v224[8]; // [xsp+B8h] [xbp+B8h] BYREF char v225[8]; // [xsp+C0h] [xbp+C0h] BYREF float v226[2]; // [xsp+C8h] [xbp+C8h] BYREF char v227[8]; // [xsp+D0h] [xbp+D0h] BYREF char v228[8]; // [xsp+D8h] [xbp+D8h] BYREF _BYTE v229[16]; // [xsp+E0h] [xbp+E0h] BYREF __int64 v230[2]; // [xsp+F0h] [xbp+F0h] BYREF char v231; // [xsp+100h] [xbp+100h] BYREF _BYTE v232[7]; // [xsp+101h] [xbp+101h] BYREF void *v233; // [xsp+110h] [xbp+110h] __int64 v234; // [xsp+118h] [xbp+118h] BYREF __int64 v235; // [xsp+120h] [xbp+120h] void *v236; // [xsp+128h] [xbp+128h] cocos2d::CCMenu *v237; // [xsp+130h] [xbp+130h] BYREF size_t v238; // [xsp+138h] [xbp+138h] void *v239; // [xsp+140h] [xbp+140h] v4 = cocos2d::CCLayer::init(this); v5 = v4; if ( !v4 ) return v5; *((_QWORD *)this + 59) = a2; cocos2d::CCObject::retain(a2); v237 = nullptr; v7 = *((_QWORD *)this + 59); v238 = 0; v239 = nullptr; if ( (*(_BYTE *)(v7 + 344) & 1) != 0 ) { std::string::__init((__int64 *)&v237, *(void **)(v7 + 360), *(_QWORD *)(v7 + 352)); } else { v8 = *(_QWORD *)(v7 + 352); v237 = *(cocos2d::CCMenu **)(v7 + 344); v238 = v8; v239 = *(void **)(v7 + 360); } v9 = (unsigned __int8)v237 >> 1; if ( ((unsigned __int8)v237 & 1) != 0 ) { v9 = v238; operator delete(v239); } if ( v9 ) { v10 = *((_QWORD *)this + 59); v237 = nullptr; v238 = 0; v239 = nullptr; if ( (*(_BYTE *)(v10 + 344) & 1) != 0 ) { std::string::__init((__int64 *)&v237, *(void **)(v10 + 360), *(_QWORD *)(v10 + 352)); } else { v11 = *(_QWORD *)(v10 + 352); v237 = *(cocos2d::CCMenu **)(v10 + 344); v238 = v11; v239 = *(void **)(v10 + 360); } if ( (cocos2d::CCMenu **)(v10 + 1152) != &v237 ) { if ( ((unsigned __int8)v237 & 1) != 0 ) { v12 = (char *)v239; v13 = v238; } else { v13 = (unsigned __int8)v237 >> 1; v12 = (char *)&v237 + 1; } std::string::assign((__int64 *)(v10 + 1152), v12, v13); } if ( ((unsigned __int8)v237 & 1) != 0 ) operator delete(v239); } v14 = *((_QWORD *)this + 59); v237 = nullptr; v238 = 0; v239 = nullptr; if ( (*(_BYTE *)(v14 + 344) & 1) != 0 ) { std::string::__init((__int64 *)&v237, *(void **)(v14 + 360), *(_QWORD *)(v14 + 352)); } else { v15 = *(_QWORD *)(v14 + 352); v237 = *(cocos2d::CCMenu **)(v14 + 344); v238 = v15; v239 = *(void **)(v14 + 360); } if ( (*((_BYTE *)this + 504) & 1) != 0 ) { **((_BYTE **)this + 65) = 0; *((_QWORD *)this + 64) = 0; if ( (*((_BYTE *)this + 504) & 1) != 0 ) { v183 = *((char **)this + 65); v184 = (char *)this + 505; v185 = 1; LABEL_53: v186 = *((_QWORD *)this + 64); LABEL_54: v187 = v186 + 1; if ( v187 ) memcpy(v184, v183, v187); if ( v185 ) operator delete(v183); goto LABEL_19; } v203 = *((_BYTE *)this + 504) >> 1; if ( v203 <= 0x16 ) goto LABEL_19; v204 = (v203 + 16) & 0xFFFFFFFFFFFFFFF0LL; if ( v204 == 23 ) goto LABEL_19; if ( v204 - 1 > 0x16 ) { v184 = (char *)operator new(v204); v205 = *((_BYTE *)this + 504); v185 = v205 & 1; if ( (v205 & 1) == 0 ) { LABEL_89: v183 = (char *)this + 505; v186 = v205 >> 1; goto LABEL_54; } } else { v184 = (char *)operator new(v204); v205 = *((_BYTE *)this + 504); v185 = v205 & 1; if ( (v205 & 1) == 0 ) goto LABEL_89; } v183 = *((char **)this + 65); goto LABEL_53; } LABEL_19: *((_QWORD *)this + 65) = v239; v16 = v238; *((_QWORD *)this + 63) = v237; *((_QWORD *)this + 64) = v16; v17 = (GameManager *)*((unsigned int *)a2 + 285); *((_DWORD *)this + 125) = (_DWORD)v17; *(_DWORD *)(GameManager::sharedState(v17) + 964) = *(_DWORD *)(*((_QWORD *)this + 59) + 1144LL); (*(void (__fastcall **)(EditLevelLayer *, __int64))(*(_QWORD *)this + 1072LL))(this, 1); v18 = (cocos2d::CCDirector *)(*(__int64 (__fastcall **)(EditLevelLayer *, __int64))(*(_QWORD *)this + 1088LL))( this, 1); v19 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v18); cocos2d::CCDirector::getWinSize(&v223, v19); v21 = (float *)cocos2d::CCSprite::create((cocos2d::CCSprite *)"GJ_gradientBG.png", v20); v207 = *(void (__fastcall **)(float *, __int64 *))(*(_QWORD *)v21 + 296LL); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v230, 0.0, 0.0); v207(v21, v230); (*(void (__fastcall **)(EditLevelLayer *, float *, __int64))(*(_QWORD *)this + 464LL))(this, v21, 4294967294LL); (*(void (__fastcall **)(float *, float))(*(_QWORD *)v21 + 128LL))(v21, (float)(*(float *)&v223 + 10.0) / v21[108]); (*(void (__fastcall **)(float *, float))(*(_QWORD *)v21 + 144LL))( v21, (float)(*((float *)&v223 + 1) + 10.0) / v21[109]); v208 = *(void (__fastcall **)(float *, __int64 *))(*(_QWORD *)v21 + 184LL); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v230, -5.0, -5.0); v208(v21, v230); v22 = *(void (__fastcall **)(float *, __int64 *))(*(_QWORD *)v21 + 960LL); LOWORD(v230[0]) = 26112; BYTE2(v230[0]) = -1; v22(v21, v230); v24 = (cocos2d::CCDirector **)cocos2d::CCSprite::createWithSpriteFrameName( (cocos2d::CCSprite *)"GJ_sideArt_001.png", v23); v209 = *((void (__fastcall **)(cocos2d::CCDirector **, __int64 *))*v24 + 37); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v230, 0.0, 0.0); v209(v24, v230); v210 = *((void (__fastcall **)(cocos2d::CCDirector **, __int64 *))*v24 + 23); v25 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(*v24); ScreenLeft = (cocos2d::CCDirector *)cocos2d::CCDirector::getScreenLeft(v25); v28 = v27; v29 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(ScreenLeft); cocos2d::CCDirector::getScreenBottom(v29); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v230, v28 - 1.0, v30 - 1.0); v210(v24, v230); (*(void (__fastcall **)(EditLevelLayer *, cocos2d::CCDirector **, __int64))(*(_QWORD *)this + 464LL))(this, v24, 1); v32 = (cocos2d::CCDirector **)cocos2d::CCSprite::createWithSpriteFrameName( (cocos2d::CCSprite *)"GJ_sideArt_001.png", v31); v211 = *((void (__fastcall **)(cocos2d::CCDirector **, __int64 *))*v32 + 37); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v230, 1.0, 0.0); v211(v32, v230); v212 = *((void (__fastcall **)(cocos2d::CCDirector **, __int64 *))*v32 + 23); v33 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(*v32); ScreenRight = (cocos2d::CCDirector *)cocos2d::CCDirector::getScreenRight(v33); v36 = v35; v37 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(ScreenRight); cocos2d::CCDirector::getScreenBottom(v37); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v230, v36 + 1.0, v38 - 1.0); v212(v32, v230); cocos2d::CCSprite::setFlipX((cocos2d::CCSprite *)v32, 1); v39 = (cocos2d::CCArray *)(*(__int64 (__fastcall **)(EditLevelLayer *, cocos2d::CCDirector **, __int64))(*(_QWORD *)this + 464LL))( this, v32, 1); v40 = (cocos2d::CCObject *)cocos2d::CCArray::create(v39); *((_QWORD *)this + 60) = v40; cocos2d::CCObject::retain(v40); v41 = (cocos2d::CCDirector *)cocos2d::CCRect::CCRect((cocos2d::CCRect *)v229, 0.0, 0.0, 80.0, 80.0); v42 = *(float *)&v223 * 0.5; v43 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v41); cocos2d::CCDirector::getScreenTop(v43); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v224, v42, v44 - 30.0); cocos2d::CCRect::CCRect((cocos2d::CCRect *)v230, (const cocos2d::CCRect *)v229); v45 = cocos2d::extension::CCScale9Sprite::create("square02b_001.png", v230); (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v45 + 912LL))(v45, 0xFFFFFFFFLL); cocos2d::CCSize::CCSize((cocos2d::CCSize *)v225, 365.0, 40.0); (*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v45 + 320LL))(v45, v225); (*(void (__fastcall **)(EditLevelLayer *, __int64, __int64))(*(_QWORD *)this + 464LL))(this, v45, 0xFFFFFFFFLL); (*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v45 + 184LL))(v45, v224); v46 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v45 + 960LL); LOWORD(v230[0]) = 14336; BYTE2(v230[0]) = -115; v46(v45, v230); v47 = *((_QWORD *)this + 59); if ( *(int *)(v47 + 788) > 1 || *(_BYTE *)(v47 + 785) ) { v237 = nullptr; v48 = (cocos2d::CCMenu **)(v47 + 344); v238 = 0; v239 = nullptr; if ( (*(_BYTE *)(v47 + 344) & 1) != 0 ) { std::string::__init((__int64 *)&v237, *(void **)(v47 + 360), *(_QWORD *)(v47 + 352)); } else { v49 = *(_QWORD *)(v47 + 352); v237 = *v48; v238 = v49; v239 = *(void **)(v47 + 360); } v50 = (cocos2d::CCLabelBMFont *)((char *)&v237 + 1); if ( ((unsigned __int8)v237 & 1) != 0 ) v50 = (cocos2d::CCLabelBMFont *)v239; v51 = cocos2d::CCLabelBMFont::create(v50, "goldFont.fnt", (const char *)v48); if ( ((unsigned __int8)v237 & 1) != 0 ) operator delete(v239); v213 = (char *)this + 408; (*(void (__fastcall **)(EditLevelLayer *, __int64, __int64))(*(_QWORD *)this + 464LL))(this, v51, 20); (*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v51 + 184LL))(v51, v224); } else { v213 = (char *)this + 408; v206 = (_QWORD *)CCTextInputNode::create( (CCTextInputNode *)"Level Name", 300.0, 50.0, "Thonburi", (const char *)&off_18, "bigFont.fnt", (const char *)this + 408); (*(void (__fastcall **)(EditLevelLayer *, _QWORD *, __int64))(*(_QWORD *)this + 464LL))(this, v206, 18); v194 = *v206; v206[73] = (char *)this + 408; (*(void (__fastcall **)(_QWORD *, __int64))(v194 + 72))(v206, 1); (*(void (__fastcall **)(_QWORD *, char *))(*v206 + 184LL))(v206, v224); *((_DWORD *)v206 + 148) = 20; *((_BYTE *)v206 + 608) = 1; v234 = 0; v195 = *((_QWORD *)this + 59); v235 = 0; v236 = nullptr; if ( (*(_BYTE *)(v195 + 344) & 1) != 0 ) { std::string::__init(&v234, *(void **)(v195 + 360), *(_QWORD *)(v195 + 352)); } else { v196 = *(_QWORD *)(v195 + 352); v234 = *(_QWORD *)(v195 + 344); v235 = v196; v236 = *(void **)(v195 + 360); } v237 = nullptr; v238 = 0; v239 = nullptr; std::string::__init((__int64 *)&v237, &byte_11B8890, 0); v197 = sub_7ED2C0((__int64)&v234, (__int64)&v237); if ( ((unsigned __int8)v237 & 1) != 0 ) operator delete(v239); if ( (v234 & 1) != 0 ) operator delete(v236); if ( !v197 ) { v198 = *((_BYTE *)a2 + 344); v234 = 0; v235 = 0; v236 = nullptr; if ( (v198 & 1) != 0 ) { std::string::__init(&v234, *((void **)a2 + 45), *((_QWORD *)a2 + 44)); } else { v199 = *((_QWORD *)a2 + 44); v200 = *((void **)a2 + 45); v234 = *((_QWORD *)a2 + 43); v235 = v199; v236 = v200; } v201 = (char *)&v234 + 1; if ( (v234 & 1) != 0 ) v201 = (const char *)v236; v220 = (cocos2d::CCPoint *)v201; v237 = nullptr; v238 = 0; v239 = nullptr; v202 = strlen(v201); std::string::__init((__int64 *)&v237, v220, v202); CCTextInputNode::setString(v206, (char *)&v237); if ( ((unsigned __int8)v237 & 1) != 0 ) operator delete(v239); if ( (v234 & 1) != 0 ) operator delete(v236); } LOBYTE(v221) = 120; *(_WORD *)((char *)&v221 + 1) = -3926; CCTextInputNode::setLabelPlaceholderColor((__int64)v206, v221); CCTextInputNode::setLabelPlaceholderScale((CCTextInputNode *)v206, 0.7); cocos2d::CCArray::addObject(*((cocos2d::CCArray **)this + 60), (cocos2d::CCObject *)v206); } cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)v226, *(float *)&v223 * 0.5, (float)(*((float *)&v223 + 1) * 0.5) + 65.0); cocos2d::CCRect::CCRect((cocos2d::CCRect *)v230, (const cocos2d::CCRect *)v229); v52 = cocos2d::extension::CCScale9Sprite::create("square02b_001.png", v230); (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v52 + 912LL))(v52, 0xFFFFFFFFLL); cocos2d::CCSize::CCSize((cocos2d::CCSize *)v230, 365.0, 60.0); cocos2d::CCSize::operator=(v225, v230); (*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v52 + 320LL))(v52, v225); (*(void (__fastcall **)(EditLevelLayer *, __int64, __int64))(*(_QWORD *)this + 464LL))(this, v52, 0xFFFFFFFFLL); (*(void (__fastcall **)(__int64, float *))(*(_QWORD *)v52 + 184LL))(v52, v226); v53 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v52 + 960LL); LOWORD(v230[0]) = 14336; BYTE2(v230[0]) = -115; v53(v52, v230); v55 = CCTextInputNode::create( (CCTextInputNode *)"Description [Optional]", 365.0, 50.0, "Thonburi", (const char *)&off_18, nullptr, v54); *(_BYTE *)(v55 + 608) = 0; (*(void (__fastcall **)(EditLevelLayer *, __int64, __int64))(*(_QWORD *)this + 464LL))(this, v55, 20); v56 = *(_QWORD *)v55; *(_QWORD *)(v55 + 584) = v213; (*(void (__fastcall **)(__int64, __int64))(v56 + 72))(v55, 2); (*(void (__fastcall **)(__int64, float *))(*(_QWORD *)v55 + 184LL))(v55, v226); v237 = nullptr; v238 = 0; v239 = nullptr; std::string::__init( (__int64 *)&v237, " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.,-!?:;)(/\\\"'`*=+-_%[]<>|@&^#{}%$~", 0x61u); CCTextInputNode::setAllowedChars(v55, (__int64)&v237); if ( ((unsigned __int8)v237 & 1) != 0 ) operator delete(v239); v57 = CCTextInputNode::setUnicodeText((__int64 *)v55, 1); v58 = (EmoteSprite *)(17 * (unsigned int)EmoteSprite::maxEmotesComment((EmoteSprite *)v57)); *(_DWORD *)(v55 + 592) = (_DWORD)v58 + 180; v59 = EmoteSprite::maxEmotesComment(v58); CCTextInputNode::setParseEmotes((CCTextInputNode *)v55, v59); cocos2d::CCArray::addObject(*((cocos2d::CCArray **)this + 60), (cocos2d::CCObject *)v55); (*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(v55 + 576) + 344LL))(*(_QWORD *)(v55 + 576), 0); v237 = nullptr; v238 = 0; v239 = nullptr; std::string::__init((__int64 *)&v237, &byte_11B8890, 0); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v230, 0.5, 0.5); v60 = (TextArea *)TextArea::create( (char *)&v237, "chatFont.fnt", (const cocos2d::CCPoint *)v230, 1, 0, 1.0, 346.5, 20.0); if ( ((unsigned __int8)v237 & 1) != 0 ) { v219 = v60; operator delete(v239); v60 = v219; } CCTextInputNode::addTextArea((CCTextInputNode *)v55, v60); CCTextInputNode::setMaxTextAreaHeight((CCTextInputNode *)v55, 54.0); LOWORD(v222) = -21896; BYTE2(v222) = -16; CCTextInputNode::setLabelPlaceholderColor(v55, v222); v237 = nullptr; v238 = 0; v239 = nullptr; std::string::__init((__int64 *)&v237, "easy", 4u); v61 = EmoteSprite::createWithName((char *)&v237); if ( ((unsigned __int8)v237 & 1) != 0 ) { v218 = v61; operator delete(v239); v61 = v218; } LODWORD(v62) = 0; v214 = (__int64)v61; EmoteSprite::fitToHeight(v61, 18.0, v62); v63 = CCMenuItemSpriteExtra::create(v214, 0, (__int64)this, (__int64)EditLevelLayer::onEmotes, 0); *((_QWORD *)this + 68) = v63; CCMenuItemSpriteExtra::setSizeMult(v63, 1.5); v64 = cocos2d::CCMenu::create(*((cocos2d::CCMenu **)this + 68), nullptr); v215 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v64 + 184LL); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v230, (float)(v226[0] + 182.5) + 17.0, v226[1]); v215(v64, v230); (*(void (__fastcall **)(EditLevelLayer *, __int64, __int64))(*(_QWORD *)this + 464LL))(this, v64, 25); EditLevelLayer::updateDescText(this, &byte_11B8890); GJGameLevel::getUnpackedLevelDescription(a2); v234 = 0; v235 = 0; v236 = nullptr; std::string::__init(&v234, &byte_11B8890, 0); v65 = (cocos2d::CCMenu *)sub_7ED2C0((__int64)&v231, (__int64)&v234); v66 = (unsigned __int8)v65; if ( (v234 & 1) != 0 ) operator delete(v236); if ( !v66 ) { v67 = v232; if ( (v231 & 1) != 0 ) v67 = (const char *)v233; v216 = (cocos2d::CCPoint *)v67; v237 = nullptr; v238 = 0; v239 = nullptr; v68 = strlen(v67); std::string::__init((__int64 *)&v237, v216, v68); CCTextInputNode::setString((_QWORD *)v55, (char *)&v237); v65 = (cocos2d::CCMenu *)(unsigned __int8)v237; if ( ((unsigned __int8)v237 & 1) != 0 ) operator delete(v239); } v69 = cocos2d::CCMenu::create(v65); v70 = *(_QWORD *)this; *((_QWORD *)this + 58) = v69; (*(void (__fastcall **)(EditLevelLayer *, __int64))(v70 + 456))(this, v69); v72 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_editBtn_001.png", v71); v73 = CCMenuItemSpriteExtra::create(v72, 0, (__int64)this, (__int64)EditLevelLayer::onEdit, 0); (*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 58) + 456LL))(*((_QWORD *)this + 58), v73); v217 = (cocos2d::CCPoint *)cocos2d::CCSprite::createWithSpriteFrameName( (cocos2d::CCSprite *)"GJ_playBtn2_001.png", v74); v75 = CCMenuItemSpriteExtra::create((__int64)v217, 0, (__int64)this, (__int64)EditLevelLayer::onPlay, 0); (*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 58) + 456LL))(*((_QWORD *)this + 58), v75); v77 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_shareBtn_001.png", v76); v78 = CCMenuItemSpriteExtra::create(v77, 0, (__int64)this, (__int64)EditLevelLayer::onShare, 0); (*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 58) + 456LL))(*((_QWORD *)this + 58), v78); cocos2d::CCMenu::alignItemsHorizontallyWithPadding(*((cocos2d::CCMenu **)this + 58), 20.0); v79 = *((_QWORD *)this + 58); v80 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v79 + 184LL); v81 = (float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v79 + 192LL))(v79); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v230, *v81, (float)(*((float *)&v223 + 1) * 0.5) + -25.0); v80(v79, v230); v82 = (cocos2d::CCMenu *)EditLevelLayer::setupLevelInfo(this); v83 = (cocos2d::CCNode *)cocos2d::CCMenu::create(v82); v84 = (cocos2d::CCDirector *)(*(__int64 (__fastcall **)(EditLevelLayer *, cocos2d::CCNode *))(*(_QWORD *)this + 456LL))( this, v83); v85 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v84); v86 = (cocos2d::CCDirector *)cocos2d::CCDirector::getScreenRight(v85); v88 = v87 - 30.0; v89 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v86); cocos2d::CCDirector::getScreenTop(v89); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v227, v88, v90 - 30.0); v92 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_deleteBtn_001.png", v91); v93 = CCMenuItemSpriteExtra::create(v92, 0, (__int64)this, (__int64)EditLevelLayer::confirmDelete, 0); (*(void (__fastcall **)(cocos2d::CCNode *, __int64))(*(_QWORD *)v83 + 456LL))(v83, v93); v94 = *(__int64 (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v93 + 184LL); cocos2d::CCNode::convertToNodeSpace(v230, v83, (const cocos2d::CCPoint *)v227); v95 = (cocos2d::CCDirector *)v94(v93, v230); v96 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v95); cocos2d::CCDirector::getScreenRight(v96); v98 = v97 - 30.0; v100 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"edit_leftBtn_001.png", v99); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v100 + 160LL))(v100, 0.9); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v100 + 360LL))(v100, 90.0); v101 = CCMenuItemSpriteExtra::create(v100, 0, (__int64)this, (__int64)EditLevelLayer::confirmMoveToTop, 0); CCMenuItemSpriteExtra::setSizeMult(v101, 1.1); (*(void (__fastcall **)(cocos2d::CCNode *, __int64))(*(_QWORD *)v83 + 456LL))(v83, v101); v102 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v101 + 184LL); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v228, v98, (float)(*((float *)&v223 + 1) * 0.5) + 2.5); cocos2d::CCNode::convertToNodeSpace(v230, v83, (const cocos2d::CCPoint *)v228); v102(v101, v230); v104 = (cocos2d::CCSprite *)cocos2d::CCSprite::createWithSpriteFrameName( (cocos2d::CCSprite *)"edit_leftBtn_001.png", v103); (*(void (__fastcall **)(cocos2d::CCSprite *, float))(*(_QWORD *)v104 + 160LL))(v104, 0.9); cocos2d::CCSprite::setFlipY(v104, 1); (*(void (__fastcall **)(cocos2d::CCSprite *, float))(*(_QWORD *)v104 + 360LL))(v104, -90.0); v105 = CCMenuItemSpriteExtra::create((__int64)v104, 0, (__int64)this, (__int64)EditLevelLayer::confirmMoveToBottom, 0); CCMenuItemSpriteExtra::setSizeMult(v105, 1.1); (*(void (__fastcall **)(cocos2d::CCNode *, __int64))(*(_QWORD *)v83 + 456LL))(v83, v105); v106 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v105 + 184LL); v107 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v101 + 192LL))(v101); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v228, 0.0, -30.0); cocos2d::CCPoint::operator+(v230, v107); v106(v105, v230); v109 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"gj_folderBtn_001.png", v108); v110 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"%i", (const char *)*(unsigned int *)(*((_QWORD *)this + 59) + 916LL)); CString = (cocos2d::CCLabelBMFont *)cocos2d::CCString::getCString(v110); v113 = cocos2d::CCLabelBMFont::create(CString, "bigFont.fnt", v112); *((_QWORD *)this + 61) = v113; (*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)v109 + 464LL))(v109, v113, 1); v114 = *((_QWORD *)this + 61); v115 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v114 + 184LL); v116 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v109 + 328LL))(v109) * 0.5; v117 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v109 + 328LL))(v109); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v230, v116, (float)(*(float *)(v117 + 4) * 0.5) + 1.0); v115(v114, v230); cocos2d::CCLabelBMFont::limitLabelWidth(*((cocos2d::CCLabelBMFont **)this + 61), 24.0, 0.55, 0.0); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v109 + 160LL))(v109, 0.8); v118 = CCMenuItemSpriteExtra::create(v109, 0, (__int64)this, (__int64)EditLevelLayer::onSetFolder, 0); CCMenuItemSpriteExtra::setSizeMult(v118, 1.2); (*(void (__fastcall **)(cocos2d::CCNode *, __int64))(*(_QWORD *)v83 + 456LL))(v83, v118); v119 = v101; v120 = *(__int64 (__fastcall **)(__int64))(*(_QWORD *)v101 + 192LL); v121 = *(__int64 (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v118 + 184LL); v122 = v120(v119); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v228, 0.0, 25.0); cocos2d::CCPoint::operator+(v230, v122); v123 = (cocos2d::CCDirector *)v121(v118, v230); v124 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v123); v125 = (cocos2d::CCArray *)cocos2d::CCDirector::getScreenLeft(v124); v127 = v126 + 30.0; v128 = (cocos2d::CCArray *)cocos2d::CCArray::create(v125); v130 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"sideBtn_config_001.png", v129); v131 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::create( v130, 0, (__int64)this, (__int64)EditLevelLayer::onCreatorSettings, 0); cocos2d::CCArray::addObject(v128, v131); v133 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_duplicateBtn_001.png", v132); v134 = *(void (__fastcall **)(__int64, float))(*(_QWORD *)v133 + 160LL); v135 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v130 + 328LL))(v130); v136 = (float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v133 + 328LL))(v133); v134(v133, v135 / *v136); v137 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::create( v133, 0, (__int64)this, (__int64)EditLevelLayer::confirmClone, 0); cocos2d::CCArray::addObject(v128, v137); if ( (unsigned __int8)GJGameLevel::isPlatformer(*((GJGameLevel **)this + 59)) ) { v139 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_levelLeaderboardBtn_001.png", v138); v140 = v130; v141 = *(__int64 (__fastcall **)(__int64))(*(_QWORD *)v130 + 328LL); v142 = *(void (__fastcall **)(__int64, float))(*(_QWORD *)v139 + 160LL); v143 = *(float *)v141(v140); v144 = (float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v139 + 328LL))(v139); v142(v139, v143 / *v144); v145 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::create( v139, 0, (__int64)this, (__int64)EditLevelLayer::onLevelLeaderboard, 0); cocos2d::CCArray::addObject(v128, v145); } v146 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_exportBtn_001.png", v138); v147 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::create( v146, 0, (__int64)this, (__int64)EditLevelLayer::onExportLevel, 0); cocos2d::CCArray::addObject(v128, v147); if ( !(unsigned __int8)GJGameLevel::isPlatformer(*((GJGameLevel **)this + 59)) ) { v181 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"sideBtn_death_001.png", v148); v182 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::create( v181, 0, (__int64)this, (__int64)EditLevelLayer::onDeathTracker, 0); cocos2d::CCArray::addObject(v128, v182); } v149 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"sideBtn_options_001.png", v148); v150 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::create( v149, 0, (__int64)this, (__int64)EditLevelLayer::onLevelOptions, 0); cocos2d::CCArray::addObject(v128, v150); v151 = *((float *)&v223 + 1) * 0.5; v152 = 0; v153 = v151 + (float)((float)((float)((unsigned int)cocos2d::CCArray::count(v128) - 1) * 34.0) * 0.5); while ( v152 < (unsigned int)cocos2d::CCArray::count(v128) ) { v154 = cocos2d::CCArray::objectAtIndex(v128, v152); (*(void (__fastcall **)(cocos2d::CCNode *, __int64))(*(_QWORD *)v83 + 456LL))(v83, v154); v155 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v154 + 184LL); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v228, v127, v153 - (float)((float)(int)v152 * 34.0)); cocos2d::CCNode::convertToNodeSpace(v230, v83, (const cocos2d::CCPoint *)v228); v155(v154, v230); ++v152; } v157 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_arrow_01_001.png", v156); v158 = (cocos2d::CCMenu *)CCMenuItemSpriteExtra::create(v157, 0, (__int64)this, (__int64)EditLevelLayer::onBack, 0); CCMenuItemSpriteExtra::setSizeMult((__int64)v158, 1.6); v159 = (cocos2d::CCDirector **)cocos2d::CCMenu::create(v158, nullptr); (*(void (__fastcall **)(EditLevelLayer *, cocos2d::CCDirector **, __int64))(*(_QWORD *)this + 464LL))(this, v159, 1); v160 = *((__int64 (__fastcall **)(cocos2d::CCDirector **, __int64 *))*v159 + 23); v161 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(*v159); v162 = (cocos2d::CCDirector *)cocos2d::CCDirector::getScreenLeft(v161); v164 = v163 + 24.0; v165 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v162); cocos2d::CCDirector::getScreenTop(v165); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v230, v164, v166 - 23.0); v167 = (cocos2d::CCMenu *)v160(v159, v230); v168 = (cocos2d::CCDirector **)cocos2d::CCMenu::create(v167); (*(void (__fastcall **)(EditLevelLayer *, cocos2d::CCDirector **, __int64))(*(_QWORD *)this + 464LL))(this, v168, 2); v170 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_infoIcon_001.png", v169); v171 = CCMenuItemSpriteExtra::create(v170, 0, (__int64)this, (__int64)EditLevelLayer::onLevelInfo, 0); CCMenuItemSpriteExtra::setSizeMult(v171, 2.0); (*((void (__fastcall **)(cocos2d::CCDirector **, __int64))*v168 + 57))(v168, v171); v172 = *((__int64 (__fastcall **)(cocos2d::CCDirector **, __int64 *))*v168 + 23); v173 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(*v168); v174 = (cocos2d::CCDirector *)cocos2d::CCDirector::getScreenLeft(v173); v176 = v175 + 30.0; v177 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v174); cocos2d::CCDirector::getScreenBottom(v177); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v230, v176, v178 + 30.0); v179 = (PlatformToolbox *)v172(v168, v230); if ( (unsigned __int8)PlatformToolbox::isControllerConnected(v179) ) { GameToolbox::addBackButton(this, v158, v180); v189 = v217; v190 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"controllerBtn_Start_001.png", v188); (*(void (__fastcall **)(cocos2d::CCPoint *, __int64))(*(_QWORD *)v217 + 456LL))(v217, v190); v191 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v190 + 184LL); v192 = *(float *)(*(__int64 (__fastcall **)(cocos2d::CCPoint *))(*(_QWORD *)v189 + 328LL))(v189) * 0.5; v193 = (*(__int64 (__fastcall **)(cocos2d::CCPoint *))(*(_QWORD *)v189 + 328LL))(v189); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v230, v192, (float)(*(float *)(v193 + 4) * 0.5) + -40.0); v191(v190, v230); } if ( (v231 & 1) != 0 ) operator delete(v233); return v5; }
GD Web Decomp Icon

GD Web Decomp

Raw Source