//
// EditLevelLayer::init from 0x4a0ea0 to 0x4a1f58 (4280 bytes)
//
// 1 xrefs:
// > EditLevelLayer::create @ 0x4a2054
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 11:49:51 +0000
//
int __fastcall EditLevelLayer::init(cocos2d::CCMenu **this, GJGameLevel *a2)
{
int v4; // r7
int v5; // r7
bool v6; // zf
int v7; // r3
int v8; // r0
int v9; // r0
unsigned int v10; // r3
unsigned int v11; // r0
char *v12; // r0
char *v13; // r9
int v14; // r7
int v15; // r2
int v16; // r2
int v17; // r0
cocos2d::CCMenu *v18; // r1
cocos2d::CCLabelBMFont *v19; // r2
GameManager *v20; // r0
cocos2d::CCDirector *v21; // r0
const char *v22; // r1
float *v23; // r10
void (__fastcall *v24)(float *, _DWORD *); // r11
void (__fastcall *v25)(float *, _DWORD *); // r11
void (__fastcall *v26)(float *, _DWORD *); // r3
const char *v27; // r1
int v28; // r10
cocos2d::CCDirector *v29; // r0
cocos2d::CCDirector *v30; // r0
float v31; // s17
cocos2d::CCDirector *v32; // r0
float v33; // r0
const char *v34; // r1
cocos2d::CCSprite *v35; // r10
int (__fastcall *v36)(cocos2d::CCSprite *, _DWORD *); // r11
cocos2d::CCDirector *v37; // r0
void (__fastcall *v38)(cocos2d::CCSprite *, _DWORD *); // r11
cocos2d::CCDirector *v39; // r0
float v40; // s17
cocos2d::CCDirector *v41; // r0
float v42; // r0
cocos2d::CCArray *v43; // r0
cocos2d::CCObject *v44; // r0
cocos2d::CCDirector *v45; // r0
float v46; // s18
cocos2d::CCDirector *v47; // r0
float v48; // r0
int v49; // r11
void (__fastcall *v50)(int, _DWORD *); // r3
int v51; // r1
size_t v52; // r11
const char *v53; // r2
cocos2d::CCLabelBMFont *v54; // r0
int v55; // r9
int v56; // r9
void (__fastcall *v57)(int, _DWORD *); // r3
int *v58; // r0
int *v59; // r9
int *v60; // r0
EmoteSprite *v61; // r0
int v62; // r0
TextArea *v63; // r7
int v64; // r1
int v65; // r2
int v66; // r3
cocos2d::CCSprite *v67; // r7
int v68; // r0
int v69; // r11
char *v70; // r8
_BOOL4 v71; // r10
cocos2d::CCMenu *v72; // r0
cocos2d::CCMenu *v73; // r0
cocos2d::CCMenu *v74; // r3
const char *v75; // r1
int v76; // r0
int v77; // r0
const char *v78; // r1
int v79; // r11
int v80; // r0
const char *v81; // r1
int v82; // r0
int v83; // r0
int v84; // r6
void (__fastcall *v85)(int, _DWORD *); // r8
float *v86; // r0
cocos2d::CCMenu *v87; // r0
const cocos2d::CCPoint *v88; // r6
cocos2d::CCDirector *v89; // r0
cocos2d::CCDirector *v90; // r0
float v91; // r0
float v92; // s17
cocos2d::CCDirector *v93; // r0
float v94; // r0
const char *v95; // r1
int v96; // r0
int v97; // r8
int (__fastcall *v98)(int, _DWORD *); // r10
cocos2d::CCDirector *v99; // r0
cocos2d::CCDirector *v100; // r0
float v101; // s15
const char *v102; // r1
int v103; // r7
int v104; // r7
void (__fastcall *v105)(int, _DWORD *); // r10
const char *v106; // r1
cocos2d::CCSprite *v107; // r9
int v108; // r10
const char *v109; // r1
int v110; // r8
cocos2d::CCString *v111; // r0
cocos2d::CCLabelBMFont *CString; // r0
const char *v113; // r2
cocos2d::CCMenu *v114; // r0
int v115; // r10
float v116; // s17
int v117; // r0
int v118; // r8
int v119; // r10
cocos2d::CCDirector *v120; // r0
cocos2d::CCDirector *v121; // r0
float v122; // r0
float v123; // s18
cocos2d::CCArray *v124; // r7
const char *v125; // r1
int v126; // r9
cocos2d::CCObject *v127; // r0
const char *v128; // r1
int v129; // r8
void (__fastcall *v130)(int, _DWORD); // r10
float v131; // s16
float *v132; // r0
cocos2d::CCObject *v133; // r0
const char *v134; // r1
int v135; // r0
cocos2d::CCObject *v136; // r0
const char *v137; // r1
int v138; // r0
cocos2d::CCObject *v139; // r0
float v140; // s16
unsigned int v141; // r8
float v142; // s16
const char *v143; // r1
int v144; // r0
cocos2d::CCMenu *v145; // r7
int v146; // r6
cocos2d::CCDirector *v147; // r0
int (__fastcall *v148)(int, _DWORD *); // r9
cocos2d::CCDirector *v149; // r0
float v150; // r0
float v151; // s16
cocos2d::CCDirector *v152; // r0
float v153; // r0
cocos2d::CCMenu *v154; // r0
int v155; // r6
const char *v156; // r1
int v157; // r0
int v158; // r5
cocos2d::CCDirector *v159; // r0
int (__fastcall *v160)(int, _BYTE *); // r8
cocos2d::CCDirector *v161; // r0
float v162; // r0
float v163; // s17
cocos2d::CCDirector *v164; // r0
float v165; // r0
PlatformToolbox *v166; // r0
cocos2d::CCMenuItem *v167; // r2
int *v169; // r9
const char *v170; // r11
size_t v171; // r0
size_t v172; // r0
int v173; // r8
void (__fastcall *v174)(int, _DWORD); // r10
float v175; // s16
float *v176; // r0
cocos2d::CCObject *v177; // r0
int v178; // r0
cocos2d::CCObject *v179; // r0
int v180; // r9
const char *v181; // r1
int v182; // r4
void (__fastcall *v183)(int, _BYTE *); // r6
float v184; // s17
int v185; // r0
const char *v186; // [sp+8h] [bp-11Ch]
int (__fastcall *v187)(int, _DWORD *); // [sp+14h] [bp-110h]
void (__fastcall *v188)(int, _DWORD *); // [sp+14h] [bp-110h]
void (__fastcall *v189)(int, _DWORD *); // [sp+14h] [bp-110h]
int v190; // [sp+18h] [bp-10Ch]
cocos2d::CCNode *v191; // [sp+1Ch] [bp-108h]
cocos2d::CCNode *v192; // [sp+1Ch] [bp-108h]
cocos2d::CCNode *v193; // [sp+1Ch] [bp-108h]
int v194; // [sp+20h] [bp-104h]
void (__fastcall *v195)(int, _DWORD *); // [sp+20h] [bp-104h]
int v196; // [sp+28h] [bp-FCh]
int v197; // [sp+2Ch] [bp-F8h]
float v198; // [sp+30h] [bp-F4h] BYREF
float v199; // [sp+34h] [bp-F0h]
_BYTE v200[8]; // [sp+38h] [bp-ECh] BYREF
_BYTE v201[8]; // [sp+40h] [bp-E4h] BYREF
float v202[2]; // [sp+48h] [bp-DCh] BYREF
char v203[8]; // [sp+50h] [bp-D4h] BYREF
_BYTE v204[8]; // [sp+58h] [bp-CCh] BYREF
int (__fastcall *v205)(EditLevelLayer *, cocos2d::CCObject *); // [sp+60h] [bp-C4h]
int v206; // [sp+64h] [bp-C0h]
int (__fastcall *v207)(LevelEditorLayer **, cocos2d::CCObject *); // [sp+68h] [bp-BCh]
int v208; // [sp+6Ch] [bp-B8h]
int (__fastcall *v209)(EditLevelLayer *, cocos2d::CCObject *); // [sp+70h] [bp-B4h]
int v210; // [sp+74h] [bp-B0h]
int (__fastcall *v211)(ShareLevelLayer **, cocos2d::CCObject *); // [sp+78h] [bp-ACh]
int v212; // [sp+7Ch] [bp-A8h]
int (__fastcall *v213)(EditLevelLayer *, cocos2d::CCObject *); // [sp+80h] [bp-A4h]
int v214; // [sp+84h] [bp-A0h]
int (__fastcall *v215)(EditLevelLayer *, cocos2d::CCObject *); // [sp+88h] [bp-9Ch]
int v216; // [sp+8Ch] [bp-98h]
int (__fastcall *v217)(EditLevelLayer *, cocos2d::CCObject *); // [sp+90h] [bp-94h]
int v218; // [sp+94h] [bp-90h]
int (__fastcall *v219)(int, cocos2d::CCObject *); // [sp+98h] [bp-8Ch]
int v220; // [sp+9Ch] [bp-88h]
int (__fastcall *v221)(CreatorSettingsPopup **, cocos2d::CCObject *, CreatorSettingsDelegate *); // [sp+A0h] [bp-84h]
int v222; // [sp+A4h] [bp-80h]
int (__fastcall *v223)(EditLevelLayer *, cocos2d::CCObject *); // [sp+A8h] [bp-7Ch]
int v224; // [sp+ACh] [bp-78h]
int (__fastcall *v225)(EditLevelLayer *, cocos2d::CCObject *); // [sp+B0h] [bp-74h]
int v226; // [sp+B4h] [bp-70h]
cocos2d::CCArray *(__fastcall *v227)(EditLevelLayer *, cocos2d::CCObject *); // [sp+B8h] [bp-6Ch]
int v228; // [sp+BCh] [bp-68h]
int (__fastcall *v229)(GJGameLevel **, cocos2d::CCObject *); // [sp+C0h] [bp-64h]
int v230; // [sp+C4h] [bp-60h]
int (__fastcall *v231)(GameLevelOptionsLayer **, cocos2d::CCObject *); // [sp+C8h] [bp-5Ch]
int v232; // [sp+CCh] [bp-58h]
_DWORD v233[2]; // [sp+D0h] [bp-54h] BYREF
unsigned __int8 v234; // [sp+D8h] [bp-4Ch] BYREF
char v235; // [sp+D9h] [bp-4Bh] BYREF
char *v236; // [sp+E0h] [bp-44h]
int v237[2]; // [sp+E4h] [bp-40h] BYREF
char *v238; // [sp+ECh] [bp-38h]
size_t v239; // [sp+F0h] [bp-34h] BYREF
size_t v240; // [sp+F4h] [bp-30h]
cocos2d::CCLabelBMFont *v241; // [sp+F8h] [bp-2Ch]
_BYTE v242[16]; // [sp+FCh] [bp-28h] BYREF
_DWORD v243[4]; // [sp+10Ch] [bp-18h] BYREF
v190 = cocos2d::CCLayer::init((cocos2d::CCLayer *)this);
if ( !v190 )
return v190;
*(this + 87) = a2;
cocos2d::CCObject::retain(a2);
std::string::basic_string((int *)&v239, (int)*(this + 87) + 280);
if ( (v239 & 1) != 0 )
v4 = v240;
else
v4 = (int)(unsigned __int8)v239 >> 1;
std::string::~string((int)&v239);
if ( v4 )
{
v5 = (int)*(this + 87);
std::string::basic_string((int *)&v239, v5 + 280);
std::string::operator=((unsigned __int8 *)(v5 + 960), (unsigned __int8 *)&v239);
std::string::~string((int)&v239);
}
std::string::basic_string((int *)&v239, (int)*(this + 87) + 280);
v7 = *(_BYTE *)(this + 92) & 1;
v6 = v7 == 0;
if ( (*(_BYTE *)(this + 92) & 1) != 0 )
{
v7 = 0;
*(_BYTE *)*(this + 94) = 0;
}
else
{
*((_BYTE *)this + 368) = v7;
*((_BYTE *)this + 369) = v7;
}
v8 = *((unsigned __int8 *)this + 368);
if ( !v6 )
*(this + 93) = (cocos2d::CCMenu *)v7;
if ( (v8 & 1) != 0 )
{
v9 = (int)*(this + 93);
v10 = ((unsigned int)*(this + 92) & 0xFFFFFFFE) - 1;
if ( (unsigned int)v9 <= 0xA )
{
if ( ((unsigned int)*(this + 92) & 0xFFFFFFFE) != 0xB )
goto LABEL_19;
goto LABEL_28;
}
}
else
{
v9 = v8 >> 1;
if ( v9 <= 10 )
goto LABEL_28;
v10 = 10;
}
v11 = (v9 + 16) & 0xFFFFFFF0;
if ( v11 - 1 != v10 )
{
if ( v11 != 11 )
{
v12 = (char *)operator new(v11);
v14 = *(_BYTE *)(this + 92) & 1;
if ( (*(_BYTE *)(this + 92) & 1) != 0 )
v13 = (char *)*(this + 94);
else
v13 = (char *)this + 369;
goto LABEL_23;
}
LABEL_19:
v12 = (char *)this + 369;
v13 = (char *)*(this + 94);
v14 = 1;
LABEL_23:
v15 = *((unsigned __int8 *)this + 368);
if ( (v15 & 1) != 0 )
v16 = (int)*(this + 93);
else
v16 = v15 >> 1;
std::char_traits::copy(v12, v13, v16 + 1);
if ( v14 )
operator delete(v13);
}
LABEL_28:
v17 = v239;
v18 = (cocos2d::CCMenu *)v240;
v19 = v241;
v239 = 0;
v240 = 0;
v241 = nullptr;
*(this + 92) = (cocos2d::CCMenu *)v17;
*(this + 93) = v18;
*(this + 94) = v19;
v20 = (GameManager *)std::string::~string((int)&v239);
*(this + 91) = *((cocos2d::CCMenu **)a2 + 238);
*(_DWORD *)(GameManager::sharedState(v20) + 752) = *((_DWORD *)*(this + 87) + 239);
(*((void (__fastcall **)(cocos2d::CCMenu **, int))*this + 134))(this, 1);
v21 = (cocos2d::CCDirector *)(*((int (__fastcall **)(cocos2d::CCMenu **, int))*this + 136))(this, 1);
cocos2d::CCDirector::sharedDirector(v21);
cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v198);
v23 = (float *)cocos2d::CCSprite::create((cocos2d::CCSprite *)"GJ_gradientBG.png", v22);
v24 = *(void (__fastcall **)(float *, _DWORD *))(*(_DWORD *)v23 + 148);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v243, 0.0, 0.0);
v24(v23, v243);
(*((void (__fastcall **)(cocos2d::CCMenu **, float *, int))*this + 58))(this, v23, -2);
(*(void (__fastcall **)(float *, _DWORD))(*(_DWORD *)v23 + 64))(v23, (float)(v198 + 10.0) / v23[86]);
(*(void (__fastcall **)(float *, _DWORD))(*(_DWORD *)v23 + 72))(v23, (float)(v199 + 10.0) / v23[87]);
v25 = *(void (__fastcall **)(float *, _DWORD *))(*(_DWORD *)v23 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v243, -5.0, -5.0);
v25(v23, v243);
v26 = *(void (__fastcall **)(float *, _DWORD *))(*(_DWORD *)v23 + 480);
*(_WORD *)((char *)v243 + 1) = -154;
LOBYTE(v243[0]) = 0;
v26(v23, v243);
v28 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_sideArt_001.png", v27);
v187 = *(int (__fastcall **)(int, _DWORD *))(*(_DWORD *)v28 + 148);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v243, 0.0, 0.0);
v29 = (cocos2d::CCDirector *)v187(v28, v243);
v188 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v28 + 92);
v30 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v29);
v31 = COERCE_FLOAT(cocos2d::CCDirector::getScreenLeft(v30));
v32 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)LODWORD(v31));
v33 = COERCE_FLOAT(cocos2d::CCDirector::getScreenBottom(v32));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v243, v31 - 1.0, v33 - 1.0);
v188(v28, v243);
(*((void (__fastcall **)(cocos2d::CCMenu **, int, int))*this + 58))(this, v28, 1);
v35 = (cocos2d::CCSprite *)cocos2d::CCSprite::createWithSpriteFrameName(
(cocos2d::CCSprite *)"GJ_sideArt_001.png",
v34);
v36 = *(int (__fastcall **)(cocos2d::CCSprite *, _DWORD *))(*(_DWORD *)v35 + 148);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v243, 1.0, 0.0);
v37 = (cocos2d::CCDirector *)v36(v35, v243);
v38 = *(void (__fastcall **)(cocos2d::CCSprite *, _DWORD *))(*(_DWORD *)v35 + 92);
v39 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v37);
v40 = COERCE_FLOAT(cocos2d::CCDirector::getScreenRight(v39));
v41 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)LODWORD(v40));
v42 = COERCE_FLOAT(cocos2d::CCDirector::getScreenBottom(v41));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v243, v40 + 1.0, v42 - 1.0);
v38(v35, v243);
cocos2d::CCSprite::setFlipX(v35, 1);
v43 = (cocos2d::CCArray *)(*((int (__fastcall **)(cocos2d::CCMenu **, cocos2d::CCSprite *, int))*this + 58))(
this,
v35,
1);
v44 = (cocos2d::CCObject *)cocos2d::CCArray::create(v43);
*(this + 88) = v44;
cocos2d::CCObject::retain(v44);
v45 = (cocos2d::CCDirector *)cocos2d::CCRect::CCRect((cocos2d::CCRect *)v242, 0.0, 0.0, 80.0, 80.0);
v46 = v198;
v47 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v45);
v48 = COERCE_FLOAT(cocos2d::CCDirector::getScreenTop(v47));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v200, v46 * 0.5, v48 - 30.0);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v243, (const cocos2d::CCRect *)v242);
v49 = cocos2d::extension::CCScale9Sprite::create("square02b_001.png", v243);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v49 + 456))(v49, 255);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v201, 365.0, 40.0);
(*(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v49 + 160))(v49, v201);
(*((void (__fastcall **)(cocos2d::CCMenu **, int, int))*this + 58))(this, v49, -1);
(*(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v49 + 92))(v49, v200);
v50 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v49 + 480);
*(_WORD *)((char *)v243 + 1) = -29384;
LOBYTE(v243[0]) = 0;
v50(v49, v243);
v51 = (int)*(this + 87);
if ( *(int *)(v51 + 612) > 1 || (v52 = *(unsigned __int8 *)(v51 + 609), *(_BYTE *)(v51 + 609)) )
{
std::string::basic_string((int *)&v239, v51 + 280);
if ( (v239 & 1) != 0 )
v54 = v241;
else
v54 = (cocos2d::CCLabelBMFont *)((char *)&v239 + 1);
v55 = cocos2d::CCLabelBMFont::create(v54, "goldFont.fnt", v53);
std::string::~string((int)&v239);
(*((void (__fastcall **)(cocos2d::CCMenu **, int, int))*this + 58))(this, v55, 20);
(*(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v55 + 92))(v55, v200);
}
else
{
v169 = CCTextInputNode::create(
(CCTextInputNode *)0x43960000,
50.0,
"Level Name",
"Thonburi",
(const char *)&dword_18,
"bigFont.fnt",
v186);
(*((void (__fastcall **)(cocos2d::CCMenu **, int *, int))*this + 58))(this, v169, 18);
v169[105] = (int)(this + 79);
(*(void (__fastcall **)(int *, int))(*v169 + 36))(v169, 1);
(*(void (__fastcall **)(int *, _BYTE *))(*v169 + 92))(v169, v200);
v169[106] = 20;
*((_BYTE *)v169 + 432) = 1;
std::string::basic_string(v237, (int)*(this + 87) + 280);
v239 = v52;
v240 = v52;
v241 = (cocos2d::CCLabelBMFont *)v52;
std::string::__init((int *)&v239, &unk_B6B226, v52);
v170 = (const char *)sub_49F398((unsigned __int8 *)v237, (unsigned __int8 *)&v239);
std::string::~string((int)&v239);
std::string::~string((int)v237);
if ( !v170 )
{
std::string::basic_string(v237, (int)a2 + 280);
if ( (v237[0] & 1) == 0 )
v170 = (char *)v237 + 1;
v239 = 0;
if ( (v237[0] & 1) != 0 )
v170 = v238;
v240 = 0;
v241 = nullptr;
v171 = strlen(v170);
std::string::__init((int *)&v239, v170, v171);
CCTextInputNode::setString((int)v169, (int)&v239);
std::string::~string((int)&v239);
std::string::~string((int)v237);
}
LOWORD(v196) = -21896;
BYTE2(v196) = -16;
CCTextInputNode::setLabelPlaceholderColor((unsigned int)v169, v196);
CCTextInputNode::setLabelPlaceholderScale((unsigned int)v169, 0.7);
cocos2d::CCArray::addObject(*(this + 88), (cocos2d::CCObject *)v169);
}
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v202, v198 * 0.5, (float)(v199 * 0.5) + 65.0);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v243, (const cocos2d::CCRect *)v242);
v56 = cocos2d::extension::CCScale9Sprite::create("square02b_001.png", v243);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v56 + 456))(v56, 255);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v243, 365.0, 60.0);
cocos2d::CCSize::operator=(v201, v243);
(*(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v56 + 160))(v56, v201);
(*((void (__fastcall **)(cocos2d::CCMenu **, int, int))*this + 58))(this, v56, -1);
(*(void (__fastcall **)(int, float *))(*(_DWORD *)v56 + 92))(v56, v202);
v57 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v56 + 480);
*(_WORD *)((char *)v243 + 1) = -29384;
LOBYTE(v243[0]) = 0;
v57(v56, v243);
v58 = CCTextInputNode::create(
(CCTextInputNode *)0x43B68000,
50.0,
"Description [Optional]",
"Thonburi",
(const char *)&dword_18,
nullptr,
v186);
*((_BYTE *)v58 + 432) = 0;
v59 = v58;
(*((void (__fastcall **)(cocos2d::CCMenu **, int *, int))*this + 58))(this, v58, 20);
v59[105] = (int)(this + 79);
(*(void (__fastcall **)(int *, int))(*v59 + 36))(v59, 2);
(*(void (__fastcall **)(int *, float *))(*v59 + 92))(v59, v202);
v239 = 0;
v240 = 0;
v241 = nullptr;
std::string::__init(
(int *)&v239,
" abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.,-!?:;)(/\\\"'`*=+-_%[]<>|@&^#{}%$~",
0x61u);
CCTextInputNode::setAllowedChars((int)v59, (unsigned __int8 *)&v239);
std::string::~string((int)&v239);
v60 = CCTextInputNode::setUnicodeText(v59, 1);
v61 = (EmoteSprite *)(17 * EmoteSprite::maxEmotesComment((EmoteSprite *)v60) + 180);
v59[106] = (int)v61;
v62 = EmoteSprite::maxEmotesComment(v61);
CCTextInputNode::setParseEmotes((CCTextInputNode *)v59, v62);
cocos2d::CCArray::addObject(*(this + 88), (cocos2d::CCObject *)v59);
(*(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v59[104] + 172))(v59[104], 0);
v239 = 0;
v240 = 0;
v241 = nullptr;
std::string::__init((int *)&v239, &unk_B6B226, 0);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v243, 0.5, 0.5);
v63 = (TextArea *)TextArea::create(
(int)&v239,
"chatFont.fnt",
1065353216,
1135427584,
(const cocos2d::CCPoint *)v243,
1101004800,
1,
0);
std::string::~string((int)&v239);
CCTextInputNode::addTextArea(v59, v63);
CCTextInputNode::setMaxTextAreaHeight((CCTextInputNode *)v59, 54.0);
LOWORD(v197) = -21896;
BYTE2(v197) = -16;
CCTextInputNode::setLabelPlaceholderColor((unsigned int)v59, v197);
v239 = 0;
v240 = 0;
v241 = nullptr;
std::string::__init((int *)&v239, "easy", 4u);
v67 = EmoteSprite::createWithName((int)&v239, v64, v65, v66);
std::string::~string((int)&v239);
EmoteSprite::fitToHeight(v67, 18.0, 0.0);
v206 = 0;
v205 = EditLevelLayer::onEmotes;
v68 = CCMenuItemSpriteExtra::create((int)v67, 0, (int)this, (int)EditLevelLayer::onEmotes, 0);
*(this + 97) = (cocos2d::CCMenu *)v68;
CCMenuItemSpriteExtra::setSizeMult(v68, 1.5);
v69 = cocos2d::CCMenu::create(*(this + 97), nullptr);
v189 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v69 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v243, (float)(v202[0] + 182.5) + 17.0, v202[1]);
v189(v69, v243);
(*((void (__fastcall **)(cocos2d::CCMenu **, int, int))*this + 58))(this, v69, 25);
EditLevelLayer::updateDescText((EditLevelLayer *)this, (const char *)&unk_B6B226);
v70 = (char *)v237;
GJGameLevel::getUnpackedLevelDescription((GJGameLevel *)&v234);
v237[0] = 0;
v237[1] = 0;
v238 = nullptr;
std::string::__init(v237, &unk_B6B226, 0);
v71 = sub_49F398(&v234, (unsigned __int8 *)v237);
v72 = (cocos2d::CCMenu *)std::string::~string((int)v237);
if ( !v71 )
{
if ( (v234 & 1) == 0 )
v70 = &v235;
v239 = 0;
if ( (v234 & 1) != 0 )
v70 = v236;
v240 = 0;
v241 = nullptr;
v172 = strlen(v70);
std::string::__init((int *)&v239, v70, v172);
CCTextInputNode::setString((int)v59, (int)&v239);
v72 = (cocos2d::CCMenu *)std::string::~string((int)&v239);
}
v73 = (cocos2d::CCMenu *)cocos2d::CCMenu::create(v72);
v74 = *this;
*(this + 86) = v73;
(*((void (__fastcall **)(cocos2d::CCMenu **, cocos2d::CCMenu *))v74 + 57))(this, v73);
v76 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_editBtn_001.png", v75);
v208 = 0;
v207 = EditLevelLayer::onEdit;
v77 = CCMenuItemSpriteExtra::create(v76, 0, (int)this, (int)EditLevelLayer::onEdit, 0);
(*(void (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 86) + 228))(*(this + 86), v77);
v79 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_playBtn2_001.png", v78);
v210 = 0;
v209 = EditLevelLayer::onPlay;
v80 = CCMenuItemSpriteExtra::create(v79, 0, (int)this, (int)EditLevelLayer::onPlay, 0);
(*(void (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 86) + 228))(*(this + 86), v80);
v82 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_shareBtn_001.png", v81);
v212 = 0;
v211 = EditLevelLayer::onShare;
v83 = CCMenuItemSpriteExtra::create(v82, 0, (int)this, (int)EditLevelLayer::onShare, 0);
(*(void (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 86) + 228))(*(this + 86), v83);
cocos2d::CCMenu::alignItemsHorizontallyWithPadding(*(this + 86), 20.0);
v84 = (int)*(this + 86);
v85 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v84 + 92);
v86 = (float *)(*(int (__fastcall **)(int))(*(_DWORD *)v84 + 96))(v84);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v243, *v86, (float)(v199 * 0.5) - 25.0);
v85(v84, v243);
v87 = (cocos2d::CCMenu *)EditLevelLayer::setupLevelInfo((EditLevelLayer *)this);
v88 = (const cocos2d::CCPoint *)cocos2d::CCMenu::create(v87);
v89 = (cocos2d::CCDirector *)(*((int (__fastcall **)(cocos2d::CCMenu **, const cocos2d::CCPoint *))*this + 57))(
this,
v88);
v90 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v89);
v91 = COERCE_FLOAT(cocos2d::CCDirector::getScreenRight(v90));
v92 = v91 - 30.0;
v93 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)LODWORD(v91));
v94 = COERCE_FLOAT(cocos2d::CCDirector::getScreenTop(v93));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v203, v92, v94 - 30.0);
v96 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_deleteBtn_001.png", v95);
v214 = 0;
v213 = EditLevelLayer::confirmDelete;
v97 = CCMenuItemSpriteExtra::create(v96, 0, (int)this, (int)EditLevelLayer::confirmDelete, 0);
(*(void (__fastcall **)(const cocos2d::CCPoint *, int))(*(_DWORD *)v88 + 228))(v88, v97);
v98 = *(int (__fastcall **)(int, _DWORD *))(*(_DWORD *)v97 + 92);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v243, v88);
v99 = (cocos2d::CCDirector *)v98(v97, v243);
v100 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v99);
v101 = COERCE_FLOAT(cocos2d::CCDirector::getScreenRight(v100));
v103 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"edit_leftBtn_001.png", v102);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v103 + 80))(v103, 1063675494);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v103 + 180))(v103, 1119092736);
v216 = 0;
v215 = EditLevelLayer::confirmMoveToTop;
v104 = CCMenuItemSpriteExtra::create(v103, 0, (int)this, (int)EditLevelLayer::confirmMoveToTop, 0);
CCMenuItemSpriteExtra::setSizeMult(v104, 1.1);
(*(void (__fastcall **)(const cocos2d::CCPoint *, int))(*(_DWORD *)v88 + 228))(v88, v104);
v105 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v104 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v233, v101 - 30.0, (float)(v199 * 0.5) + 2.5);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v243, v88);
v105(v104, v243);
v107 = (cocos2d::CCSprite *)cocos2d::CCSprite::createWithSpriteFrameName(
(cocos2d::CCSprite *)"edit_leftBtn_001.png",
v106);
(*(void (__fastcall **)(cocos2d::CCSprite *, int))(*(_DWORD *)v107 + 80))(v107, 1063675494);
cocos2d::CCSprite::setFlipY(v107, 1);
(*(void (__fastcall **)(cocos2d::CCSprite *, int))(*(_DWORD *)v107 + 180))(v107, -1028390912);
v218 = 0;
v217 = EditLevelLayer::confirmMoveToBottom;
v108 = CCMenuItemSpriteExtra::create((int)v107, 0, (int)this, (int)EditLevelLayer::confirmMoveToBottom, 0);
CCMenuItemSpriteExtra::setSizeMult(v108, 1.1);
(*(void (__fastcall **)(const cocos2d::CCPoint *, int))(*(_DWORD *)v88 + 228))(v88, v108);
v191 = *(cocos2d::CCNode **)(*(_DWORD *)v108 + 92);
v194 = (*(int (__fastcall **)(int))(*(_DWORD *)v104 + 96))(v104);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v233, 0.0, -30.0);
cocos2d::CCPoint::operator+(v243, v194, v233);
((void (__fastcall *)(int, _DWORD *))v191)(v108, v243);
v110 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"gj_folderBtn_001.png", v109);
v111 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%i",
*((const char **)*(this + 87) + 185));
CString = (cocos2d::CCLabelBMFont *)cocos2d::CCString::getCString(v111);
v114 = (cocos2d::CCMenu *)cocos2d::CCLabelBMFont::create(CString, "bigFont.fnt", v113);
*(this + 89) = v114;
(*(void (__fastcall **)(int, cocos2d::CCMenu *, int))(*(_DWORD *)v110 + 232))(v110, v114, 1);
v115 = (int)*(this + 89);
v192 = *(cocos2d::CCNode **)(*(_DWORD *)v115 + 92);
v116 = *(float *)(*(int (__fastcall **)(int))(*(_DWORD *)v110 + 164))(v110);
v117 = (*(int (__fastcall **)(int))(*(_DWORD *)v110 + 164))(v110);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v243, v116 * 0.5, (float)(*(float *)(v117 + 4) * 0.5) + 1.0);
((void (__fastcall *)(int, _DWORD *))v192)(v115, v243);
cocos2d::CCLabelBMFont::limitLabelWidth(*(this + 89), 24.0, 0.55, 0.0);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v110 + 80))(v110, 1061997773);
v220 = 0;
v219 = EditLevelLayer::onSetFolder;
v118 = CCMenuItemSpriteExtra::create(v110, 0, (int)this, (int)EditLevelLayer::onSetFolder, 0);
CCMenuItemSpriteExtra::setSizeMult(v118, 1.2);
(*(void (__fastcall **)(const cocos2d::CCPoint *, int))(*(_DWORD *)v88 + 228))(v88, v118);
v193 = *(cocos2d::CCNode **)(*(_DWORD *)v118 + 92);
v119 = (*(int (__fastcall **)(int))(*(_DWORD *)v104 + 96))(v104);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v233, 0.0, 25.0);
cocos2d::CCPoint::operator+(v243, v119, v233);
v120 = (cocos2d::CCDirector *)((int (__fastcall *)(int, _DWORD *))v193)(v118, v243);
v121 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v120);
v122 = COERCE_FLOAT(cocos2d::CCDirector::getScreenLeft(v121));
v123 = v122 + 30.0;
v124 = (cocos2d::CCArray *)cocos2d::CCArray::create((cocos2d::CCArray *)LODWORD(v122));
v126 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"sideBtn_config_001.png", v125);
v222 = 0;
v221 = EditLevelLayer::onCreatorSettings;
v127 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::create(
v126,
0,
(int)this,
(int)EditLevelLayer::onCreatorSettings,
0);
cocos2d::CCArray::addObject(v124, v127);
v129 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_duplicateBtn_001.png", v128);
v130 = *(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v129 + 80);
v131 = *(float *)(*(int (__fastcall **)(int))(*(_DWORD *)v126 + 164))(v126);
v132 = (float *)(*(int (__fastcall **)(int))(*(_DWORD *)v129 + 164))(v129);
v130(v129, v131 / *v132);
v224 = 0;
v223 = EditLevelLayer::confirmClone;
v133 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::create(v129, 0, (int)this, (int)EditLevelLayer::confirmClone, 0);
cocos2d::CCArray::addObject(v124, v133);
if ( GJGameLevel::isPlatformer(*(this + 87)) )
{
v173 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_levelLeaderboardBtn_001.png", v134);
v174 = *(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v173 + 80);
v175 = *(float *)(*(int (__fastcall **)(int))(*(_DWORD *)v126 + 164))(v126);
v176 = (float *)(*(int (__fastcall **)(int))(*(_DWORD *)v173 + 164))(v173);
v174(v173, v175 / *v176);
v226 = 0;
v225 = EditLevelLayer::onLevelLeaderboard;
v177 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::create(
v173,
0,
(int)this,
(int)EditLevelLayer::onLevelLeaderboard,
0);
cocos2d::CCArray::addObject(v124, v177);
}
v135 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_exportBtn_001.png", v134);
v228 = 0;
v227 = EditLevelLayer::onExportLevel;
v136 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::create(v135, 0, (int)this, (int)EditLevelLayer::onExportLevel, 0);
cocos2d::CCArray::addObject(v124, v136);
if ( !GJGameLevel::isPlatformer(*(this + 87)) )
{
v178 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"sideBtn_death_001.png", v137);
v230 = 0;
v229 = EditLevelLayer::onDeathTracker;
v179 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::create(
v178,
0,
(int)this,
(int)EditLevelLayer::onDeathTracker,
0);
cocos2d::CCArray::addObject(v124, v179);
}
v138 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"sideBtn_options_001.png", v137);
v232 = 0;
v231 = EditLevelLayer::onLevelOptions;
v139 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::create(v138, 0, (int)this, (int)EditLevelLayer::onLevelOptions, 0);
cocos2d::CCArray::addObject(v124, v139);
v140 = v199 * 0.5;
v141 = 0;
v142 = v140 + (float)((float)((float)(unsigned int)(cocos2d::CCArray::count(v124) - 1) * 34.0) * 0.5);
while ( v141 < cocos2d::CCArray::count(v124) )
{
v180 = cocos2d::CCArray::objectAtIndex(v124, v141);
(*(void (__fastcall **)(const cocos2d::CCPoint *, int))(*(_DWORD *)v88 + 228))(v88, v180);
v195 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v180 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v233, v123, v142 - (float)((float)(int)v141 * 34.0));
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v243, v88);
v195(v180, v243);
++v141;
}
v144 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_arrow_01_001.png", v143);
v233[1] = 0;
v233[0] = EditLevelLayer::onBack;
v145 = (cocos2d::CCMenu *)CCMenuItemSpriteExtra::create(v144, 0, (int)this, (int)EditLevelLayer::onBack, 0);
CCMenuItemSpriteExtra::setSizeMult((int)v145, 1.6);
v146 = cocos2d::CCMenu::create(v145, nullptr);
v147 = (cocos2d::CCDirector *)(*((int (__fastcall **)(cocos2d::CCMenu **, int, int))*this + 58))(this, v146, 1);
v148 = *(int (__fastcall **)(int, _DWORD *))(*(_DWORD *)v146 + 92);
v149 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v147);
v150 = COERCE_FLOAT(cocos2d::CCDirector::getScreenLeft(v149));
v151 = v150 + 24.0;
v152 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)LODWORD(v150));
v153 = COERCE_FLOAT(cocos2d::CCDirector::getScreenTop(v152));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v243, v151, v153 - 23.0);
v154 = (cocos2d::CCMenu *)v148(v146, v243);
v155 = cocos2d::CCMenu::create(v154);
(*((void (__fastcall **)(cocos2d::CCMenu **, int, int))*this + 58))(this, v155, 2);
v157 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_infoIcon_001.png", v156);
v243[1] = 0;
v243[0] = EditLevelLayer::onLevelInfo;
v158 = CCMenuItemSpriteExtra::create(v157, 0, (int)this, (int)EditLevelLayer::onLevelInfo, 0);
CCMenuItemSpriteExtra::setSizeMult(v158, 2.0);
v159 = (cocos2d::CCDirector *)(*(int (__fastcall **)(int, int))(*(_DWORD *)v155 + 228))(v155, v158);
v160 = *(int (__fastcall **)(int, _BYTE *))(*(_DWORD *)v155 + 92);
v161 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v159);
v162 = COERCE_FLOAT(cocos2d::CCDirector::getScreenLeft(v161));
v163 = v162 + 30.0;
v164 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)LODWORD(v162));
v165 = COERCE_FLOAT(cocos2d::CCDirector::getScreenBottom(v164));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v204, v163, v165 + 30.0);
v166 = (PlatformToolbox *)v160(v155, v204);
if ( PlatformToolbox::isControllerConnected(v166) )
{
GameToolbox::addBackButton((GameToolbox *)this, v145, v167);
v182 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"controllerBtn_Start_001.png", v181);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v79 + 228))(v79, v182);
v183 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v182 + 92);
v184 = *(float *)(*(int (__fastcall **)(int))(*(_DWORD *)v79 + 164))(v79);
v185 = (*(int (__fastcall **)(int))(*(_DWORD *)v79 + 164))(v79);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v204, v184 * 0.5, (float)(*(float *)(v185 + 4) * 0.5) - 40.0);
v183(v182, v204);
}
std::string::~string((int)&v234);
return v190;
}