//
// CustomizeObjectLayer::init from 0x57f624 to 0x580ee4 (6336 bytes)
//
// 1 xrefs:
// > CustomizeObjectLayer::create @ 0x580fc8
//
// 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:52:53 +0000
//
GameManager *__fastcall CustomizeObjectLayer::init(CustomizeObjectLayer *this, GameObject *a2, cocos2d::CCArray *a3)
{
GameManager *v5; // r0
cocos2d::CCObject *v6; // r0
unsigned int i; // r5
cocos2d::CCObject *v8; // r7
int v9; // r6
void (__fastcall *v10)(int, _DWORD *); // r8
void (__fastcall *v11)(int, _DWORD *); // r8
const char *v12; // r2
int v13; // r0
float v14; // s13
float v15; // s14
int v16; // r6
void (__fastcall *v17)(int, _DWORD *); // r8
cocos2d::CCArray *v18; // r0
cocos2d::CCObject *v19; // r0
cocos2d::CCArray *v20; // r0
cocos2d::CCObject *v21; // r0
cocos2d::CCArray *v22; // r0
cocos2d::CCObject *v23; // r0
cocos2d::CCMenu *v24; // r0
int v25; // r0
int v26; // r6
void (__fastcall *v27)(int, _DWORD *); // r8
const char *v28; // r1
ButtonSprite *v29; // r0
int v30; // r0
int v31; // r9
void (__fastcall *v32)(int, _DWORD *); // r8
int v33; // r6
const cocos2d::CCPoint *v34; // r5
const cocos2d::CCPoint *v35; // r8
void (__fastcall *v36)(int, _DWORD *); // r7
const cocos2d::CCPoint *v37; // r6
ButtonSprite *v38; // r0
int v39; // r7
int v40; // r0
ButtonSprite *v41; // r0
int v42; // r0
int v43; // r6
void (__fastcall *v44)(int, _DWORD *); // r8
int v45; // r9
const char *v46; // r1
int v47; // r6
int v48; // r0
int v49; // r8
void (__fastcall *v50)(int, int); // r7
int v51; // r0
int v52; // r6
int v53; // r3
int v54; // r6
void (__fastcall *v55)(int, _DWORD *); // r7
int v56; // r0
int v57; // r8
const char *v58; // r2
int v59; // r0
int v60; // r7
void (__fastcall *v61)(int, _DWORD *); // r6
int v62; // r7
void (__fastcall *v63)(int, _DWORD *); // r6
const char *v64; // r1
int v65; // r0
int v66; // r7
int v67; // r0
const char *v68; // r1
int v69; // r0
int v70; // r0
int v71; // r9
const cocos2d::CCPoint *v72; // r8
void (__fastcall *v73)(int, _DWORD *); // r7
int v74; // r7
void (__fastcall *v75)(int, int); // r8
int v76; // r0
cocos2d::CCArray *updated; // r0
cocos2d::CCObject *v78; // r0
ButtonSprite *v79; // r0
int v80; // r3
cocos2d::CCObject *v81; // r7
cocos2d::CCObject *v82; // r9
ButtonSprite *v83; // r0
cocos2d::CCObject *v84; // r7
cocos2d::CCObject *v85; // r8
ButtonSprite *v86; // r0
cocos2d::CCObject *v87; // r7
ButtonSprite *v88; // r0
void (__fastcall *v89)(cocos2d::CCObject *, _DWORD *); // r6
void (__fastcall *v90)(cocos2d::CCObject *, _DWORD *); // r6
void (__fastcall *v91)(cocos2d::CCObject *, _DWORD *); // r6
void (__fastcall *v92)(cocos2d::CCObject *, _DWORD *); // r6
const char *v93; // r6
cocos2d::CCString *v94; // r0
ButtonSprite *CString; // r0
ButtonSprite *v96; // r0
cocos2d::CCObject *v97; // r9
cocos2d::CCObject *v98; // r8
float v99; // r0
cocos2d::CCDirector *v100; // r0
cocos2d::CCDirector *v101; // r0
float v102; // r0
int *v103; // r0
int v104; // r6
const cocos2d::CCPoint *v105; // r7
const char *v106; // r1
int v107; // r10
int v108; // r8
int v109; // r0
int v110; // r11
void (__fastcall *v111)(int, _DWORD *); // r10
const char *v112; // r1
int v113; // r10
int v114; // r0
int v115; // r10
void (__fastcall *v116)(int, _DWORD *); // r8
GameManager *v117; // r0
ColorChannelSprite *v118; // r0
int v119; // r0
int v120; // r3
int v121; // r0
int v122; // r10
const cocos2d::CCPoint *v123; // r9
void (__fastcall *v124)(int, _DWORD *); // r8
const char *v125; // r1
const cocos2d::CCPoint *v126; // r8
const char *v127; // r2
int v128; // r9
void (__fastcall *v129)(int, _DWORD *); // r10
int v130; // r3
int v131; // r0
int v132; // r7
void (__fastcall *v133)(int, _DWORD *); // r8
int v134; // r9
cocos2d::CCArray *v135; // r0
GameManager *v136; // r3
int v137; // r3
cocos2d::CCObject *v138; // r0
ButtonSprite *v139; // r0
int v140; // r0
void (__fastcall *v141)(cocos2d::CCObject *, _DWORD *); // r11
GameManager *v142; // r0
GameManager *v143; // r11
int v144; // r0
const char *FontFile; // r0
const char *v146; // r2
int v147; // r0
void (__fastcall *v148)(cocos2d::CCPoint *, _DWORD *); // r11
int v149; // r3
Slider *v150; // r0
int v151; // r11
Slider *v152; // r8
int v153; // r0
char *v154; // r8
GameManager *v155; // r0
GameManager *v156; // r6
int v157; // r0
char *v158; // r0
int *v159; // r0
int v160; // r6
int v161; // r3
int v162; // r7
int *v163; // r3
int v164; // r1
char *v165; // r2
size_t v166; // r0
ButtonSprite *v167; // r0
int v168; // r3
cocos2d::CCObject *v169; // r11
const cocos2d::CCPoint *v170; // r10
void (__fastcall *v171)(cocos2d::CCObject *, _DWORD *); // r9
const char *v172; // r1
int v173; // r0
int v174; // r3
cocos2d::CCObject *v175; // r10
const cocos2d::CCPoint *v176; // r9
void (__fastcall *v177)(cocos2d::CCObject *, _DWORD *); // r6
ButtonSprite *v178; // r0
int v179; // r3
cocos2d::CCObject *v180; // r8
ButtonSprite *v181; // r0
int v182; // r3
int v183; // r9
int v184; // r0
int v185; // r3
int v186; // r11
GameManager *v187; // r0
GameManager *v188; // r10
int v189; // r0
ButtonSprite *v190; // r0
int v191; // r3
int v192; // r11
const cocos2d::CCPoint *v193; // r10
void (__fastcall *v194)(int, _BYTE *); // r8
cocos2d::CCObject *v195; // r1
char *v197; // [sp+8h] [bp-174h]
char *v198; // [sp+8h] [bp-174h]
float v199; // [sp+10h] [bp-16Ch]
float v200; // [sp+10h] [bp-16Ch]
float v201; // [sp+10h] [bp-16Ch]
float v202; // [sp+10h] [bp-16Ch]
float v203; // [sp+10h] [bp-16Ch]
float v204; // [sp+10h] [bp-16Ch]
float v205; // [sp+10h] [bp-16Ch]
float v206; // [sp+10h] [bp-16Ch]
float v207; // [sp+10h] [bp-16Ch]
int v208; // [sp+10h] [bp-16Ch]
cocos2d::CCPoint *v209; // [sp+14h] [bp-168h]
cocos2d::CCPoint *v210; // [sp+14h] [bp-168h]
cocos2d::CCPoint *v211; // [sp+14h] [bp-168h]
cocos2d::CCPoint *v212; // [sp+14h] [bp-168h]
cocos2d::CCPoint *v213; // [sp+14h] [bp-168h]
cocos2d::CCPoint *v214; // [sp+18h] [bp-164h]
cocos2d::CCPoint *v215; // [sp+18h] [bp-164h]
cocos2d::CCPoint *v216; // [sp+18h] [bp-164h]
cocos2d::CCObject *v217; // [sp+1Ch] [bp-160h]
cocos2d::CCObject *v218; // [sp+1Ch] [bp-160h]
cocos2d::CCObject *v219; // [sp+1Ch] [bp-160h]
cocos2d::CCObject *v220; // [sp+1Ch] [bp-160h]
cocos2d::CCObject *v221; // [sp+1Ch] [bp-160h]
cocos2d::CCObject *v222; // [sp+1Ch] [bp-160h]
char *v223; // [sp+20h] [bp-15Ch]
GameManager *v225; // [sp+2Ch] [bp-150h]
int v226; // [sp+30h] [bp-14Ch]
cocos2d::CCObject *v227; // [sp+38h] [bp-144h]
cocos2d::CCObject *v228; // [sp+38h] [bp-144h]
int v229; // [sp+44h] [bp-138h]
int v230; // [sp+48h] [bp-134h]
float v231; // [sp+4Ch] [bp-130h] BYREF
float v232; // [sp+50h] [bp-12Ch]
_BYTE v233[8]; // [sp+54h] [bp-128h] BYREF
_BYTE v234[8]; // [sp+5Ch] [bp-120h] BYREF
_BYTE v235[8]; // [sp+64h] [bp-118h] BYREF
_BYTE v236[8]; // [sp+6Ch] [bp-110h] BYREF
_BYTE v237[8]; // [sp+74h] [bp-108h] BYREF
_BYTE v238[8]; // [sp+7Ch] [bp-100h] BYREF
_BYTE v239[8]; // [sp+84h] [bp-F8h] BYREF
int (__fastcall *v240)(CustomizeObjectLayer *, cocos2d::CCObject *); // [sp+8Ch] [bp-F0h]
int v241; // [sp+90h] [bp-ECh]
int v242; // [sp+94h] [bp-E8h]
int v243; // [sp+98h] [bp-E4h]
int v244; // [sp+9Ch] [bp-E0h]
int v245; // [sp+A0h] [bp-DCh]
int v246; // [sp+A4h] [bp-D8h]
int v247; // [sp+A8h] [bp-D4h]
int v248; // [sp+ACh] [bp-D0h]
int v249; // [sp+B0h] [bp-CCh]
int v250; // [sp+B4h] [bp-C8h]
int v251; // [sp+B8h] [bp-C4h]
int v252; // [sp+BCh] [bp-C0h]
int v253; // [sp+C0h] [bp-BCh]
cocos2d::CCPoint *v254; // [sp+C4h] [bp-B8h]
int v255; // [sp+C8h] [bp-B4h]
cocos2d::CCPoint *v256; // [sp+CCh] [bp-B0h]
int v257; // [sp+D0h] [bp-ACh]
cocos2d::CCPoint *v258; // [sp+D4h] [bp-A8h]
int v259; // [sp+D8h] [bp-A4h]
cocos2d::CCPoint *v260; // [sp+DCh] [bp-A0h]
int v261; // [sp+E0h] [bp-9Ch]
int v262; // [sp+E4h] [bp-98h]
int v263; // [sp+E8h] [bp-94h]
int v264; // [sp+ECh] [bp-90h]
int v265; // [sp+F0h] [bp-8Ch]
int v266; // [sp+F4h] [bp-88h]
int v267; // [sp+F8h] [bp-84h]
int v268; // [sp+FCh] [bp-80h]
int v269; // [sp+100h] [bp-7Ch]
int v270; // [sp+104h] [bp-78h]
int v271; // [sp+108h] [bp-74h]
int v272; // [sp+10Ch] [bp-70h]
int v273; // [sp+110h] [bp-6Ch]
int v274; // [sp+114h] [bp-68h]
int v275; // [sp+118h] [bp-64h]
int v276; // [sp+11Ch] [bp-60h]
int v277; // [sp+120h] [bp-5Ch]
int v278; // [sp+124h] [bp-58h]
int v279; // [sp+128h] [bp-54h]
_DWORD v280[2]; // [sp+12Ch] [bp-50h] BYREF
_DWORD v281[2]; // [sp+134h] [bp-48h] BYREF
int v282; // [sp+13Ch] [bp-40h] BYREF
int v283; // [sp+140h] [bp-3Ch]
char *v284; // [sp+144h] [bp-38h]
int v285; // [sp+148h] [bp-34h] BYREF
int v286; // [sp+14Ch] [bp-30h]
int v287; // [sp+150h] [bp-2Ch]
_BYTE v288[16]; // [sp+154h] [bp-28h] BYREF
_DWORD v289[4]; // [sp+164h] [bp-18h] BYREF
v5 = FLAlertLayer::init(this, 200);
v225 = v5;
if ( !v5 )
return v225;
if ( a2 )
{
*((_DWORD *)this + 133) = a2;
}
else
{
v6 = (cocos2d::CCObject *)cocos2d::CCArray::create(v5);
*((_DWORD *)this + 134) = v6;
v5 = (GameManager *)cocos2d::CCObject::retain(v6);
if ( a3 )
{
for ( i = 0; ; ++i )
{
v5 = (GameManager *)cocos2d::CCArray::count(a3);
if ( i >= (unsigned int)v5 )
break;
v8 = (cocos2d::CCObject *)cocos2d::CCArray::objectAtIndex(a3, i);
if ( GameObject::canChangeCustomColor(v8) )
cocos2d::CCArray::addObject(*((cocos2d::CCArray **)this + 134), v8);
}
}
}
*((_BYTE *)this + 654) = 1;
*((_BYTE *)this + 468) = 1;
cocos2d::CCDirector::sharedDirector(v5);
cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v231);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v289, 0.0, 0.0, 80.0, 80.0);
v9 = cocos2d::extension::CCScale9Sprite::create("GJ_square01.png", v289);
v10 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v9 + 160);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v289, 360.0, 240.0);
v10(v9, v289);
(*(void (__fastcall **)(_DWORD, int, int))(**((_DWORD **)this + 115) + 232))(*((_DWORD *)this + 115), v9, -1);
v11 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v9 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v289, v231 * 0.5, v232 * 0.5);
v11(v9, v289);
v13 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)" ", "goldFont.fnt", v12);
v14 = (float)(v232 * 0.5) + 120.0;
v15 = v231 * 0.5;
*((_DWORD *)this + 148) = v13;
v16 = v13;
v17 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v13 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v289, v15, v14 - 25.0);
v17(v16, v289);
v18 = (cocos2d::CCArray *)(*(int (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 115) + 228))(
*((_DWORD *)this + 115),
*((_DWORD *)this + 148));
v19 = (cocos2d::CCObject *)cocos2d::CCArray::create(v18);
*((_DWORD *)this + 136) = v19;
v20 = (cocos2d::CCArray *)cocos2d::CCObject::retain(v19);
v21 = (cocos2d::CCObject *)cocos2d::CCArray::create(v20);
*((_DWORD *)this + 138) = v21;
v22 = (cocos2d::CCArray *)cocos2d::CCObject::retain(v21);
v23 = (cocos2d::CCObject *)cocos2d::CCArray::create(v22);
*((_DWORD *)this + 139) = v23;
v24 = (cocos2d::CCMenu *)cocos2d::CCObject::retain(v23);
v25 = cocos2d::CCMenu::create(v24);
*((_DWORD *)this + 111) = v25;
(*(void (__fastcall **)(_DWORD, int, int))(**((_DWORD **)this + 115) + 232))(*((_DWORD *)this + 115), v25, 10);
v26 = *((_DWORD *)this + 115);
v27 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v26 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v289, 0.0, -15.0);
v27(v26, v289);
v29 = ButtonSprite::create((ButtonSprite *)"OK", v28);
v241 = 0;
v240 = CustomizeObjectLayer::onClose;
v30 = CCMenuItemSpriteExtra::create((int)v29, 0, (int)this, (int)CustomizeObjectLayer::onClose, 0);
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 111) + 228))(*((_DWORD *)this + 111), v30);
v31 = *((_DWORD *)this + 111);
v32 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v31 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v289, v231 * 0.5, (float)((float)(v232 * 0.5) - 120.0) + 25.0);
v32(v31, v289);
v282 = 0;
v283 = 0;
v284 = nullptr;
std::string::__init(&v282, "Help", 4u);
v285 = 0;
v286 = 0;
v287 = 0;
std::string::__init(
&v285,
"Select color channel to apply to the selected object(s). Edit the properties of the selected channel in the "
"bottom right.\n"
"Next Free uses the next unused color channel ID,\n"
"which goes up to 999 maximum.\n"
"HSV lets you change the hue, saturation, and brightness of the selected object(s) (and not the channel as a "
"whole).\n"
"The Copy and Paste buttons allow you to quickly apply to other objects.",
0x1A4u);
v33 = InfoAlertButton::create(&v282, &v285, 1065353216);
std::string::~string((int)&v285);
std::string::~string((int)&v282);
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 111) + 228))(*((_DWORD *)this + 111), v33);
v34 = *((const cocos2d::CCPoint **)this + 115);
v35 = *((const cocos2d::CCPoint **)this + 111);
v36 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v33 + 92);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v281,
(float)((float)(v231 * 0.5) + 180.0) - 18.0,
(float)((float)(v232 * 0.5) + 120.0) - 18.0);
cocos2d::CCNode::convertToWorldSpace((cocos2d::CCNode *)v288, v34);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v289, v35);
v36(v33, v289);
v37 = *((const cocos2d::CCPoint **)this + 111);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v289, v231 * 0.5, v232 * 0.5);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v233, v37);
CustomizeObjectLayer::determineStartValues(this);
v38 = ButtonSprite::create(
(ButtonSprite *)"Base",
(const char *)&dword_44 + 2,
0,
0.6,
1,
"bigFont.fnt",
"GJ_button_04.png",
COERCE_CONST_CHAR_(30.0),
COERCE_FLOAT(&GLOBAL_OFFSET_TABLE_));
v39 = *(_DWORD *)(LODWORD(v199) - 10076);
v243 = 0;
v242 = v39;
v40 = CCMenuItemSpriteExtra::create((int)v38, 0, (int)this, v39, 0);
*((_DWORD *)this + 143) = v40;
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 111) + 228))(*((_DWORD *)this + 111), v40);
v223 = *((char **)this + 143);
v209 = *(cocos2d::CCPoint **)(*(_DWORD *)v223 + 92);
v217 = *((cocos2d::CCObject **)this + 111);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v288,
(float)((float)((float)(v231 * 0.5) - 180.0) + 35.0) + 8.0,
(float)((float)((float)(v232 * 0.5) + 120.0) + 19.0) - 15.0);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v289, v217);
((void (__fastcall *)(char *, _DWORD *))v209)(v223, v289);
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 143) + 36))(*((_DWORD *)this + 143), 1);
v41 = ButtonSprite::create(
(ButtonSprite *)"Detail",
(const char *)&dword_44 + 2,
0,
0.6,
1,
"bigFont.fnt",
"GJ_button_04.png",
COERCE_CONST_CHAR_(30.0),
v199);
v245 = 0;
v244 = v39;
v42 = CCMenuItemSpriteExtra::create((int)v41, 0, (int)this, v39, 0);
*((_DWORD *)this + 144) = v42;
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 111) + 228))(*((_DWORD *)this + 111), v42);
v43 = *((_DWORD *)this + 144);
v44 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v43 + 92);
v45 = (*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 143) + 96))(*((_DWORD *)this + 143));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v288, 95.0, 0.0);
cocos2d::CCPoint::operator+(v289, v45, v288);
v44(v43, v289);
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 144) + 36))(*((_DWORD *)this + 144), 2);
v47 = *((unsigned __int8 *)this + 569);
v226 = v39;
if ( !*((_BYTE *)this + 569) )
{
(*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 144) + 528))(*((_DWORD *)this + 144), 0);
v48 = *((_DWORD *)this + 144);
LABEL_14:
(*(void (__fastcall **)(int, int))(*(_DWORD *)v48 + 172))(v48, v47);
goto LABEL_15;
}
v47 = *((unsigned __int8 *)this + 568);
if ( !*((_BYTE *)this + 568) )
{
v49 = *((_DWORD *)this + 144);
v50 = *(void (__fastcall **)(int, int))(*(_DWORD *)v49 + 92);
v51 = (*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 143) + 96))(*((_DWORD *)this + 143));
v50(v49, v51);
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 143) + 528))(*((_DWORD *)this + 143), v47);
v48 = *((_DWORD *)this + 143);
goto LABEL_14;
}
LABEL_15:
v52 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_optionsBtn_001.png", v46);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v52 + 80))(v52, 1058642330);
v53 = *(_DWORD *)(LODWORD(v200) - 10072);
v247 = 0;
v246 = v53;
v54 = CCMenuItemSpriteExtra::create(v52, 0, (int)this, v53, 0);
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 111) + 228))(*((_DWORD *)this + 111), v54);
v55 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v54 + 92);
if ( (*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 144) + 176))(*((_DWORD *)this + 144)) )
v56 = *((_DWORD *)this + 144);
else
v56 = *((_DWORD *)this + 143);
v57 = (*(int (__fastcall **)(int))(*(_DWORD *)v56 + 96))(v56);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v288, 70.0, 0.0);
cocos2d::CCPoint::operator+(v289, v57, v288);
v55(v54, v289);
v59 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)a1i2r3e45s789g, "goldFont.fnt", v58);
*((_DWORD *)this + 149) = v59;
(*(void (__fastcall **)(int, int))(*(_DWORD *)v59 + 80))(v59, 1061158912);
v60 = *((_DWORD *)this + 149);
v61 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v60 + 148);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v289, 1.0, 0.5);
v61(v60, v289);
(*(void (__fastcall **)(_DWORD, _DWORD, int))(**((_DWORD **)this + 115) + 232))(
*((_DWORD *)this + 115),
*((_DWORD *)this + 149),
10);
v62 = *((_DWORD *)this + 149);
v63 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v62 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v289, (float)(v231 * 0.5) + 130.0, (float)(v232 * 0.5) - 91.0);
v63(v62, v289);
cocos2d::CCArray::addObject(*((cocos2d::CCArray **)this + 136), *((cocos2d::CCObject **)this + 149));
v65 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_hsvBtn_001.png", v64);
v66 = *(_DWORD *)(LODWORD(v200) - 10068);
v249 = 0;
v248 = v66;
v67 = CCMenuItemSpriteExtra::create(v65, 0, (int)this, v66, 0);
*((_DWORD *)this + 146) = v67;
(*(void (__fastcall **)(int, int))(*(_DWORD *)v67 + 36))(v67, 1);
(*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 111) + 228))(
*((_DWORD *)this + 111),
*((_DWORD *)this + 146));
v69 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_hsvBtn_001.png", v68);
v250 = v66;
v251 = 0;
v70 = CCMenuItemSpriteExtra::create(v69, 0, (int)this, v66, 0);
*((_DWORD *)this + 147) = v70;
(*(void (__fastcall **)(int, int))(*(_DWORD *)v70 + 36))(v70, 2);
(*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 111) + 228))(
*((_DWORD *)this + 111),
*((_DWORD *)this + 147));
v71 = *((_DWORD *)this + 146);
v72 = *((const cocos2d::CCPoint **)this + 111);
v73 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v71 + 92);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v288,
(float)((float)(v231 * 0.5) - 180.0) + 25.0,
(float)((float)(v232 * 0.5) + 120.0) - 40.0);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v289, v72);
v73(v71, v289);
v74 = *((_DWORD *)this + 147);
v75 = *(void (__fastcall **)(int, int))(*(_DWORD *)v74 + 92);
v76 = (*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 146) + 96))(*((_DWORD *)this + 146));
v75(v74, v76);
(*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 146) + 172))(*((_DWORD *)this + 146), 0);
(*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 147) + 172))(*((_DWORD *)this + 147), 0);
updated = (cocos2d::CCArray *)CustomizeObjectLayer::updateHSVButtons(this);
v78 = (cocos2d::CCObject *)cocos2d::CCArray::create(updated);
*((_DWORD *)this + 135) = v78;
cocos2d::CCObject::retain(v78);
v79 = ButtonSprite::create(
(ButtonSprite *)"P-Col 1",
(const char *)off_DC,
0,
0.4,
0,
"bigFont.fnt",
"GJ_button_04.png",
COERCE_CONST_CHAR_(25.0),
v200);
v80 = *(_DWORD *)(LODWORD(v201) - 10064);
v253 = 0;
v210 = (cocos2d::CCPoint *)v80;
v252 = v80;
v81 = v79;
v82 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::create((int)v79, 0, (int)this, v80, 0);
(*(void (__fastcall **)(cocos2d::CCObject *, int))(*(_DWORD *)v82 + 36))(v82, 1005);
(*(void (__fastcall **)(cocos2d::CCObject *, int))(*(_DWORD *)v81 + 36))(v81, 1005);
(*(void (__fastcall **)(_DWORD, cocos2d::CCObject *))(**((_DWORD **)this + 111) + 228))(*((_DWORD *)this + 111), v82);
cocos2d::CCArray::addObject(*((cocos2d::CCArray **)this + 135), v81);
cocos2d::CCArray::addObject(*((cocos2d::CCArray **)this + 136), v82);
v83 = ButtonSprite::create(
(ButtonSprite *)"P-Col 2",
(const char *)off_DC,
0,
0.4,
0,
"bigFont.fnt",
"GJ_button_04.png",
COERCE_CONST_CHAR_(25.0),
v201);
v254 = v210;
v255 = 0;
v84 = v83;
v85 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::create((int)v83, 0, (int)this, (int)v210, 0);
(*(void (__fastcall **)(cocos2d::CCObject *, int))(*(_DWORD *)v85 + 36))(v85, 1006);
(*(void (__fastcall **)(cocos2d::CCObject *, int))(*(_DWORD *)v84 + 36))(v84, 1006);
(*(void (__fastcall **)(_DWORD, cocos2d::CCObject *))(**((_DWORD **)this + 111) + 228))(*((_DWORD *)this + 111), v85);
cocos2d::CCArray::addObject(*((cocos2d::CCArray **)this + 135), v84);
cocos2d::CCArray::addObject(*((cocos2d::CCArray **)this + 136), v85);
v86 = ButtonSprite::create(
(ButtonSprite *)"Light BG",
(const char *)off_DC,
0,
0.4,
0,
"bigFont.fnt",
"GJ_button_04.png",
COERCE_CONST_CHAR_(25.0),
v202);
v256 = v210;
v257 = 0;
v218 = v86;
v87 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::create((int)v86, 0, (int)this, (int)v210, 0);
(*(void (__fastcall **)(cocos2d::CCObject *, int))(*(_DWORD *)v87 + 36))(v87, 1007);
(*(void (__fastcall **)(cocos2d::CCObject *, int))(*(_DWORD *)v218 + 36))(v218, 1007);
(*(void (__fastcall **)(_DWORD, cocos2d::CCObject *))(**((_DWORD **)this + 111) + 228))(*((_DWORD *)this + 111), v87);
cocos2d::CCArray::addObject(*((cocos2d::CCArray **)this + 135), v218);
cocos2d::CCArray::addObject(*((cocos2d::CCArray **)this + 136), v87);
v88 = ButtonSprite::create(
(ButtonSprite *)"Default",
(const char *)off_DC,
0,
0.4,
0,
"bigFont.fnt",
"GJ_button_04.png",
COERCE_CONST_CHAR_(25.0),
v203);
v258 = v210;
v259 = 0;
v227 = v88;
v219 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::create((int)v88, 0, (int)this, (int)v210, 0);
(*(void (__fastcall **)(cocos2d::CCObject *, _DWORD))(*(_DWORD *)v219 + 36))(v219, 0);
(*(void (__fastcall **)(cocos2d::CCObject *, _DWORD))(*(_DWORD *)v227 + 36))(v227, 0);
(*(void (__fastcall **)(_DWORD, cocos2d::CCObject *))(**((_DWORD **)this + 111) + 228))(*((_DWORD *)this + 111), v219);
cocos2d::CCArray::addObject(*((cocos2d::CCArray **)this + 135), v227);
cocos2d::CCArray::addObject(*((cocos2d::CCArray **)this + 136), v219);
v89 = *(void (__fastcall **)(cocos2d::CCObject *, _DWORD *))(*(_DWORD *)v82 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v288, -135.0, 25.0);
cocos2d::CCPoint::operator+(v289, v233, v288);
v89(v82, v289);
v90 = *(void (__fastcall **)(cocos2d::CCObject *, _DWORD *))(*(_DWORD *)v85 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v288, -45.0, 25.0);
cocos2d::CCPoint::operator+(v289, v233, v288);
v90(v85, v289);
v91 = *(void (__fastcall **)(cocos2d::CCObject *, _DWORD *))(*(_DWORD *)v87 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v288, 45.0, 25.0);
cocos2d::CCPoint::operator+(v289, v233, v288);
v91(v87, v289);
v92 = *(void (__fastcall **)(cocos2d::CCObject *, _DWORD *))(*(_DWORD *)v219 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v288, 135.0, 25.0);
cocos2d::CCPoint::operator+(v289, v233, v288);
v92(v219, v289);
v93 = (char *)&dword_0 + 1;
do
{
v94 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i", v93);
CString = (ButtonSprite *)cocos2d::CCString::getCString(v94);
v96 = ButtonSprite::create(
CString,
(const char *)&dword_1C + 2,
0,
0.4,
1,
"bigFont.fnt",
"GJ_button_04.png",
COERCE_CONST_CHAR_(25.0),
v204);
v261 = 0;
v260 = v210;
v97 = v96;
v98 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::create((int)v96, 0, (int)this, (int)v210, 0);
(*(void (__fastcall **)(cocos2d::CCObject *, const char *))(*(_DWORD *)v97 + 36))(v97, v93);
(*(void (__fastcall **)(cocos2d::CCObject *, const char *))(*(_DWORD *)v98 + 36))(v98, v93);
(*(void (__fastcall **)(_DWORD, cocos2d::CCObject *))(**((_DWORD **)this + 111) + 228))(
*((_DWORD *)this + 111),
v98);
cocos2d::CCArray::addObject(*((cocos2d::CCArray **)this + 135), v97);
cocos2d::CCArray::addObject(*((cocos2d::CCArray **)this + 136), v98);
v99 = floorf((float)((int)(v93 - 1) / 5));
v228 = *(cocos2d::CCObject **)(*(_DWORD *)v98 + 92);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v288,
(float)((float)((int)(v93 - 1) % 5) * 65.0) - 130.0,
25.0 - (float)((float)((int)v99 + 1) * 40.0));
cocos2d::CCPoint::operator+(v289, v233, v288);
v100 = (cocos2d::CCDirector *)((int (__fastcall *)(cocos2d::CCObject *, _DWORD *))v228)(v98, v289);
if ( v93 == &byte_9[1] )
{
*((_DWORD *)this + 155) = v97;
*((_DWORD *)this + 156) = v98;
(*(void (__fastcall **)(cocos2d::CCObject *, int))(*(_DWORD *)v97 + 36))(v97, 1008);
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 156) + 36))(*((_DWORD *)this + 156), 1008);
v100 = (cocos2d::CCDirector *)ButtonSprite::setString(*((_DWORD *)this + 155), "+");
}
++v93;
}
while ( v93 != &byte_9[2] );
v101 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v100);
v102 = COERCE_FLOAT(cocos2d::CCDirector::getScreenRight(v101));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v234, v102 - 30.0, v232 * 0.5);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v288, 0.0, 0.0, 40.0, 40.0);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v289, (const cocos2d::CCRect *)v288);
*((_DWORD *)this + 159) = cocos2d::extension::CCScale9Sprite::create("square02_small.png", v289);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v235, 50.0, 30.0);
(*(void (__fastcall **)(_DWORD, _BYTE *))(**((_DWORD **)this + 159) + 160))(*((_DWORD *)this + 159), v235);
(*(void (__fastcall **)(_DWORD, _DWORD, int))(**((_DWORD **)this + 115) + 232))(
*((_DWORD *)this + 115),
*((_DWORD *)this + 159),
-1);
(*(void (__fastcall **)(_DWORD, _BYTE *))(**((_DWORD **)this + 159) + 92))(*((_DWORD *)this + 159), v234);
v103 = CCTextInputNode::create(
(CCTextInputNode *)0x42C80000,
40.0,
"Num",
"Thonburi",
(const char *)&dword_18,
"bigFont.fnt",
v197);
*((_DWORD *)this + 150) = v103;
(*(void (__fastcall **)(_DWORD, int *, int))(**((_DWORD **)this + 115) + 232))(*((_DWORD *)this + 115), v103, 20);
(*(void (__fastcall **)(_DWORD, _BYTE *))(**((_DWORD **)this + 150) + 92))(*((_DWORD *)this + 150), v234);
CCTextInputNode::setMaxLabelScale(*((_DWORD *)this + 150), 0.6);
CCTextInputNode::setMaxLabelWidth(*((_DWORD *)this + 150), 200.0);
(*(void (__fastcall **)(_DWORD, _DWORD))(**(_DWORD **)(*((_DWORD *)this + 150) + 416) + 172))(
*(_DWORD *)(*((_DWORD *)this + 150) + 416),
0);
*(_DWORD *)(*((_DWORD *)this + 150) + 424) = 4;
v104 = *((_DWORD *)this + 150);
v285 = 0;
v286 = 0;
v287 = 0;
std::string::__init(&v285, "0123456789", 0xAu);
CCTextInputNode::setAllowedChars(v104, (unsigned __int8 *)&v285);
std::string::~string((int)&v285);
LOWORD(v229) = -21896;
BYTE2(v229) = -16;
CCTextInputNode::setLabelPlaceholderColor(*((_DWORD *)this + 150), v229);
CCTextInputNode::setLabelPlaceholderScale(*((_DWORD *)this + 150), 0.5);
*(_DWORD *)(*((_DWORD *)this + 150) + 420) = (char *)this + 440;
(*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 150) + 36))(*((_DWORD *)this + 150), 0);
ButtonSprite::setString(*((_DWORD *)this + 155), "++");
v105 = *((const cocos2d::CCPoint **)this + 111);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v281, 0.0, -15.0);
cocos2d::CCPoint::operator+(v289, v234, v281);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v236, v105);
v107 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"edit_leftBtn_001.png", v106);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v107 + 80))(v107, 1068708659);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v107 + 180))(v107, 1119092736);
v108 = *(_DWORD *)(LODWORD(v204) - 10060);
v263 = 0;
v262 = v108;
v109 = CCMenuItemSpriteExtra::create(v107, 0, (int)this, v108, 0);
*((_DWORD *)this + 157) = v109;
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 111) + 228))(*((_DWORD *)this + 111), v109);
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 157) + 36))(*((_DWORD *)this + 157), 1);
v110 = *((_DWORD *)this + 157);
v111 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v110 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v281, 0.0, 40.0);
cocos2d::CCPoint::operator+(v289, v236, v281);
v111(v110, v289);
CCMenuItemSpriteExtra::setSizeMult(*((_DWORD *)this + 157), 2.0);
v113 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"edit_rightBtn_001.png", v112);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v113 + 80))(v113, 1068708659);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v113 + 180))(v113, 1119092736);
v264 = v108;
v265 = 0;
v114 = CCMenuItemSpriteExtra::create(v113, 0, (int)this, v108, 0);
*((_DWORD *)this + 158) = v114;
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 111) + 228))(*((_DWORD *)this + 111), v114);
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 158) + 36))(*((_DWORD *)this + 158), 2);
v115 = *((_DWORD *)this + 158);
v116 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v115 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v281, 0.0, -40.0);
cocos2d::CCPoint::operator+(v289, v236, v281);
v116(v115, v289);
v117 = (GameManager *)CCMenuItemSpriteExtra::setSizeMult(*((_DWORD *)this + 158), 2.0);
*((_DWORD *)this + 141) = *(_DWORD *)(GameManager::sharedState(v117) + 760);
v118 = (ColorChannelSprite *)CustomizeObjectLayer::updateCustomColorLabels(this);
v119 = ColorChannelSprite::create(v118);
*((_DWORD *)this + 160) = v119;
v120 = *(_DWORD *)(LODWORD(v204) - 10056);
v267 = 0;
v266 = v120;
v121 = CCMenuItemSpriteExtra::create(v119, 0, (int)this, v120, 0);
*((_DWORD *)this + 161) = v121;
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 111) + 228))(*((_DWORD *)this + 111), v121);
v122 = *((_DWORD *)this + 161);
v123 = *((const cocos2d::CCPoint **)this + 111);
v124 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v122 + 92);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v281,
(float)((float)(v231 * 0.5) + 180.0) - 25.0,
(float)((float)(v232 * 0.5) - 120.0) + 12.0);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v289, v123);
v124(v122, v289);
cocos2d::CCArray::addObject(*((cocos2d::CCArray **)this + 136), *((cocos2d::CCObject **)this + 161));
v126 = (const cocos2d::CCPoint *)cocos2d::CCSprite::createWithSpriteFrameName(
(cocos2d::CCSprite *)"GJ_colorBtn_001.png",
v125);
(*(void (__fastcall **)(const cocos2d::CCPoint *, void *))(*(_DWORD *)v126 + 480))(v126, &unk_BED7F4);
(*(void (__fastcall **)(const cocos2d::CCPoint *, int))(*(_DWORD *)v126 + 456))(v126, 100);
v128 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)"+", "bigFont.fnt", v127);
(*(void (__fastcall **)(const cocos2d::CCPoint *, int))(*(_DWORD *)v126 + 228))(v126, v128);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v128 + 80))(v128, 1068708659);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v128 + 512))(v128, 100);
v129 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v128 + 92);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v280, v126);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v281, 2.0, 2.5);
cocos2d::CCPoint::operator+(v289, v280, v281);
v129(v128, v289);
(*(void (__fastcall **)(const cocos2d::CCPoint *, int))(*(_DWORD *)v126 + 80))(v126, 1050253722);
v130 = *(_DWORD *)(LODWORD(v204) - 10052);
v269 = 0;
v268 = v130;
v131 = CCMenuItemSpriteExtra::create((int)v126, 0, (int)this, v130, 0);
*((_DWORD *)this + 162) = v131;
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 111) + 228))(*((_DWORD *)this + 111), v131);
v132 = *((_DWORD *)this + 162);
v133 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v132 + 92);
v134 = (*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 161) + 96))(*((_DWORD *)this + 161));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v281, 18.0, 22.0);
cocos2d::CCPoint::operator+(v289, v134, v281);
v133(v132, v289);
v135 = (cocos2d::CCArray *)CCMenuItemSpriteExtra::setSizeMult(*((_DWORD *)this + 162), 2.0);
v136 = *((GameManager **)this + 133);
if ( v136 )
{
v137 = *((_DWORD *)v136 + 223);
if ( v137 == 914 )
v136 = v225;
else
v136 = (GameManager *)(v137 == 1615);
}
*((_BYTE *)this + 653) = (_BYTE)v136;
if ( v136 )
{
v138 = (cocos2d::CCObject *)cocos2d::CCArray::create(v135);
*((_DWORD *)this + 137) = v138;
cocos2d::CCObject::retain(v138);
v139 = ButtonSprite::create(
(ButtonSprite *)"Text",
(const char *)&dword_44 + 2,
0,
0.6,
1,
"bigFont.fnt",
"GJ_button_04.png",
(const char *)0x41F00000,
v204);
v270 = v226;
v271 = 0;
v140 = CCMenuItemSpriteExtra::create((int)v139, 0, (int)this, v226, 0);
*((_DWORD *)this + 145) = v140;
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 111) + 228))(*((_DWORD *)this + 111), v140);
v220 = *((cocos2d::CCObject **)this + 145);
v141 = *(void (__fastcall **)(cocos2d::CCObject *, _DWORD *))(*(_DWORD *)v220 + 92);
v214 = *((cocos2d::CCPoint **)this + 111);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v281,
(float)((float)((float)(v231 * 0.5) + 180.0) - 35.0) - 8.0,
(float)((float)((float)(v232 * 0.5) + 120.0) + 19.0) - 15.0);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v289, v214);
v141(v220, v289);
v142 = (GameManager *)(*(int (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 145) + 36))(
*((_DWORD *)this + 145),
3);
v143 = (GameManager *)GameManager::sharedState(v142);
v144 = GameManager::sharedState(v143);
FontFile = GameManager::getFontFile(v143, *(_DWORD *)(v144 + 780));
v147 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)" ", FontFile, v146);
*((_DWORD *)this + 153) = v147;
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 115) + 228))(*((_DWORD *)this + 115), v147);
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 153) + 80))(*((_DWORD *)this + 153), 1058642330);
v215 = *((cocos2d::CCPoint **)this + 153);
v148 = *(void (__fastcall **)(cocos2d::CCPoint *, _DWORD *))(*(_DWORD *)v215 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v289, v231 * 0.5, (float)(v232 * 0.5) - 15.0);
v148(v215, v289);
cocos2d::CCArray::addObject(*((cocos2d::CCArray **)this + 137), *((cocos2d::CCObject **)this + 153));
v149 = *(_DWORD *)(LODWORD(v204) - 10048);
v273 = 0;
v272 = v149;
v150 = (Slider *)Slider::create((int)this, v149, 0, 0.8);
*((_DWORD *)this + 154) = v150;
Slider::setBarVisibility(v150, 0);
(*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 115) + 228))(
*((_DWORD *)this + 115),
*((_DWORD *)this + 154));
v151 = *((_DWORD *)this + 154);
v221 = *(cocos2d::CCObject **)(*(_DWORD *)v151 + 92);
v216 = (cocos2d::CCPoint *)(*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 153) + 96))(*((_DWORD *)this + 153));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v281, 0.0, -28.0);
cocos2d::CCPoint::operator+(v289, v216, v281);
((void (__fastcall *)(int, _DWORD *))v221)(v151, v289);
cocos2d::CCArray::addObject(*((cocos2d::CCArray **)this + 137), *((cocos2d::CCObject **)this + 154));
*((_DWORD *)this + 152) = (*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 133) + 880))(*((_DWORD *)this + 133));
CustomizeObjectLayer::updateKerningLabel((int)this);
v152 = *((Slider **)this + 154);
v153 = kerningSliderValueFromValue(*((_DWORD *)this + 152));
Slider::setValue(v152, *(float *)&v153);
if ( *(_DWORD *)(*((_DWORD *)this + 133) + 892) == 914 )
{
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v280, v231 * 0.5, (float)(v232 * 0.5) + 50.0);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v289, (const cocos2d::CCRect *)v288);
v154 = (char *)cocos2d::extension::CCScale9Sprite::create("square02_small.png", v289);
(*(void (__fastcall **)(char *, int))(*(_DWORD *)v154 + 456))(v154, 100);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v289, 240.0, 30.0);
cocos2d::CCSize::operator=(v235, v289);
(*(void (__fastcall **)(char *, _BYTE *))(*(_DWORD *)v154 + 160))(v154, v235);
(*(void (__fastcall **)(_DWORD, char *, int))(**((_DWORD **)this + 115) + 232))(*((_DWORD *)this + 115), v154, -1);
(*(void (__fastcall **)(char *, _DWORD *))(*(_DWORD *)v154 + 92))(v154, v280);
cocos2d::CCArray::addObject(*((cocos2d::CCArray **)this + 137), (cocos2d::CCObject *)v154);
v155 = (GameManager *)(*(int (__fastcall **)(char *, _DWORD))(*(_DWORD *)v154 + 172))(v154, 0);
v156 = (GameManager *)GameManager::sharedState(v155);
v157 = GameManager::sharedState(v156);
v158 = (char *)GameManager::getFontFile(v156, *(_DWORD *)(v157 + 780));
v159 = CCTextInputNode::create(
(CCTextInputNode *)0x43700000,
40.0,
"Text",
"Thonburi",
(const char *)&dword_18,
v158,
v198);
*((_DWORD *)this + 151) = v159;
(*(void (__fastcall **)(_DWORD, int *, int))(**((_DWORD **)this + 115) + 232))(*((_DWORD *)this + 115), v159, 20);
(*(void (__fastcall **)(_DWORD, _DWORD *))(**((_DWORD **)this + 151) + 92))(*((_DWORD *)this + 151), v280);
CCTextInputNode::setMaxLabelScale(*((_DWORD *)this + 151), 0.6);
CCTextInputNode::setMaxLabelWidth(*((_DWORD *)this + 151), 240.0);
(*(void (__fastcall **)(_DWORD, _DWORD))(**(_DWORD **)(*((_DWORD *)this + 151) + 416) + 172))(
*(_DWORD *)(*((_DWORD *)this + 151) + 416),
0);
*(_DWORD *)(*((_DWORD *)this + 151) + 424) = 20;
v160 = *((_DWORD *)this + 151);
v285 = 0;
v286 = 0;
v287 = 0;
std::string::__init(
&v285,
" abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.,-!?:;)(/\\\"'`*=+-_%[]<>|@&^#{}%$~",
0x61u);
CCTextInputNode::setAllowedChars(v160, (unsigned __int8 *)&v285);
std::string::~string((int)&v285);
LOWORD(v230) = -21896;
BYTE2(v230) = -16;
CCTextInputNode::setLabelPlaceholderColor(*((_DWORD *)this + 151), v230);
CCTextInputNode::setLabelPlaceholderScale(*((_DWORD *)this + 151), 0.5);
*(_DWORD *)(*((_DWORD *)this + 151) + 420) = (char *)this + 440;
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 151) + 36))(*((_DWORD *)this + 151), 1);
(*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 151) + 172))(*((_DWORD *)this + 151), 0);
(*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 151) + 500))(*((_DWORD *)this + 151), 0);
*(_BYTE *)(*((_DWORD *)this + 151) + 432) = 1;
*(_DWORD *)(*((_DWORD *)this + 151) + 512) = *((_DWORD *)this + 152);
v161 = *((_DWORD *)this + 133);
v282 = 0;
v283 = 0;
v284 = nullptr;
v162 = *((_DWORD *)this + 151);
if ( (*(_BYTE *)(v161 + 1168) & 1) != 0 )
{
std::string::__init(&v282, *(const void **)(v161 + 1176), *(_DWORD *)(v161 + 1172));
}
else
{
v163 = (int *)(v161 + 1168);
v164 = v163[1];
v165 = (char *)v163[2];
v282 = *v163;
v283 = v164;
v284 = v165;
}
if ( (v282 & 1) == 0 )
v154 = (char *)&v282 + 1;
v285 = 0;
if ( (v282 & 1) != 0 )
v154 = v284;
v286 = 0;
v287 = 0;
v166 = strlen(v154);
std::string::__init(&v285, v154, v166);
CCTextInputNode::setString(v162, (int)&v285);
std::string::~string((int)&v285);
std::string::~string((int)&v282);
v167 = ButtonSprite::create(
(ButtonSprite *)"Split",
(const char *)&word_28,
0,
0.6,
1,
"bigFont.fnt",
"GJ_button_04.png",
(const char *)0x41F00000,
v204);
v168 = *(_DWORD *)(LODWORD(v204) - 10044);
v275 = 0;
v274 = v168;
v169 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::create((int)v167, 0, (int)this, v168, 0);
(*(void (__fastcall **)(_DWORD, cocos2d::CCObject *))(**((_DWORD **)this + 111) + 228))(
*((_DWORD *)this + 111),
v169);
cocos2d::CCArray::addObject(*((cocos2d::CCArray **)this + 137), v169);
v170 = *((const cocos2d::CCPoint **)this + 111);
v171 = *(void (__fastcall **)(cocos2d::CCObject *, _DWORD *))(*(_DWORD *)v169 + 92);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v281,
(float)((float)(v231 * 0.5) + 180.0) - 36.0,
(float)((float)(v232 * 0.5) - 120.0) + 10.0);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v289, v170);
v171(v169, v289);
v173 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_resetBtn_001.png", v172);
v174 = *(_DWORD *)(LODWORD(v204) - 10040);
v277 = 0;
v276 = v174;
v175 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::create(v173, 0, (int)this, v174, 0);
(*(void (__fastcall **)(_DWORD, cocos2d::CCObject *))(**((_DWORD **)this + 111) + 228))(
*((_DWORD *)this + 111),
v175);
cocos2d::CCArray::addObject(*((cocos2d::CCArray **)this + 137), v175);
v176 = *((const cocos2d::CCPoint **)this + 111);
v177 = *(void (__fastcall **)(cocos2d::CCObject *, _DWORD *))(*(_DWORD *)v175 + 92);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v281,
(float)((float)(v231 * 0.5) + 120.0) + 24.0,
(float)(v232 * 0.5) + 35.0);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v289, v176);
v177(v175, v289);
}
}
v178 = ButtonSprite::create(
(ButtonSprite *)"Next Free",
(const char *)&word_32,
0,
0.7,
1,
"goldFont.fnt",
"GJ_button_04.png",
COERCE_CONST_CHAR_(25.0),
v204);
v179 = *(_DWORD *)(LODWORD(v205) - 10036);
v279 = 0;
v278 = v179;
v180 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::create((int)v178, 0, (int)this, v179, 0);
(*(void (__fastcall **)(_DWORD, cocos2d::CCObject *))(**((_DWORD **)this + 111) + 228))(*((_DWORD *)this + 111), v180);
v211 = *(cocos2d::CCPoint **)(*(_DWORD *)v180 + 92);
v222 = *((cocos2d::CCObject **)this + 111);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v281,
(float)((float)(v231 * 0.5) - 180.0) + 42.0,
(float)((float)(v232 * 0.5) - 120.0) + 8.0);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v289, v222);
((void (__fastcall *)(cocos2d::CCObject *, _DWORD *))v211)(v180, v289);
cocos2d::CCArray::addObject(*((cocos2d::CCArray **)this + 136), v180);
v212 = *((cocos2d::CCPoint **)this + 111);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v289, (float)(v231 * 0.5) + 210.0, (float)(v232 * 0.5) + 142.0);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v237, v212);
v213 = ButtonSprite::create(
(ButtonSprite *)"Copy",
(const char *)&dword_20 + 3,
0,
0.5,
1,
"goldFont.fnt",
"GJ_button_04.png",
COERCE_CONST_CHAR_(25.0),
v205);
v181 = ButtonSprite::create(
(ButtonSprite *)"Paste",
(const char *)&dword_20 + 3,
0,
0.5,
1,
"goldFont.fnt",
"GJ_button_04.png",
COERCE_CONST_CHAR_(25.0),
v206);
v182 = *(_DWORD *)(LODWORD(v207) - 10032);
v280[1] = 0;
v280[0] = v182;
v183 = (int)v181;
v184 = CCMenuItemSpriteExtra::create((int)v213, 0, (int)this, v182, 0);
v185 = *(_DWORD *)(LODWORD(v207) - 10028);
v281[1] = 0;
v281[0] = v185;
v186 = v184;
v187 = (GameManager *)CCMenuItemSpriteExtra::create(v183, 0, (int)this, v185, 0);
v188 = v187;
if ( a2 )
{
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 111) + 228))(*((_DWORD *)this + 111), v186);
(*(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v186 + 92))(v186, v237);
LABEL_39:
(*(void (__fastcall **)(_DWORD, GameManager *))(**((_DWORD **)this + 111) + 228))(*((_DWORD *)this + 111), v188);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v238, (const cocos2d::CCPoint *)v237);
if ( a2 )
{
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v239, 0.0, -31.0);
cocos2d::CCPoint::operator+(v289, v238, v239);
cocos2d::CCPoint::operator=(v238, v289);
}
(*(void (__fastcall **)(GameManager *, _BYTE *))(*(_DWORD *)v188 + 92))(v188, v238);
goto LABEL_42;
}
v189 = GameManager::sharedState(v187);
if ( LevelEditorLayer::canPasteState(*(LevelEditorLayer **)(v189 + 408)) )
goto LABEL_39;
LABEL_42:
v190 = ButtonSprite::create(
(ButtonSprite *)"Browse",
(const char *)&dword_20 + 3,
0,
0.5,
1,
"goldFont.fnt",
"GJ_button_04.png",
COERCE_CONST_CHAR_(25.0),
v207);
v191 = *(_DWORD *)(v208 - 10024);
v289[1] = 0;
v289[0] = v191;
v192 = CCMenuItemSpriteExtra::create((int)v190, 0, (int)this, v191, 0);
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 111) + 228))(*((_DWORD *)this + 111), v192);
v193 = *((const cocos2d::CCPoint **)this + 111);
v194 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v192 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v238, (float)(v231 * 0.5) + 210.0, (float)(v232 * 0.5) - 140.0);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v239, v193);
v194(v192, v239);
if ( *((_BYTE *)this + 568) )
v195 = *((cocos2d::CCObject **)this + 143);
else
v195 = *((cocos2d::CCObject **)this + 144);
CustomizeObjectLayer::onSelectMode(this, v195);
*((_BYTE *)this + 654) = 0;
return v225;
}