//
// CustomizeObjectLayer::init from 0x1001d74a0 to 0x1001d95e3 (8515 bytes)
//
// 2 xrefs:
// > CustomizeObjectLayer::create @ 0x1001d745e
// > CustomizeObjectLayer::recreateLayer @ 0x1001dad6e
//
// This function is hookable on this platform (idp: pc, 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:26:25 +0000
//
__int64 __fastcall CustomizeObjectLayer::init(__int64 a1, __int64 a2, __int64 a3)
{
__int64 v5; // rbx
__int64 v6; // rsi
__int64 result; // rax
__int64 v8; // rax
__int64 v9; // r14
__int64 v10; // r14
__int64 v11; // rdi
__int64 v12; // rax
__int64 v13; // rdi
__int64 v14; // rax
__int64 v15; // rdi
__int64 v16; // rax
__int64 v17; // rax
__int64 v18; // r14
__int64 v19; // rax
__int64 v20; // rax
__int64 v21; // r14
__int64 v22; // r14
__int64 v23; // r12
__int64 v24; // r14
char *v25; // rax
__int64 v26; // rax
__int64 v27; // r13
__int64 v28; // r14
char *v29; // rax
__int64 v30; // rax
__int64 v31; // r14
__int64 v32; // r15
_QWORD *v33; // r15
__int64 v34; // r14
__int64 v35; // rax
__int64 v36; // r14
__int64 v37; // rbx
__int64 v38; // r14
__int64 v39; // rdi
__int64 v40; // r15
__int64 v41; // rax
__int64 v42; // r14
__int64 v43; // r14
__int64 v44; // rax
__int64 v45; // rax
__int64 v46; // rax
__int64 v47; // rax
__int64 v48; // r14
__int64 v49; // r15
__int64 v50; // r14
__int64 v51; // rax
__int64 v52; // rax
char *v53; // r14
_QWORD *v54; // r13
__int64 v55; // rax
char *v56; // r14
_QWORD *v57; // r13
__int64 v58; // rax
char *v59; // r14
__int64 v60; // r13
char *v61; // r14
__int64 v62; // r15
unsigned int i; // r13d
__int64 v64; // rax
__int64 CString; // rax
char *v66; // r12
__int64 v67; // rbx
__int64 v68; // r14
__int64 v69; // rbx
__int64 v70; // rdi
__int64 v71; // rax
float v72; // xmm0_4
void *v73; // rax
__int64 v74; // rdi
_QWORD *v75; // rdi
__int64 v76; // r15
__int64 v77; // r12
__int64 v78; // rax
__int64 v79; // r12
__int64 v80; // r14
__int64 v81; // rax
__int64 v82; // r14
__int64 v83; // rdi
__int64 v84; // rdx
double v85; // xmm0_8
__int64 v86; // rax
__int64 v87; // rax
__int64 v88; // rax
__int64 v89; // r14
__int64 v90; // r15
__int64 v91; // r14
__int64 v92; // r15
__int64 v93; // rax
__int64 v94; // r14
__int64 v95; // r15
__int64 v96; // rdi
__int64 v97; // rax
int v98; // eax
__int64 v99; // rax
unsigned int v100; // r15d
__int64 v101; // r12
__int64 v102; // rax
char *v103; // rax
__int64 v104; // rax
__int64 v105; // r14
__int64 v106; // r15
__int64 v107; // rdi
__int64 v108; // rdx
__int64 v109; // rax
__int64 v110; // r14
__int64 v111; // rdx
double v112; // xmm0_8
__int64 v113; // rax
__int64 FontFile; // rax
__int64 v115; // rax
__int64 v116; // r14
__int64 v117; // rax
__int64 v118; // r14
__int64 v119; // r15
__int64 v120; // r15
__int64 v121; // rdi
__int64 v122; // rdx
__int64 v123; // rax
__int64 v124; // r15
__int64 v125; // rdx
double v126; // xmm0_8
__int64 v127; // rax
__int64 v128; // rax
void *v129; // rax
__int64 v130; // r14
_QWORD *v131; // rdi
_QWORD *v132; // r14
__int64 v133; // rax
__int64 v134; // rax
const char *v135; // r15
size_t v136; // rax
size_t v137; // r12
char *v138; // r13
size_t v139; // r14
char *v140; // rax
__int64 v141; // r14
__int64 v142; // r15
__int64 v143; // rax
__int64 v144; // r14
__int64 v145; // r15
char *v146; // rax
__int64 v147; // r12
__int64 v148; // r13
__int64 v149; // r14
char *v150; // r14
char *v151; // r12
__int64 v152; // r15
__int64 v153; // rdx
__int64 v154; // r14
double v155; // xmm0_8
__int64 v156; // rax
char *v157; // rax
__int64 v158; // r14
__int64 v159; // r15
char v160; // [rsp+0h] [rbp-140h]
char v161[8]; // [rsp+8h] [rbp-138h] BYREF
char v162[8]; // [rsp+10h] [rbp-130h] BYREF
char v163[8]; // [rsp+18h] [rbp-128h] BYREF
_QWORD *v164; // [rsp+20h] [rbp-120h]
__int64 v165; // [rsp+28h] [rbp-118h]
char v166; // [rsp+30h] [rbp-110h] BYREF
char v167[15]; // [rsp+31h] [rbp-10Fh] BYREF
void *v168; // [rsp+40h] [rbp-100h]
_QWORD v169[2]; // [rsp+48h] [rbp-F8h] BYREF
void *__p; // [rsp+58h] [rbp-E8h]
std::string v171; // [rsp+60h] [rbp-E0h] BYREF
char v172[8]; // [rsp+78h] [rbp-C8h] BYREF
std::string v173; // [rsp+80h] [rbp-C0h] BYREF
_QWORD __dst[2]; // [rsp+98h] [rbp-A8h] BYREF
void *v175; // [rsp+A8h] [rbp-98h]
char v176[8]; // [rsp+B0h] [rbp-90h] BYREF
char v177[8]; // [rsp+B8h] [rbp-88h] BYREF
_BYTE v178[16]; // [rsp+C0h] [rbp-80h] BYREF
__int64 v179; // [rsp+D0h] [rbp-70h]
_QWORD *v180; // [rsp+D8h] [rbp-68h]
char __s[16]; // [rsp+E0h] [rbp-60h] BYREF
void *v182; // [rsp+F0h] [rbp-50h]
unsigned __int8 v183; // [rsp+107h] [rbp-39h]
char v184[8]; // [rsp+108h] [rbp-38h] BYREF
float v185; // [rsp+110h] [rbp-30h] BYREF
float v186; // [rsp+114h] [rbp-2Ch]
v5 = a1;
v6 = 200;
result = FLAlertLayer::init_1(a1, 200);
if ( (_BYTE)result )
{
v183 = result;
if ( a2 )
{
*(_QWORD *)(a1 + 688) = a2;
}
else
{
v99 = sub_1007FE900(a1);
*(_QWORD *)(a1 + 696) = v99;
a1 = v99;
cocos2d::CCObject::retain(v99);
if ( a3 )
{
a1 = a3;
if ( (unsigned int)sub_1007FEF90(a3) )
{
v100 = 0;
do
{
v6 = v100;
v101 = sub_1007FEFE0(a3, v100);
if ( (unsigned __int8)GameObject::canChangeCustomColor(v101) )
{
v6 = v101;
sub_1007FEBF0(*(_QWORD *)(v5 + 696), v101);
}
++v100;
a1 = a3;
}
while ( v100 < (unsigned int)sub_1007FEF90(a3) );
}
}
}
*(_BYTE *)(v5 + 922) = 1;
*(_BYTE *)(v5 + 596) = 1;
v8 = cocos2d::CCDirector::sharedDirector(a1, v6);
cocos2d::CCDirector::getWinSize(&v185, v8);
sub_100278270(__s, 0.0, 0.0, COERCE_DOUBLE(1117782016), COERCE_DOUBLE(1117782016));
v9 = cocos2d::extension::CCScale9Sprite::create_2("GJ_square01.png", __s);
sub_100278260(__s, COERCE_DOUBLE(1135869952), COERCE_DOUBLE(1131413504));
(*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v9 + 320LL))(v9, __s);
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**(_QWORD **)(v5 + 584) + 464LL))(
*(_QWORD *)(v5 + 584),
v9,
0xFFFFFFFFLL);
sub_100278250(__s, v185 * 0.5, v186 * 0.5);
(*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v9 + 184LL))(v9, __s);
v10 = cocos2d::CCLabelBMFont::create_3(" ", "goldFont.fnt");
*(_QWORD *)(v5 + 800) = v10;
sub_100278250(__s, v185 * 0.5, (float)((float)(v186 * 0.5) + 120.0) + -25.0);
(*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v10 + 184LL))(v10, __s);
v11 = *(_QWORD *)(v5 + 584);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v11 + 456LL))(v11, *(_QWORD *)(v5 + 800));
v12 = sub_1007FE900(v11);
*(_QWORD *)(v5 + 712) = v12;
v13 = v12;
cocos2d::CCObject::retain(v12);
v14 = sub_1007FE900(v13);
*(_QWORD *)(v5 + 728) = v14;
v15 = v14;
cocos2d::CCObject::retain(v14);
v16 = sub_1007FE900(v15);
*(_QWORD *)(v5 + 736) = v16;
cocos2d::CCObject::retain(v16);
v17 = cocos2d::CCMenu::create();
*(_QWORD *)(v5 + 552) = v17;
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**(_QWORD **)(v5 + 584) + 464LL))(*(_QWORD *)(v5 + 584), v17, 10);
v18 = *(_QWORD *)(v5 + 584);
sub_100278250(__s, 0.0, -15.0);
(*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v18 + 184LL))(v18, __s);
v19 = sub_100059E00((__int64)"OK");
v20 = CCMenuItemSpriteExtra::create(v19, 0, v5, CustomizeObjectLayer::onClose, 0);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(v5 + 552) + 456LL))(*(_QWORD *)(v5 + 552), v20);
v21 = *(_QWORD *)(v5 + 552);
sub_100278250(__s, v185 * 0.5, (float)((float)(v186 * 0.5) + -120.0) + 25.0);
(*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v21 + 184LL))(v21, __s);
v166 = 8;
strcpy(v167, "Help");
__p = operator new(0x1A8u);
v169[0] = 425;
v169[1] = 420;
strcpy(
(char *)__p,
"Select color channel to apply to the selected object(s). Edit the properties of the selected channel in th"
"e 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.");
v22 = InfoAlertButton::create(&v166, v169, 1.0);
if ( (v169[0] & 1) != 0 )
operator delete(__p);
v165 = a2;
if ( (v166 & 1) != 0 )
operator delete(v168);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(v5 + 552) + 456LL))(*(_QWORD *)(v5 + 552), v22);
v180 = *(_QWORD **)(v5 + 552);
v23 = *(_QWORD *)(v5 + 584);
sub_100278250(v176, (float)((float)(v185 * 0.5) + 180.0) + -18.0, (float)((float)(v186 * 0.5) + 120.0) + -18.0);
cocos2d::CCNode::convertToWorldSpace(v178, v23, v176);
cocos2d::CCNode::convertToNodeSpace(__s, v180, v178);
(*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v22 + 184LL))(v22, __s);
v24 = *(_QWORD *)(v5 + 552);
sub_100278250(__s, v185 * 0.5, v186 * 0.5);
cocos2d::CCNode::convertToNodeSpace(v176, v24, __s);
CustomizeObjectLayer::determineStartValues(v5);
v25 = ButtonSprite::create_1(
(__int64)"Base",
0x46u,
0,
1u,
(__int64)"bigFont.fnt",
(__int64)"GJ_button_04.png",
0.60000002,
30.0);
v26 = CCMenuItemSpriteExtra::create(v25, 0, v5, CustomizeObjectLayer::onSelectMode, 0);
*(_QWORD *)(v5 + 760) = v26;
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(v5 + 552) + 456LL))(*(_QWORD *)(v5 + 552), v26);
v27 = *(_QWORD *)(v5 + 760);
v28 = *(_QWORD *)(v5 + 552);
sub_100278250(
v178,
(float)((float)((float)(v185 * 0.5) + -180.0) + 35.0) + 8.0,
(float)((float)((float)(v186 * 0.5) + 120.0) + 19.0) + -15.0);
cocos2d::CCNode::convertToNodeSpace(__s, v28, v178);
(*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v27 + 184LL))(v27, __s);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(v5 + 760) + 72LL))(*(_QWORD *)(v5 + 760), 1);
v29 = ButtonSprite::create_1(
(__int64)"Detail",
0x46u,
0,
1u,
(__int64)"bigFont.fnt",
(__int64)"GJ_button_04.png",
0.60000002,
30.0);
v30 = CCMenuItemSpriteExtra::create(v29, 0, v5, CustomizeObjectLayer::onSelectMode, 0);
v180 = (_QWORD *)(v5 + 768);
*(_QWORD *)(v5 + 768) = v30;
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(v5 + 552) + 456LL))(*(_QWORD *)(v5 + 552), v30);
v31 = *(_QWORD *)(v5 + 768);
v32 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(v5 + 760) + 192LL))(*(_QWORD *)(v5 + 760));
sub_100278250(v178, 95.0, 0.0);
sub_100278350(__s, v32, v178);
(*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v31 + 184LL))(v31, __s);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(v5 + 768) + 72LL))(*(_QWORD *)(v5 + 768), 2);
v179 = v5;
if ( *(_BYTE *)(v5 + 753) )
{
if ( *(_BYTE *)(v179 + 752) )
{
LABEL_13:
v36 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_optionsBtn_001.png");
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v36 + 160LL))(v36, 0.60000002);
v37 = v179;
v38 = CCMenuItemSpriteExtra::create(v36, 0, v179, CustomizeObjectLayer::onSettings, 0);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(v37 + 552) + 456LL))(*(_QWORD *)(v37 + 552), v38);
v39 = *(_QWORD *)(v37
+ 8LL
* (*(unsigned __int8 (__fastcall **)(_QWORD))(**(_QWORD **)(v37 + 768) + 352LL))(*(_QWORD *)(v37 + 768))
+ 760);
v40 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v39 + 192LL))(v39);
sub_100278250(v178, 70.0, 0.0);
sub_100278350(__s, v40, v178);
(*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v38 + 184LL))(v38, __s);
v41 = cocos2d::CCLabelBMFont::create_3("1", "goldFont.fnt");
*(_QWORD *)(v37 + 808) = v41;
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v41 + 160LL))(v41, 0.75);
v42 = *(_QWORD *)(v37 + 808);
sub_100278250(__s, 1.0, 0.5);
(*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v42 + 296LL))(v42, __s);
(*(void (__fastcall **)(_QWORD, _QWORD, __int64))(**(_QWORD **)(v37 + 584) + 464LL))(
*(_QWORD *)(v37 + 584),
*(_QWORD *)(v37 + 808),
10);
v43 = *(_QWORD *)(v37 + 808);
sub_100278250(__s, (float)(v185 * 0.5) + 130.0, (float)(v186 * 0.5) + -91.0);
(*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v43 + 184LL))(v43, __s);
sub_1007FEBF0(*(_QWORD *)(v37 + 712), *(_QWORD *)(v37 + 808));
v44 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_hsvBtn_001.png");
v45 = CCMenuItemSpriteExtra::create(v44, 0, v37, CustomizeObjectLayer::onHSV, 0);
*(_QWORD *)(v37 + 784) = v45;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v45 + 72LL))(v45, 1);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(v37 + 552) + 456LL))(
*(_QWORD *)(v37 + 552),
*(_QWORD *)(v37 + 784));
v46 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_hsvBtn_001.png");
v47 = CCMenuItemSpriteExtra::create(v46, 0, v37, CustomizeObjectLayer::onHSV, 0);
*(_QWORD *)(v37 + 792) = v47;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v47 + 72LL))(v47, 2);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(v37 + 552) + 456LL))(
*(_QWORD *)(v37 + 552),
*(_QWORD *)(v37 + 792));
v48 = *(_QWORD *)(v37 + 784);
v49 = *(_QWORD *)(v37 + 552);
sub_100278250(v178, (float)((float)(v185 * 0.5) + -180.0) + 25.0, (float)((float)(v186 * 0.5) + 120.0) + -40.0);
cocos2d::CCNode::convertToNodeSpace(__s, v49, v178);
(*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v48 + 184LL))(v48, __s);
v50 = *(_QWORD *)(v37 + 792);
v51 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(v37 + 784) + 192LL))(*(_QWORD *)(v37 + 784));
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v50 + 184LL))(v50, v51);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(v37 + 784) + 344LL))(*(_QWORD *)(v37 + 784), 0);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(v37 + 792) + 344LL))(*(_QWORD *)(v37 + 792), 0);
CustomizeObjectLayer::updateHSVButtons(v37);
v52 = sub_1007FE900(v37);
*(_QWORD *)(v37 + 704) = v52;
cocos2d::CCObject::retain(v52);
v53 = ButtonSprite::create_1(
(__int64)"P-Col 1",
0xDCu,
0,
0,
(__int64)"bigFont.fnt",
(__int64)"GJ_button_04.png",
0.40000001,
25.0);
v54 = (_QWORD *)CCMenuItemSpriteExtra::create(v53, 0, v37, &CustomizeObjectLayer::onSelectColor, 0);
v55 = *v54;
v180 = v54;
(*(void (__fastcall **)(_QWORD *, __int64))(v55 + 72))(v54, 1005);
(*(void (__fastcall **)(char *, __int64))(*(_QWORD *)v53 + 72LL))(v53, 1005);
(*(void (__fastcall **)(_QWORD, _QWORD *))(**(_QWORD **)(v37 + 552) + 456LL))(*(_QWORD *)(v37 + 552), v54);
sub_1007FEBF0(*(_QWORD *)(v37 + 704), v53);
sub_1007FEBF0(*(_QWORD *)(v37 + 712), v54);
v56 = ButtonSprite::create_1(
(__int64)"P-Col 2",
0xDCu,
0,
0,
(__int64)"bigFont.fnt",
(__int64)"GJ_button_04.png",
0.40000001,
25.0);
v57 = (_QWORD *)CCMenuItemSpriteExtra::create(v56, 0, v37, &CustomizeObjectLayer::onSelectColor, 0);
v58 = *v57;
v164 = v57;
(*(void (__fastcall **)(_QWORD *, __int64))(v58 + 72))(v57, 1006);
(*(void (__fastcall **)(char *, __int64))(*(_QWORD *)v56 + 72LL))(v56, 1006);
(*(void (__fastcall **)(_QWORD, _QWORD *))(**(_QWORD **)(v37 + 552) + 456LL))(*(_QWORD *)(v37 + 552), v57);
sub_1007FEBF0(*(_QWORD *)(v37 + 704), v56);
sub_1007FEBF0(*(_QWORD *)(v37 + 712), v57);
v59 = ButtonSprite::create_1(
(__int64)"Light BG",
0xDCu,
0,
0,
(__int64)"bigFont.fnt",
(__int64)"GJ_button_04.png",
0.40000001,
25.0);
v60 = CCMenuItemSpriteExtra::create(v59, 0, v37, &CustomizeObjectLayer::onSelectColor, 0);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v60 + 72LL))(v60, 1007);
(*(void (__fastcall **)(char *, __int64))(*(_QWORD *)v59 + 72LL))(v59, 1007);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(v37 + 552) + 456LL))(*(_QWORD *)(v37 + 552), v60);
sub_1007FEBF0(*(_QWORD *)(v37 + 704), v59);
sub_1007FEBF0(*(_QWORD *)(v37 + 712), v60);
v61 = ButtonSprite::create_1(
(__int64)"Default",
0xDCu,
0,
0,
(__int64)"bigFont.fnt",
(__int64)"GJ_button_04.png",
0.40000001,
25.0);
v62 = CCMenuItemSpriteExtra::create(v61, 0, v37, &CustomizeObjectLayer::onSelectColor, 0);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v62 + 72LL))(v62, 0);
(*(void (__fastcall **)(char *, _QWORD))(*(_QWORD *)v61 + 72LL))(v61, 0);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(v37 + 552) + 456LL))(*(_QWORD *)(v37 + 552), v62);
sub_1007FEBF0(*(_QWORD *)(v37 + 704), v61);
sub_1007FEBF0(*(_QWORD *)(v37 + 712), v62);
sub_100278250(v178, -135.0, 25.0);
sub_100278350(__s, v176, v178);
(*(void (__fastcall **)(_QWORD *, char *))(*v180 + 184LL))(v180, __s);
sub_100278250(v178, -45.0, 25.0);
sub_100278350(__s, v176, v178);
(*(void (__fastcall **)(_QWORD *, char *))(*v164 + 184LL))(v164, __s);
sub_100278250(v178, 45.0, 25.0);
sub_100278350(__s, v176, v178);
(*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v60 + 184LL))(v60, __s);
sub_100278250(v178, 135.0, 25.0);
sub_100278350(__s, v176, v178);
(*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v62 + 184LL))(v62, __s);
for ( i = 0; i != 10; ++i )
{
LODWORD(v180) = 251 * (i / 5);
v64 = sub_10088E820("%i", v160);
CString = cocos2d::CCString::getCString(v64);
v66 = ButtonSprite::create_1(
CString,
0x1Eu,
0,
1u,
(__int64)"bigFont.fnt",
(__int64)"GJ_button_04.png",
0.40000001,
25.0);
v67 = v179;
v68 = CCMenuItemSpriteExtra::create(v66, 0, v179, &CustomizeObjectLayer::onSelectColor, 0);
(*(void (__fastcall **)(char *, _QWORD))(*(_QWORD *)v66 + 72LL))(v66, i + 1);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v68 + 72LL))(v68, i + 1);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(v67 + 552) + 456LL))(*(_QWORD *)(v67 + 552), v68);
sub_1007FEBF0(*(_QWORD *)(v67 + 704), v66);
sub_1007FEBF0(*(_QWORD *)(v67 + 712), v68);
sub_100278250(
v178,
(float)((float)(char)(i + (_BYTE)v180) * 65.0) + -130.0,
(float)((float)((int)(float)(char)(((unsigned __int16)(103 * (char)i) >> 15)
+ ((unsigned int)(__int16)(103 * (char)i) >> 9))
+ 1)
* -40.0)
+ 25.0);
sub_100278350(__s, v176, v178);
(*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v68 + 184LL))(v68, __s);
}
v69 = v179;
*(_QWORD *)(v179 + 856) = v66;
*(_QWORD *)(v69 + 864) = v68;
(*(void (__fastcall **)(char *, __int64))(*(_QWORD *)v66 + 72LL))(v66, 1008);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(v69 + 864) + 72LL))(*(_QWORD *)(v69 + 864), 1008);
v70 = *(_QWORD *)(v69 + 856);
ButtonSprite::setString(v70, "+");
v71 = cocos2d::CCDirector::sharedDirector(v70, "+");
v72 = sub_100479770(v71);
sub_100278250(v162, v72 + -30.0, v186 * 0.5);
sub_100278270(v178, 0.0, 0.0, COERCE_DOUBLE(1109393408), COERCE_DOUBLE(1109393408));
sub_1002787F0(__s, v178);
*(_QWORD *)(v69 + 888) = cocos2d::extension::CCScale9Sprite::create_2("square02_small.png", __s);
sub_100278260(v163, COERCE_DOUBLE(1112014848), COERCE_DOUBLE(1106247680));
(*(void (__fastcall **)(_QWORD, char *))(**(_QWORD **)(v69 + 888) + 320LL))(*(_QWORD *)(v69 + 888), v163);
(*(void (__fastcall **)(_QWORD, _QWORD, __int64))(**(_QWORD **)(v69 + 584) + 464LL))(
*(_QWORD *)(v69 + 584),
*(_QWORD *)(v69 + 888),
0xFFFFFFFFLL);
(*(void (__fastcall **)(_QWORD, char *))(**(_QWORD **)(v69 + 888) + 184LL))(*(_QWORD *)(v69 + 888), v162);
v73 = CCTextInputNode::create((__int64)"Num", (__int64)"Thonburi", 0x18u, (__int64)"bigFont.fnt", 100.0, 40.0);
*(_QWORD *)(v69 + 816) = v73;
(*(void (__fastcall **)(_QWORD, void *, __int64))(**(_QWORD **)(v69 + 584) + 464LL))(
*(_QWORD *)(v69 + 584),
v73,
20);
(*(void (__fastcall **)(_QWORD, char *))(**(_QWORD **)(v69 + 816) + 184LL))(*(_QWORD *)(v69 + 816), v162);
CCTextInputNode::setMaxLabelScale(*(_QWORD *)(v69 + 816), 0.60000002);
CCTextInputNode::setMaxLabelWidth(*(_QWORD *)(v69 + 816), 200.0);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(*(_QWORD *)(v69 + 816) + 576LL) + 344LL))(
*(_QWORD *)(*(_QWORD *)(v69 + 816) + 576LL),
0);
v74 = *(_QWORD *)(v69 + 816);
*(_DWORD *)(v74 + 592) = 4;
v173.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)20;
strcpy(v173.__r_.__value_.__s.__data_, "0123456789");
CCTextInputNode::setAllowedChars(v74, &v173);
if ( (*(_BYTE *)&v173.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v173.__r_.__value_.__l.__data_);
CCTextInputNode::setLabelPlaceholderColor(*(_QWORD *)(v69 + 816), 15772280);
CCTextInputNode::setLabelPlaceholderScale(*(_QWORD *)(v69 + 816), 0.5);
v75 = *(_QWORD **)(v69 + 816);
v180 = (_QWORD *)(v69 + 544);
v75[73] = v69 + 544;
(*(void (__fastcall **)(_QWORD *, _QWORD))(*v75 + 72LL))(v75, 0);
ButtonSprite::setString(*(_QWORD *)(v69 + 856), "++");
v76 = *(_QWORD *)(v69 + 552);
sub_100278250(v184, 0.0, -15.0);
sub_100278350(__s, v162, v184);
cocos2d::CCNode::convertToNodeSpace(v172, v76, __s);
v77 = cocos2d::CCSprite::createWithSpriteFrameName("edit_leftBtn_001.png");
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v77 + 160LL))(v77, 1.4);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v77 + 360LL))(v77, 90.0);
v78 = CCMenuItemSpriteExtra::create(v77, 0, v69, &CustomizeObjectLayer::onUpdateCustomColor, 0);
*(_QWORD *)(v69 + 872) = v78;
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(v69 + 552) + 456LL))(*(_QWORD *)(v69 + 552), v78);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(v69 + 872) + 72LL))(*(_QWORD *)(v69 + 872), 1);
v79 = *(_QWORD *)(v69 + 872);
sub_100278250(v184, 0.0, 40.0);
sub_100278350(__s, v172, v184);
(*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v79 + 184LL))(v79, __s);
CCMenuItemSpriteExtra::setSizeMult(*(_QWORD *)(v69 + 872), 2.0);
v80 = cocos2d::CCSprite::createWithSpriteFrameName("edit_rightBtn_001.png");
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v80 + 160LL))(v80, 1.4);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v80 + 360LL))(v80, 90.0);
v81 = CCMenuItemSpriteExtra::create(v80, 0, v69, &CustomizeObjectLayer::onUpdateCustomColor, 0);
*(_QWORD *)(v69 + 880) = v81;
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(v69 + 552) + 456LL))(*(_QWORD *)(v69 + 552), v81);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(v69 + 880) + 72LL))(*(_QWORD *)(v69 + 880), 2);
v82 = *(_QWORD *)(v69 + 880);
sub_100278250(v184, 0.0, -40.0);
sub_100278350(__s, v172, v184);
(*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v82 + 184LL))(v82, __s);
v83 = *(_QWORD *)(v69 + 880);
CCMenuItemSpriteExtra::setSizeMult(v83, 2.0);
*(_QWORD *)&v85 = GameManager::sharedState(v83, __s, v84).u64[0];
*(_DWORD *)(v69 + 748) = *(_DWORD *)(v86 + 972);
CustomizeObjectLayer::updateCustomColorLabels(v69, v85);
v87 = ColorChannelSprite::create();
*(_QWORD *)(v69 + 896) = v87;
v88 = CCMenuItemSpriteExtra::create(v87, 0, v69, CustomizeObjectLayer::onEditColor, 0);
*(_QWORD *)(v69 + 904) = v88;
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(v69 + 552) + 456LL))(*(_QWORD *)(v69 + 552), v88);
v89 = *(_QWORD *)(v69 + 904);
v90 = *(_QWORD *)(v69 + 552);
sub_100278250(v184, (float)((float)(v185 * 0.5) + 180.0) + -25.0, (float)((float)(v186 * 0.5) + -120.0) + 12.0);
cocos2d::CCNode::convertToNodeSpace(__s, v90, v184);
(*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v89 + 184LL))(v89, __s);
sub_1007FEBF0(*(_QWORD *)(v69 + 712), *(_QWORD *)(v69 + 904));
v91 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_colorBtn_001.png");
(*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v91 + 960LL))(v91, &unk_100A0594C);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v91 + 912LL))(v91, 100);
v92 = cocos2d::CCLabelBMFont::create_3("+", "bigFont.fnt");
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v91 + 456LL))(v91, v92);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v92 + 160LL))(v92, 1.4);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v92 + 1024LL))(v92, 100);
cocos2d::CCNode::convertToNodeSpace(v184, v91, &unk_100BE13D8);
sub_100278250(v177, 2.0, 2.5);
sub_100278350(__s, v184, v177);
(*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v92 + 184LL))(v92, __s);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v91 + 160LL))(v91, 0.30000001);
v93 = CCMenuItemSpriteExtra::create(v91, 0, v69, CustomizeObjectLayer::onLiveEdit, 0);
*(_QWORD *)(v69 + 912) = v93;
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(v69 + 552) + 456LL))(*(_QWORD *)(v69 + 552), v93);
v94 = *(_QWORD *)(v69 + 912);
v95 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(v69 + 904) + 192LL))(*(_QWORD *)(v69 + 904));
sub_100278250(v184, 18.0, 22.0);
sub_100278350(__s, v95, v184);
(*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v94 + 184LL))(v94, __s);
v96 = *(_QWORD *)(v69 + 912);
CCMenuItemSpriteExtra::setSizeMult(v96, 2.0);
v97 = *(_QWORD *)(v69 + 688);
if ( !v97 )
{
*(_BYTE *)(v69 + 921) = 0;
goto LABEL_49;
}
v98 = *(_DWORD *)(v97 + 1028);
if ( v98 == 914 )
{
*(_BYTE *)(v69 + 921) = 1;
}
else
{
*(_BYTE *)(v69 + 921) = v98 == 1615;
if ( v98 != 1615 )
goto LABEL_49;
}
v102 = sub_1007FE900(v96);
*(_QWORD *)(v69 + 720) = v102;
cocos2d::CCObject::retain(v102);
v103 = ButtonSprite::create_1(
(__int64)"Text",
0x46u,
0,
1u,
(__int64)"bigFont.fnt",
(__int64)"GJ_button_04.png",
0.60000002,
30.0);
v104 = CCMenuItemSpriteExtra::create(v103, 0, v69, CustomizeObjectLayer::onSelectMode, 0);
*(_QWORD *)(v69 + 776) = v104;
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(v69 + 552) + 456LL))(*(_QWORD *)(v69 + 552), v104);
v105 = *(_QWORD *)(v69 + 776);
v106 = *(_QWORD *)(v69 + 552);
sub_100278250(
v184,
(float)((float)((float)(v185 * 0.5) + 180.0) + -35.0) + -8.0,
(float)((float)((float)(v186 * 0.5) + 120.0) + 19.0) + -15.0);
cocos2d::CCNode::convertToNodeSpace(__s, v106, v184);
(*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v105 + 184LL))(v105, __s);
v107 = *(_QWORD *)(v69 + 776);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v107 + 72LL))(v107, 3);
GameManager::sharedState(v107, 3, v108);
v110 = v109;
*(_QWORD *)&v112 = GameManager::sharedState(v107, 3, v111).u64[0];
FontFile = GameManager::getFontFile(v110, *(unsigned int *)(v113 + 992), v112);
v115 = cocos2d::CCLabelBMFont::create_3(" ", FontFile);
*(_QWORD *)(v69 + 840) = v115;
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(v69 + 584) + 456LL))(*(_QWORD *)(v69 + 584), v115);
(*(void (__fastcall **)(_QWORD, float))(**(_QWORD **)(v69 + 840) + 160LL))(*(_QWORD *)(v69 + 840), 0.60000002);
v116 = *(_QWORD *)(v69 + 840);
sub_100278250(__s, v185 * 0.5, (float)(v186 * 0.5) + -15.0);
(*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v116 + 184LL))(v116, __s);
sub_1007FEBF0(*(_QWORD *)(v69 + 720), *(_QWORD *)(v69 + 840));
v117 = Slider::create_1(v69, CustomizeObjectLayer::sliderChanged, 0, 0.80000001);
*(_QWORD *)(v69 + 848) = v117;
Slider::setBarVisibility(v117, 0, 0.80000001);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(v69 + 584) + 456LL))(
*(_QWORD *)(v69 + 584),
*(_QWORD *)(v69 + 848));
v118 = *(_QWORD *)(v69 + 848);
v119 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(v69 + 840) + 192LL))(*(_QWORD *)(v69 + 840));
sub_100278250(v184, 0.0, -28.0);
sub_100278350(__s, v119, v184);
(*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v118 + 184LL))(v118, __s);
sub_1007FEBF0(*(_QWORD *)(v69 + 720), *(_QWORD *)(v69 + 848));
*(_DWORD *)(v69 + 832) = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(v69 + 688) + 1760LL))(*(_QWORD *)(v69 + 688));
CustomizeObjectLayer::updateKerningLabel(v69);
Slider::setValue(
*(_QWORD *)(v69 + 848),
COERCE_DOUBLE((unsigned __int64)COERCE_UNSIGNED_INT(fmaxf(fminf((float)((float)*(int *)(v69 + 832) + 10.0) / 30.0, 1.0), 0.0))));
if ( *(_DWORD *)(*(_QWORD *)(v69 + 688) + 1028LL) != 914 )
{
LABEL_49:
v146 = ButtonSprite::create_1(
(__int64)"Next Free",
0x32u,
0,
1u,
(__int64)"goldFont.fnt",
(__int64)"GJ_button_04.png",
0.69999999,
25.0);
v147 = CCMenuItemSpriteExtra::create(v146, 0, v69, &CustomizeObjectLayer::onNextColorChannel, 0);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(v69 + 552) + 456LL))(*(_QWORD *)(v69 + 552), v147);
v148 = *(_QWORD *)(v69 + 552);
sub_100278250(v184, (float)((float)(v185 * 0.5) + -180.0) + 42.0, (float)((float)(v186 * 0.5) + -120.0) + 8.0);
cocos2d::CCNode::convertToNodeSpace(__s, v148, v184);
(*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v147 + 184LL))(v147, __s);
sub_1007FEBF0(*(_QWORD *)(v69 + 712), v147);
v149 = *(_QWORD *)(v69 + 552);
sub_100278250(v184, (float)(v185 * 0.5) + 210.0, (float)(v186 * 0.5) + 142.0);
cocos2d::CCNode::convertToNodeSpace(__s, v149, v184);
v150 = ButtonSprite::create_1(
(__int64)"Copy",
0x23u,
0,
1u,
(__int64)"goldFont.fnt",
(__int64)"GJ_button_04.png",
0.5,
25.0);
v151 = ButtonSprite::create_1(
(__int64)"Paste",
0x23u,
0,
1u,
(__int64)"goldFont.fnt",
(__int64)"GJ_button_04.png",
0.5,
25.0);
v152 = CCMenuItemSpriteExtra::create(v150, 0, v69, CustomizeObjectLayer::onCopy, 0);
v154 = CCMenuItemSpriteExtra::create(v151, 0, v69, &CustomizeObjectLayer::onPaste, 0);
if ( v165 )
{
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(v69 + 552) + 456LL))(*(_QWORD *)(v69 + 552), v152);
(*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v152 + 184LL))(v152, __s);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(v69 + 552) + 456LL))(*(_QWORD *)(v69 + 552), v154);
sub_1002782D0(v184, __s);
sub_100278250(v161, 0.0, -31.0);
sub_100278350(v177, v184, v161);
v155 = sub_100278300(v184, v177);
}
else
{
*(_QWORD *)&v155 = GameManager::sharedState(v151, 0, v153).u64[0];
if ( !LevelEditorLayer::canPasteState(*(_QWORD *)(v156 + 552)) )
{
LABEL_54:
v157 = ButtonSprite::create_1(
(__int64)"Browse",
0x23u,
0,
1u,
(__int64)"goldFont.fnt",
(__int64)"GJ_button_04.png",
0.5,
25.0);
v158 = CCMenuItemSpriteExtra::create(v157, 0, v69, CustomizeObjectLayer::onBrowse, 0);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(v69 + 552) + 456LL))(*(_QWORD *)(v69 + 552), v158);
v159 = *(_QWORD *)(v69 + 552);
sub_100278250(v177, (float)(v185 * 0.5) + 210.0, (float)(0.5 * v186) + -140.0);
cocos2d::CCNode::convertToNodeSpace(v184, v159, v177);
(*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v158 + 184LL))(v158, v184);
CustomizeObjectLayer::onSelectMode(
v69,
*(_QWORD *)(v69 + 8LL * (*(unsigned __int8 *)(v69 + 752) ^ 1u) + 760));
*(_BYTE *)(v69 + 922) = 0;
return v183;
}
(*(void (__fastcall **)(_QWORD, __int64, double))(**(_QWORD **)(v69 + 552) + 456LL))(
*(_QWORD *)(v69 + 552),
v154,
v155);
sub_1002782D0(v184, __s);
}
(*(void (__fastcall **)(__int64, char *, double))(*(_QWORD *)v154 + 184LL))(v154, v184, v155);
goto LABEL_54;
}
sub_100278250(v184, v185 * 0.5, (float)(v186 * 0.5) + 50.0);
sub_1002787F0(__s, v178);
v120 = cocos2d::extension::CCScale9Sprite::create_2("square02_small.png", __s);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v120 + 912LL))(v120, 100);
sub_100278260(__s, COERCE_DOUBLE(1131413504), COERCE_DOUBLE(1106247680));
sub_100278660(v163, __s);
(*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v120 + 320LL))(v120, v163);
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**(_QWORD **)(v69 + 584) + 464LL))(
*(_QWORD *)(v69 + 584),
v120,
0xFFFFFFFFLL);
(*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v120 + 184LL))(v120, v184);
sub_1007FEBF0(*(_QWORD *)(v69 + 720), v120);
v121 = v120;
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v120 + 344LL))(v120, 0);
GameManager::sharedState(v120, 0, v122);
v124 = v123;
*(_QWORD *)&v126 = GameManager::sharedState(v121, 0, v125).u64[0];
v128 = GameManager::getFontFile(v124, *(unsigned int *)(v127 + 992), v126);
v129 = CCTextInputNode::create((__int64)"Text", (__int64)"Thonburi", 0x18u, v128, 240.0, 40.0);
*(_QWORD *)(v69 + 824) = v129;
(*(void (__fastcall **)(_QWORD, void *, __int64))(**(_QWORD **)(v69 + 584) + 464LL))(
*(_QWORD *)(v69 + 584),
v129,
20);
(*(void (__fastcall **)(_QWORD, char *))(**(_QWORD **)(v69 + 824) + 184LL))(*(_QWORD *)(v69 + 824), v184);
CCTextInputNode::setMaxLabelScale(*(_QWORD *)(v69 + 824), 0.60000002);
CCTextInputNode::setMaxLabelWidth(*(_QWORD *)(v69 + 824), 240.0);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(*(_QWORD *)(v69 + 824) + 576LL) + 344LL))(
*(_QWORD *)(*(_QWORD *)(v69 + 824) + 576LL),
0);
v130 = *(_QWORD *)(v69 + 824);
*(_DWORD *)(v130 + 592) = 20;
v171.__r_.__value_.__r.__words[2] = (std::string::size_type)operator new(0x68u);
v171.__r_.__value_.__r.__words[0] = 105;
v171.__r_.__value_.__l.__size_ = 97;
strcpy(
v171.__r_.__value_.__l.__data_,
" abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.,-!?:;)(/\\\"'`*=+-_%[]<>|@&^#{}%$~");
CCTextInputNode::setAllowedChars(v130, &v171);
if ( (*(_BYTE *)&v171.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v171.__r_.__value_.__l.__data_);
CCTextInputNode::setLabelPlaceholderColor(*(_QWORD *)(v69 + 824), 15772280);
CCTextInputNode::setLabelPlaceholderScale(*(_QWORD *)(v69 + 824), 0.5);
v131 = *(_QWORD **)(v69 + 824);
v131[73] = v180;
(*(void (__fastcall **)(_QWORD *, __int64))(*v131 + 72LL))(v131, 1);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(v69 + 824) + 344LL))(*(_QWORD *)(v69 + 824), 0);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(v69 + 824) + 1000LL))(*(_QWORD *)(v69 + 824), 0);
v132 = *(_QWORD **)(v69 + 824);
*((_BYTE *)v132 + 608) = 1;
*((_DWORD *)v132 + 177) = *(_DWORD *)(v69 + 832);
v133 = *(_QWORD *)(v69 + 688);
if ( (*(_BYTE *)(v133 + 1352) & 1) != 0 )
{
sub_10001AD30(__s, *(const void **)(v133 + 1368), *(_QWORD *)(v133 + 1360));
if ( (__s[0] & 1) == 0 )
goto LABEL_33;
}
else
{
v134 = v133 + 1352;
v182 = *(void **)(v134 + 16);
*(_OWORD *)__s = *(_OWORD *)v134;
if ( (__s[0] & 1) == 0 )
{
LABEL_33:
v135 = &__s[1];
goto LABEL_36;
}
}
v135 = (const char *)v182;
LABEL_36:
v136 = strlen(v135);
if ( v136 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v137 = v136;
if ( v136 >= 0x17 )
{
v180 = v132;
v139 = 26;
if ( (v136 | 7) != 0x17 )
v139 = (v136 | 7) + 1;
v138 = (char *)operator new(v139);
v175 = v138;
__dst[0] = v139 | 1;
__dst[1] = v137;
v132 = v180;
}
else
{
LOBYTE(__dst[0]) = 2 * v136;
v138 = (char *)__dst + 1;
if ( !v136 )
goto LABEL_44;
}
memmove(v138, v135, v137);
LABEL_44:
v138[v137] = 0;
CCTextInputNode::setString(v132, (__int64)__dst);
if ( (__dst[0] & 1) != 0 )
operator delete(v175);
if ( (__s[0] & 1) != 0 )
operator delete(v182);
v140 = ButtonSprite::create_1(
(__int64)"Split",
0x28u,
0,
1u,
(__int64)"bigFont.fnt",
(__int64)"GJ_button_04.png",
0.60000002,
30.0);
v141 = CCMenuItemSpriteExtra::create(v140, 0, v69, CustomizeObjectLayer::onBreakApart, 0);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(v69 + 552) + 456LL))(*(_QWORD *)(v69 + 552), v141);
sub_1007FEBF0(*(_QWORD *)(v69 + 720), v141);
v142 = *(_QWORD *)(v69 + 552);
sub_100278250(v177, (float)((float)(v185 * 0.5) + 180.0) + -36.0, (float)((float)(v186 * 0.5) + -120.0) + 10.0);
cocos2d::CCNode::convertToNodeSpace(__s, v142, v177);
(*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v141 + 184LL))(v141, __s);
v143 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_resetBtn_001.png");
v144 = CCMenuItemSpriteExtra::create(v143, 0, v69, CustomizeObjectLayer::onClear, 0);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(v69 + 552) + 456LL))(*(_QWORD *)(v69 + 552), v144);
sub_1007FEBF0(*(_QWORD *)(v69 + 720), v144);
v145 = *(_QWORD *)(v69 + 552);
sub_100278250(v177, (float)((float)(v185 * 0.5) + 120.0) + 24.0, (float)(0.5 * v186) + 35.0);
cocos2d::CCNode::convertToNodeSpace(__s, v145, v177);
(*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v144 + 184LL))(v144, __s);
goto LABEL_49;
}
v33 = (_QWORD *)(v179 + 760);
v34 = *v180;
v35 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(v179 + 760) + 192LL))(*(_QWORD *)(v179 + 760));
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v34 + 184LL))(v34, v35);
}
else
{
v33 = v180;
}
(*(void (__fastcall **)(_QWORD, _QWORD))(*(_QWORD *)*v33 + 1056LL))(*v33, 0);
(*(void (__fastcall **)(_QWORD, _QWORD))(*(_QWORD *)*v33 + 344LL))(*v33, 0);
goto LABEL_13;
}
return result;
}