//
// SetGroupIDLayer::init from 0x1002fcf00 to 0x1002feef9 (8185 bytes)
//
// 1 xrefs:
// > SetGroupIDLayer::create @ 0x1002fcebe
//
// 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:28:32 +0000
//
__int64 __fastcall SetGroupIDLayer::init(__int64 a1, __int64 a2, __int64 a3)
{
_QWORD *v4; // r14
__int64 v5; // rax
_QWORD *v6; // rax
_QWORD *v7; // rax
__int64 v8; // rax
__int64 v9; // rax
__int64 v10; // rax
__int64 v11; // rdi
__int64 v12; // rdx
__int64 v13; // rax
__int64 v14; // rbx
__int64 v15; // r15
void *v16; // r12
__int64 v17; // rbx
__int64 v18; // rbx
__int64 v19; // r13
unsigned __int64 *v20; // r15
__int64 v21; // rax
__int64 v22; // r15
__int64 v23; // rax
__int64 v24; // rax
char *v25; // rax
void *v26; // rax
__int64 v27; // rbx
double v28; // xmm0_8
char *v29; // r15
void *v30; // r15
__int64 v31; // r12
unsigned int *v32; // rax
double v33; // xmm0_8
char *v34; // rbx
void *v35; // rbx
__int64 v36; // r15
unsigned int *v37; // rax
double v38; // xmm0_8
char *v39; // rbx
void *v40; // rbx
__int64 v41; // r15
unsigned int *v42; // rax
_DWORD *v43; // rbx
__int64 v44; // r15
unsigned __int64 *v45; // rbx
unsigned __int64 *v46; // rbx
unsigned __int64 *v47; // rbx
__int64 v48; // rax
int v49; // xmm0_4
char *v50; // rax
void *v51; // rbx
__int64 v52; // r15
__int64 v53; // rax
char *v54; // rax
void *v55; // r15
unsigned __int64 *v56; // rbx
unsigned __int64 *v57; // rbx
__int64 v58; // rbx
unsigned __int64 *v59; // r15
unsigned __int64 v60; // r15
__int64 v61; // rax
__int64 v62; // rdi
int *v63; // r12
int v64; // r13d
__int64 v65; // rbx
char *v66; // r14
void *v67; // r15
unsigned int v68; // r12d
__int64 v69; // rax
char *v70; // rdi
__int64 v71; // r14
int v72; // eax
const std::string::value_type *v73; // rdi
__int64 v74; // rbx
unsigned __int64 *v75; // r12
__int64 v76; // rdi
char *v77; // r15
char *v78; // rbx
char *v79; // rdi
__int64 v80; // r12
void *v81; // r15
__int64 v82; // r12
unsigned __int64 *v83; // r13
char *v84; // r15
__int64 v85; // rbx
void *v86; // rbx
__int64 v87; // r15
unsigned __int64 *v88; // r12
__int64 v89; // rdi
int ParentMode; // ebx
__int64 v91; // rax
const char *CString; // rbx
__int64 v93; // rdi
unsigned int v94; // r15d
__int64 v95; // rax
int v96; // eax
size_t v97; // rax
size_t v98; // r15
char *v99; // r12
char *v100; // rdi
size_t v101; // r14
__int64 v102; // rbx
unsigned __int64 *v103; // r15
double updated; // xmm0_8
char *v105; // rbx
void *v106; // rbx
unsigned int v107; // ebx
__int64 v108; // r15
int v109; // r12d
const char *v110; // rsi
__int64 v111; // r14
__int64 v112; // rbx
char *v113; // r15
char *v114; // r13
char *v115; // rbx
unsigned __int64 v116; // xmm0_8
char *v117; // r12
void *v118; // r15
void *v119; // r13
void *v120; // rbx
char *v121; // rdi
__int64 v122; // rdx
void *v123; // r12
__int64 v124; // rax
unsigned __int64 *v125; // rsi
char *v126; // rdi
__int64 v127; // rdx
__int64 v128; // rax
__int64 v129; // rax
unsigned __int8 v130; // r14
__int64 v131; // rbx
char *v132; // rdi
__int64 v133; // rdx
__int64 v134; // rax
__int64 v135; // r14
__int64 v136; // rbx
char *v137; // rdi
__int64 v138; // rdx
__int64 v139; // rax
__int64 v140; // r14
__int64 v141; // rbx
__int64 v142; // rdx
__int64 v143; // rax
__int64 v144; // rax
__int64 v145; // r14
__int64 v146; // rbx
char v148; // [rsp+0h] [rbp-210h]
__int64 v149; // [rsp+40h] [rbp-1D0h]
__int16 v150; // [rsp+48h] [rbp-1C8h] BYREF
char v151; // [rsp+4Ah] [rbp-1C6h]
void *v152; // [rsp+58h] [rbp-1B8h]
char v153; // [rsp+60h] [rbp-1B0h] BYREF
int v154; // [rsp+61h] [rbp-1AFh]
void *v155; // [rsp+70h] [rbp-1A0h]
char v156; // [rsp+78h] [rbp-198h] BYREF
char v157[15]; // [rsp+79h] [rbp-197h] BYREF
void *v158; // [rsp+88h] [rbp-188h]
_QWORD v159[2]; // [rsp+90h] [rbp-180h] BYREF
void *__p; // [rsp+A0h] [rbp-170h]
char v161; // [rsp+A8h] [rbp-168h] BYREF
char v162[15]; // [rsp+A9h] [rbp-167h] BYREF
void *v163; // [rsp+B8h] [rbp-158h]
char v164; // [rsp+C0h] [rbp-150h] BYREF
char v165[15]; // [rsp+C1h] [rbp-14Fh] BYREF
void *v166; // [rsp+D0h] [rbp-140h]
char v167; // [rsp+D8h] [rbp-138h] BYREF
char v168[15]; // [rsp+D9h] [rbp-137h] BYREF
void *v169; // [rsp+E8h] [rbp-128h]
char v170; // [rsp+F0h] [rbp-120h] BYREF
char v171[15]; // [rsp+F1h] [rbp-11Fh] BYREF
void *v172; // [rsp+100h] [rbp-110h]
char v173; // [rsp+108h] [rbp-108h] BYREF
char v174[15]; // [rsp+109h] [rbp-107h] BYREF
void *v175; // [rsp+118h] [rbp-F8h]
char v176; // [rsp+120h] [rbp-F0h] BYREF
_BYTE v177[23]; // [rsp+121h] [rbp-EFh] BYREF
char v178; // [rsp+138h] [rbp-D8h] BYREF
char v179[15]; // [rsp+139h] [rbp-D7h] BYREF
void *v180; // [rsp+148h] [rbp-C8h]
__int64 v181; // [rsp+150h] [rbp-C0h] BYREF
int *v182; // [rsp+158h] [rbp-B8h]
__int64 v183; // [rsp+160h] [rbp-B0h]
__int64 v184; // [rsp+168h] [rbp-A8h]
__int64 v185; // [rsp+170h] [rbp-A0h]
unsigned __int64 v186; // [rsp+178h] [rbp-98h] BYREF
unsigned __int64 v187; // [rsp+180h] [rbp-90h] BYREF
__int64 v188; // [rsp+188h] [rbp-88h]
unsigned __int64 v189; // [rsp+194h] [rbp-7Ch] BYREF
unsigned __int8 v190; // [rsp+19Fh] [rbp-71h]
_QWORD *v191; // [rsp+1A0h] [rbp-70h]
void *v192; // [rsp+1A8h] [rbp-68h]
unsigned __int64 __dst[2]; // [rsp+1B0h] [rbp-60h] BYREF
void *v194; // [rsp+1C0h] [rbp-50h]
float v195; // [rsp+1C8h] [rbp-48h] BYREF
float v196; // [rsp+1CCh] [rbp-44h]
unsigned __int64 v197; // [rsp+1D0h] [rbp-40h] BYREF
unsigned __int64 v198; // [rsp+1D8h] [rbp-38h] BYREF
unsigned __int64 v199[6]; // [rsp+1E0h] [rbp-30h] BYREF
v4 = (_QWORD *)a1;
LODWORD(__dst[0]) = 1258291200;
v190 = cocos2d::CCLayerColor::initWithColor(a1, __dst);
if ( !v190 )
return v190;
*(_BYTE *)(a1 + 797) = 1;
*(_BYTE *)(a1 + 596) = 1;
v188 = a2;
if ( a2 )
{
*(_QWORD *)(a1 + 672) = a2;
}
else
{
*(_QWORD *)(a1 + 680) = a3;
a1 = a3;
cocos2d::CCObject::retain(a3);
}
v5 = sub_1007FE900(a1);
v4[86] = v5;
cocos2d::CCObject::retain(v5);
v6 = cocos2d::CCDictionary::create();
v4[102] = v6;
cocos2d::CCObject::retain(v6);
v7 = cocos2d::CCDictionary::create();
v4[103] = v7;
cocos2d::CCObject::retain(v7);
FLAlertLayer::incrementForcePrio(v4);
(*(void (__fastcall **)(_QWORD *, __int64))(*v4 + 1000LL))(v4, 1);
(*(void (__fastcall **)(_QWORD *, __int64))(*v4 + 1072LL))(v4, 1);
v8 = cocos2d::CCDirector::sharedDirector(v4, 1);
cocos2d::CCDirector::getWinSize(&v195, v8);
v9 = cocos2d::CCLayer::create();
v4[73] = v9;
(*(void (__fastcall **)(_QWORD *, __int64))(*v4 + 456LL))(v4, v9);
(*(void (__fastcall **)(_QWORD *, __int64))(*v4 + 1168LL))(v4, 200);
v10 = sub_1007FE900(v4);
v4[87] = v10;
v11 = v10;
cocos2d::CCObject::retain(v10);
GameManager::sharedState(v11, 200, v12);
*((_DWORD *)v4 + 191) = *(_DWORD *)(v13 + 976);
sub_100278270((__int64)__dst, 0.0, 0.0, (__m128)0x42A00000u, (__m128)0x42A00000u);
v14 = cocos2d::extension::CCScale9Sprite::create_2("GJ_square01.png", __dst);
sub_100278260((float *)__dst, 390.0, 310.0);
(*(void (__fastcall **)(__int64, unsigned __int64 *))(*(_QWORD *)v14 + 320LL))(v14, __dst);
(*(void (__fastcall **)(_QWORD, __int64, __int64))(*(_QWORD *)v4[73] + 464LL))(v4[73], v14, 4294967294LL);
sub_100278250((float *)__dst, v195 * 0.5, v196 * 0.5);
(*(void (__fastcall **)(__int64, unsigned __int64 *))(*(_QWORD *)v14 + 184LL))(v14, __dst);
sub_100278270((__int64)__dst, 0.0, 0.0, (__m128)0x42A00000u, (__m128)0x42A00000u);
v15 = cocos2d::extension::CCScale9Sprite::create_2("square02_001.png", __dst);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v15 + 912LL))(v15, 50);
sub_100278260((float *)__dst, 360.0, 68.0);
(*(void (__fastcall **)(__int64, unsigned __int64 *))(*(_QWORD *)v15 + 320LL))(v15, __dst);
(*(void (__fastcall **)(_QWORD, __int64, __int64))(*(_QWORD *)v4[73] + 464LL))(v4[73], v15, 0xFFFFFFFFLL);
sub_100278250((float *)__dst, v195 * 0.5, (float)(v196 * 0.5) + -17.0);
v149 = v15;
(*(void (__fastcall **)(__int64, unsigned __int64 *))(*(_QWORD *)v15 + 184LL))(v15, __dst);
v16 = (void *)cocos2d::CCLabelBMFont::create_3("Editor L", "goldFont.fnt");
sub_100278250((float *)__dst, (float)(v195 * 0.5) + -125.0, (float)((float)(v196 * 0.5) + 155.0) + -16.0);
(*(void (__fastcall **)(void *, unsigned __int64 *))(*(_QWORD *)v16 + 184LL))(v16, __dst);
(*(void (__fastcall **)(_QWORD, void *))(*(_QWORD *)v4[73] + 456LL))(v4[73], v16);
(*(void (__fastcall **)(void *, float))(*(_QWORD *)v16 + 160LL))(v16, 0.64999998);
v17 = cocos2d::CCLabelBMFont::create_3("Editor L2", "goldFont.fnt");
sub_100278250((float *)__dst, v195 * 0.5, (float)((float)(v196 * 0.5) + 155.0) + -16.0);
(*(void (__fastcall **)(__int64, unsigned __int64 *))(*(_QWORD *)v17 + 184LL))(v17, __dst);
(*(void (__fastcall **)(_QWORD, __int64))(*(_QWORD *)v4[73] + 456LL))(v4[73], v17);
v182 = (int *)v17;
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v17 + 160LL))(v17, 0.64999998);
v18 = cocos2d::CCLabelBMFont::create_3("Add Group ID", "goldFont.fnt");
sub_100278250((float *)__dst, v195 * 0.5, (float)(v196 * 0.5) + 80.0);
(*(void (__fastcall **)(__int64, unsigned __int64 *))(*(_QWORD *)v18 + 184LL))(v18, __dst);
(*(void (__fastcall **)(_QWORD, __int64))(*(_QWORD *)v4[73] + 456LL))(v4[73], v18);
v183 = v18;
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v18 + 160LL))(v18, 0.64999998);
v19 = cocos2d::CCLabelBMFont::create_3("Z Order", "goldFont.fnt");
v192 = v16;
v20 = (unsigned __int64 *)(*(__int64 (__fastcall **)(void *))(*(_QWORD *)v16 + 192LL))(v16);
sub_100278250((float *)&v186, 250.0, 0.0);
sub_100278350((double *)__dst, v20, &v186);
(*(void (__fastcall **)(__int64, unsigned __int64 *))(*(_QWORD *)v19 + 184LL))(v19, __dst);
(*(void (__fastcall **)(_QWORD, __int64))(*(_QWORD *)v4[73] + 456LL))(v4[73], v19);
v21 = *(_QWORD *)v19;
v184 = v19;
(*(void (__fastcall **)(__int64, float))(v21 + 160))(v19, 0.64999998);
v22 = cocos2d::CCLabelBMFont::create_3("Z Layer", "goldFont.fnt");
sub_100278250((float *)__dst, v195 * 0.5, (float)(v196 * 0.5) + -64.0);
(*(void (__fastcall **)(__int64, unsigned __int64 *))(*(_QWORD *)v22 + 184LL))(v22, __dst);
(*(void (__fastcall **)(_QWORD, __int64))(*(_QWORD *)v4[73] + 456LL))(v4[73], v22);
v23 = *(_QWORD *)v22;
v185 = v22;
(*(void (__fastcall **)(__int64, float))(v23 + 160))(v22, 0.64999998);
v24 = cocos2d::CCMenu::create();
v4[69] = v24;
(*(void (__fastcall **)(_QWORD, __int64, __int64))(*(_QWORD *)v4[73] + 464LL))(v4[73], v24, 10);
*((_DWORD *)v4 + 160) = -1;
v25 = ButtonSprite::create_1(
(__int64)"OK",
0x28u,
0,
1u,
(__int64)"goldFont.fnt",
(__int64)"GJ_button_01.png",
0.80000001,
30.0);
v26 = CCMenuItemSpriteExtra::create((__int64)v25, 0, (__int64)v4, (__int64)SetGroupIDLayer::onClose, 0);
(*(void (__fastcall **)(_QWORD, void *))(*(_QWORD *)v4[69] + 456LL))(v4[69], v26);
v27 = v4[69];
sub_100278250((float *)__dst, v195 * 0.5, (float)((float)(v196 * 0.5) + -155.0) + 23.0);
v28 = (*(double (__fastcall **)(__int64, unsigned __int64 *))(*(_QWORD *)v27 + 184LL))(v27, __dst);
v29 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"GJ_plus2Btn_001.png", v28);
(*(void (__fastcall **)(char *, float))(*(_QWORD *)v29 + 160LL))(v29, 0.80000001);
v30 = CCMenuItemSpriteExtra::create((__int64)v29, 0, (__int64)v4, (__int64)SetGroupIDLayer::onNextFreeEditorLayer1, 0);
(*(void (__fastcall **)(_QWORD, void *))(*(_QWORD *)v4[69] + 456LL))(v4[69], v30);
v31 = v4[69];
v32 = (unsigned int *)(*(__int64 (__fastcall **)(void *))(*(_QWORD *)v192 + 192LL))(v192);
cocos2d::CCNode::convertToNodeSpace((double *)&v186, v31, v32);
sub_100278250((float *)&v198, 50.0, 0.0);
sub_100278350((double *)__dst, &v186, &v198);
v33 = (*(double (__fastcall **)(void *, unsigned __int64 *))(*(_QWORD *)v30 + 184LL))(v30, __dst);
v34 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"GJ_plus2Btn_001.png", v33);
(*(void (__fastcall **)(char *, float))(*(_QWORD *)v34 + 160LL))(v34, 0.80000001);
v35 = CCMenuItemSpriteExtra::create((__int64)v34, 0, (__int64)v4, (__int64)SetGroupIDLayer::onNextFreeEditorLayer2, 0);
(*(void (__fastcall **)(_QWORD, void *))(*(_QWORD *)v4[69] + 456LL))(v4[69], v35);
v36 = v4[69];
v37 = (unsigned int *)(*(__int64 (__fastcall **)(int *))(*(_QWORD *)v182 + 192LL))(v182);
cocos2d::CCNode::convertToNodeSpace((double *)&v186, v36, v37);
sub_100278250((float *)&v198, 54.0, 0.0);
sub_100278350((double *)__dst, &v186, &v198);
v38 = (*(double (__fastcall **)(void *, unsigned __int64 *))(*(_QWORD *)v35 + 184LL))(v35, __dst);
v39 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"GJ_optionsBtn_001.png", v38);
(*(void (__fastcall **)(char *, float))(*(_QWORD *)v39 + 160LL))(v39, 0.34999999);
v40 = CCMenuItemSpriteExtra::create((__int64)v39, 0, (__int64)v4, (__int64)SetGroupIDLayer::onGroupIDOptions, 0);
(*(void (__fastcall **)(_QWORD, void *))(*(_QWORD *)v4[69] + 456LL))(v4[69], v40);
v41 = v4[69];
v42 = (unsigned int *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v183 + 192LL))(v183);
cocos2d::CCNode::convertToNodeSpace((double *)&v186, v41, v42);
sub_100278250((float *)&v198, 73.0, 0.0);
sub_100278350((double *)__dst, &v186, &v198);
(*(void (__fastcall **)(void *, unsigned __int64 *))(*(_QWORD *)v40 + 184LL))(v40, __dst);
v156 = 8;
strcpy(v157, "Help");
__p = operator new(0x268u);
v159[0] = 617;
v159[1] = 608;
strcpy(
(char *)__p,
"Add assigns up to 10 groups to the selected object(s).\n"
" P sets a single object as group parent.\n"
"Editor L1 and L2 places the object(s) on an editor layer.\n"
"Z layer sets the draw layer of the object(s). T layers are above, while B layers are below the player.\n"
"Z order sets the draw order of the object(s) within the Z layer.\n"
"CH sets the channel of the object(s).\n"
"ORD sets the order of the object(s).\n"
"Extra has more advanced options.\n"
"Preview makes touch toggled triggers preview in editor.\n"
"Playback starts playback from this object.");
v43 = (_DWORD *)InfoAlertButton::create(&v156, v159, 0.80000001);
if ( (v159[0] & 1) != 0 )
operator delete(__p);
if ( (v156 & 1) != 0 )
operator delete(v158);
v43[138] = 1063675494;
(*(void (__fastcall **)(_QWORD, _DWORD *))(*(_QWORD *)v4[69] + 456LL))(v4[69], v43);
v44 = v4[69];
sub_100278250(
(float *)&v186,
(float)((float)(v195 * 0.5) + 195.0) + -17.0,
(float)((float)(v196 * 0.5) + 155.0) + -17.0);
cocos2d::CCNode::convertToNodeSpace((double *)__dst, v44, (unsigned int *)&v186);
(*(void (__fastcall **)(_DWORD *, unsigned __int64 *))(*(_QWORD *)v43 + 184LL))(v43, __dst);
v45 = (unsigned __int64 *)(*(__int64 (__fastcall **)(void *))(*(_QWORD *)v192 + 192LL))(v192);
sub_100278250((float *)&v186, 0.0, -30.0);
sub_100278350((double *)__dst, v45, &v186);
v161 = 4;
strcpy(v162, "L1");
v4[88] = SetGroupIDLayer::createTextInput(v4, __dst, 5, 6, &v161, 2, 50.0);
if ( (v161 & 1) != 0 )
operator delete(v163);
v46 = (unsigned __int64 *)(*(__int64 (__fastcall **)(int *))(*(_QWORD *)v182 + 192LL))(v182);
sub_100278250((float *)&v186, 0.0, -30.0);
sub_100278350((double *)__dst, v46, &v186);
v164 = 4;
strcpy(v165, "L2");
v4[89] = SetGroupIDLayer::createTextInput(v4, __dst, 6, 6, &v164, 3, 50.0);
if ( (v164 & 1) != 0 )
operator delete(v166);
v47 = (unsigned __int64 *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v183 + 192LL))(v183);
sub_100278250((float *)__dst, -80.0, -31.0);
sub_100278350((double *)&v186, v47, __dst);
LOWORD(__dst[0]) = 0;
sub_1002782D0(&v198, &v186);
v48 = IDNameInput::create((_DWORD)v4, (int)v4 + 544, 1, 1, (unsigned int)__dst, (unsigned int)&v198, 6, 0, 0, 0);
v4[107] = v48;
if ( (__dst[0] & 1) != 0 )
{
operator delete(v194);
v48 = v4[107];
}
v4[91] = *(_QWORD *)(v48 + 384);
v49 = 0;
if ( v188 )
v49 = -1046478848;
LODWORD(v192) = v49;
v50 = ButtonSprite::create_1(
(__int64)"Add",
0x32u,
0,
1u,
(__int64)"goldFont.fnt",
(__int64)"GJ_button_04.png",
0.69999999,
25.0);
v51 = CCMenuItemSpriteExtra::create((__int64)v50, 0, (__int64)v4, (__int64)SetGroupIDLayer::onAddGroup, 0);
(*(void (__fastcall **)(_QWORD, void *))(*(_QWORD *)v4[69] + 456LL))(v4[69], v51);
v52 = v4[69];
*(float *)&v192 = (float)((float)(v195 * 0.5) + 85.0) + *(float *)&v192;
v53 = (*(__int64 (__fastcall **)(_QWORD))(*(_QWORD *)v4[91] + 192LL))(v4[91]);
sub_100278250((float *)&v198, *(float *)&v192, *(float *)(v53 + 4));
cocos2d::CCNode::convertToNodeSpace((double *)__dst, v52, (unsigned int *)&v198);
(*(void (__fastcall **)(void *, unsigned __int64 *))(*(_QWORD *)v51 + 184LL))(v51, __dst);
if ( v188 )
{
v54 = ButtonSprite::create_1(
(__int64)"P",
0x32u,
0,
0,
(__int64)"goldFont.fnt",
(__int64)"GJ_button_04.png",
0.69999999,
25.0);
v55 = CCMenuItemSpriteExtra::create((__int64)v54, 0, (__int64)v4, (__int64)SetGroupIDLayer::onAddGroupParent, 0);
(*(void (__fastcall **)(_QWORD, void *))(*(_QWORD *)v4[69] + 456LL))(v4[69], v55);
v56 = (unsigned __int64 *)(*(__int64 (__fastcall **)(void *))(*(_QWORD *)v51 + 192LL))(v51);
sub_100278250((float *)&v198, 60.0, 0.0);
sub_100278350((double *)__dst, v56, &v198);
(*(void (__fastcall **)(void *, unsigned __int64 *))(*(_QWORD *)v55 + 184LL))(v55, __dst);
}
v57 = (unsigned __int64 *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v184 + 192LL))(v184);
sub_100278250((float *)&v198, 0.0, -30.0);
sub_100278350((double *)__dst, v57, &v198);
v150 = 23042;
v151 = 0;
v4[90] = SetGroupIDLayer::createTextInput(v4, __dst, 7, 6, &v150, 2, 50.0);
if ( (v150 & 1) != 0 )
operator delete(v152);
sub_100278260((float *)__dst, 360.0, 68.0);
v58 = ScrollableContentLayer::create(__dst);
v4[104] = v58;
v59 = (unsigned __int64 *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v149 + 192LL))(v149);
sub_100278250((float *)&v198, 180.0, 34.0);
sub_100278370((double *)__dst, v59, &v198);
(*(void (__fastcall **)(__int64, unsigned __int64 *))(*(_QWORD *)v58 + 184LL))(v58, __dst);
v60 = 0;
(*(void (__fastcall **)(_QWORD, _QWORD, _QWORD))(*(_QWORD *)v4[73] + 464LL))(v4[73], v4[104], 0);
v61 = cocos2d::CCMenu::create();
v4[105] = v61;
(*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v61 + 296LL))(v61, &unk_100BE28B0);
(*(void (__fastcall **)(_QWORD, void *))(*(_QWORD *)v4[105] + 320LL))(v4[105], &unk_100BE28B8);
(*(void (__fastcall **)(_QWORD, void *))(*(_QWORD *)v4[105] + 184LL))(v4[105], &unk_100BE28B0);
v62 = *(_QWORD *)(v4[104] + 416LL);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v62 + 456LL))(v62, v4[105]);
v63 = (int *)&unk_100A07E34;
v64 = -5;
v184 = sub_1007FE900(v62);
v191 = v4;
v65 = (__int64)v4;
do
{
v72 = 0;
v73 = "Default";
v192 = (void *)v60;
if ( (unsigned int)v60 <= 8 )
{
v73 = (char *)&unk_100A07E34 + *v63;
v72 = v64;
}
LODWORD(v183) = v72;
v182 = v63;
v66 = ButtonSprite::create_1(
(__int64)v73,
0xDCu,
0,
0,
(__int64)"bigFont.fnt",
(__int64)"GJ_button_04.png",
0.30000001,
25.0);
sub_1007FEBF0(*(_QWORD *)(v65 + 688), v66);
v67 = CCMenuItemSpriteExtra::create((__int64)v66, 0, v65, (__int64)SetGroupIDLayer::onZLayer, 0);
v68 = v183;
(*(void (__fastcall **)(void *, _QWORD))(*(_QWORD *)v67 + 72LL))(v67, (unsigned int)v183);
v69 = *(_QWORD *)v66;
v70 = v66;
v71 = v65;
(*(void (__fastcall **)(char *, _QWORD))(v69 + 72))(v70, v68);
(*(void (__fastcall **)(_QWORD, void *))(**(_QWORD **)(v65 + 552) + 456LL))(*(_QWORD *)(v65 + 552), v67);
sub_1007FEBF0(v184, v67);
v60 = (unsigned int)((_DWORD)v192 + 1);
v63 = v182 + 1;
v64 += 2;
}
while ( v64 != 15 );
v74 = *(_QWORD *)(v65 + 552);
v75 = (unsigned __int64 *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v185 + 192LL))(v185);
sub_100278250((float *)v199, 0.0, -28.0);
sub_100278350((double *)&v198, v75, v199);
cocos2d::CCNode::convertToNodeSpace((double *)__dst, v74, (unsigned int *)&v198);
GameToolbox::alignItemsHorisontally(v184, __dst, 0, 5.0);
SetGroupIDLayer::determineStartValues(v71);
LODWORD(v192) = 1109393408;
if ( *(_DWORD *)(v71 + 788) == -100 )
{
v76 = *(_QWORD *)(v71 + 680);
if ( v76 )
{
if ( (unsigned int)sub_1007FEF90(v76) )
{
LOWORD(__dst[0]) = 11522;
BYTE2(__dst[0]) = 0;
v77 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"GJ_colorBtn_001.png", COERCE_DOUBLE(1109393408));
(*(void (__fastcall **)(char *, void *))(*(_QWORD *)v77 + 960LL))(v77, &unk_100A07DE0);
(*(void (__fastcall **)(char *, __int64))(*(_QWORD *)v77 + 912LL))(v77, 100);
v78 = (char *)__dst + 1;
v79 = (char *)__dst + 1;
if ( (__dst[0] & 1) != 0 )
v79 = (char *)v194;
v80 = cocos2d::CCLabelBMFont::create_3(v79, "bigFont.fnt");
(*(void (__fastcall **)(char *, __int64))(*(_QWORD *)v77 + 456LL))(v77, v80);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v80 + 160LL))(v80, 1.4);
cocos2d::CCNode::convertToNodeSpace((double *)v199, (__int64)v77, (unsigned int *)&unk_100BE28B0);
sub_100278250((float *)&v197, 2.0, 2.5);
sub_100278350((double *)&v198, v199, &v197);
(*(void (__fastcall **)(__int64, unsigned __int64 *))(*(_QWORD *)v80 + 184LL))(v80, &v198);
(*(void (__fastcall **)(char *, float))(*(_QWORD *)v77 + 160LL))(v77, 0.30000001);
v81 = CCMenuItemSpriteExtra::create((__int64)v77, 0, v71, (__int64)SetGroupIDLayer::onZLayerShift, 0);
(*(void (__fastcall **)(_QWORD, void *))(**(_QWORD **)(v71 + 552) + 456LL))(*(_QWORD *)(v71 + 552), v81);
(*(void (__fastcall **)(void *, _QWORD))(*(_QWORD *)v81 + 72LL))(v81, 0);
v82 = *(_QWORD *)(v71 + 552);
v83 = (unsigned __int64 *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v185 + 192LL))(v185);
sub_100278250((float *)&v197, -40.0, -2.0);
sub_100278350((double *)v199, v83, &v197);
cocos2d::CCNode::convertToNodeSpace((double *)&v198, v82, (unsigned int *)v199);
(*(void (__fastcall **)(void *, unsigned __int64 *))(*(_QWORD *)v81 + 184LL))(v81, &v198);
CCMenuItemSpriteExtra::setSizeMult((__int64)v81, 2.0);
if ( (__dst[0] & 1) != 0 )
operator delete(v194);
LOWORD(__dst[0]) = 11010;
BYTE2(__dst[0]) = 0;
v84 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"GJ_colorBtn_001.png", COERCE_DOUBLE(0x40000000));
(*(void (__fastcall **)(char *, void *))(*(_QWORD *)v84 + 960LL))(v84, &unk_100A07DE3);
(*(void (__fastcall **)(char *, __int64))(*(_QWORD *)v84 + 912LL))(v84, 100);
if ( (__dst[0] & 1) != 0 )
v78 = (char *)v194;
v85 = cocos2d::CCLabelBMFont::create_3(v78, "bigFont.fnt");
(*(void (__fastcall **)(char *, __int64))(*(_QWORD *)v84 + 456LL))(v84, v85);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v85 + 160LL))(v85, 1.4);
cocos2d::CCNode::convertToNodeSpace((double *)v199, (__int64)v84, (unsigned int *)&unk_100BE28B0);
sub_100278250((float *)&v197, 2.0, 2.5);
sub_100278350((double *)&v198, v199, &v197);
(*(void (__fastcall **)(__int64, unsigned __int64 *))(*(_QWORD *)v85 + 184LL))(v85, &v198);
(*(void (__fastcall **)(char *, float))(*(_QWORD *)v84 + 160LL))(v84, 0.30000001);
v86 = CCMenuItemSpriteExtra::create((__int64)v84, 0, v71, (__int64)SetGroupIDLayer::onZLayerShift, 0);
(*(void (__fastcall **)(_QWORD, void *))(**(_QWORD **)(v71 + 552) + 456LL))(*(_QWORD *)(v71 + 552), v86);
(*(void (__fastcall **)(void *, __int64))(*(_QWORD *)v86 + 72LL))(v86, 1);
v87 = *(_QWORD *)(v71 + 552);
v88 = (unsigned __int64 *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v185 + 192LL))(v185);
sub_100278250((float *)&v197, 40.0, -2.0);
sub_100278350((double *)v199, v88, &v197);
cocos2d::CCNode::convertToNodeSpace((double *)&v198, v87, (unsigned int *)v199);
(*(void (__fastcall **)(void *, unsigned __int64 *))(*(_QWORD *)v86 + 184LL))(v86, &v198);
CCMenuItemSpriteExtra::setSizeMult((__int64)v86, 2.0);
if ( (__dst[0] & 1) != 0 )
operator delete(v194);
LODWORD(v192) = 1113325568;
}
}
}
v89 = *(_QWORD *)(v71 + 672);
if ( v89 )
{
ParentMode = GameObject::getParentMode(v89);
LABEL_39:
if ( ParentMode != -1 )
{
v91 = sub_10088E820("(%i)", v148);
CString = (const char *)cocos2d::CCString::getCString(v91);
goto LABEL_49;
}
}
else
{
v93 = *(_QWORD *)(v71 + 680);
if ( v93 && (unsigned int)sub_1007FEF90(v93) )
{
v94 = 0;
ParentMode = -1;
while ( 1 )
{
v95 = sub_1007FEFE0(*(_QWORD *)(v71 + 680), v94);
v96 = GameObject::getParentMode(v95);
if ( ParentMode == -1 )
{
ParentMode = v96;
}
else if ( ParentMode != v96 )
{
break;
}
if ( ++v94 >= (unsigned int)sub_1007FEF90(*(_QWORD *)(v71 + 680)) )
goto LABEL_39;
}
}
}
CString = "(-)";
LABEL_49:
v97 = strlen(CString);
if ( v97 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v98 = v97;
if ( v97 >= 0x17 )
{
v101 = 26;
if ( (v97 | 7) != 0x17 )
v101 = (v97 | 7) + 1;
v99 = (char *)operator new(v101);
v194 = v99;
__dst[0] = v101 + 1;
v71 = (__int64)v191;
__dst[1] = v98;
LABEL_57:
memmove(v99, CString, v98);
v99[v98] = 0;
if ( (__dst[0] & 1) != 0 )
goto LABEL_53;
goto LABEL_58;
}
LOBYTE(__dst[0]) = 2 * v97;
v99 = (char *)__dst + 1;
if ( v97 )
goto LABEL_57;
BYTE1(__dst[0]) = 0;
if ( (__dst[0] & 1) != 0 )
{
LABEL_53:
v100 = (char *)v194;
goto LABEL_59;
}
LABEL_58:
v100 = (char *)__dst + 1;
LABEL_59:
v102 = cocos2d::CCLabelBMFont::create_3(v100, "chatFont.fnt");
v103 = (unsigned __int64 *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v185 + 192LL))(v185);
sub_100278250((float *)v199, *(float *)&v192, -2.0);
sub_100278350((double *)&v198, v103, v199);
(*(void (__fastcall **)(__int64, unsigned __int64 *))(*(_QWORD *)v102 + 184LL))(v102, &v198);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(v71 + 584) + 456LL))(*(_QWORD *)(v71 + 584), v102);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v102 + 160LL))(v102, 0.60000002);
(*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v102 + 1072LL))(v102, &unk_100A07DE6);
if ( *(_BYTE *)(v71 + 752) == 1 )
{
sub_100278250((float *)&v198, (float)(v195 * 0.5) + -125.0, (float)((float)(v196 * 0.5) + -155.0) + 25.0);
sub_100278250((float *)v199, (float)(v195 * 0.5) + 125.0, *((float *)&v198 + 1));
sub_1002782D0(&v197, &v198);
v153 = 6;
v154 = 4477519;
*(_QWORD *)(v71 + 736) = SetGroupIDLayer::createTextInput(v71, &v197, 3, 6, &v153, 2, 50.0);
if ( (v153 & 1) != 0 )
operator delete(v155);
sub_1003001F0(v71);
sub_1002782D0(&v197, v199);
v167 = 4;
strcpy(v168, "CH");
*(_QWORD *)(v71 + 744) = SetGroupIDLayer::createTextInput(v71, &v197, 4, 6, &v167, 2, 50.0);
if ( (v167 & 1) != 0 )
operator delete(v169);
updated = SetGroupIDLayer::updateOrderChannelLabel(v71);
v105 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"GJ_plus2Btn_001.png", updated);
(*(void (__fastcall **)(char *, float))(*(_QWORD *)v105 + 160LL))(v105, 0.80000001);
v106 = CCMenuItemSpriteExtra::create((__int64)v105, 0, v71, (__int64)SetGroupIDLayer::onNextFreeOrderChannel, 0);
(*(void (__fastcall **)(_QWORD, void *))(**(_QWORD **)(v71 + 552) + 456LL))(*(_QWORD *)(v71 + 552), v106);
cocos2d::CCNode::convertToNodeSpace((double *)&v189, *(_QWORD *)(v71 + 552), (unsigned int *)v199);
sub_100278250((float *)&v187, -75.0, 0.0);
sub_100278350((double *)&v197, &v189, &v187);
(*(void (__fastcall **)(void *, unsigned __int64 *))(*(_QWORD *)v106 + 184LL))(v106, &v197);
}
sub_1003005A0(v71);
sub_1003006D0(v71);
sub_1003007F0(v71);
sub_100300910(v71);
if ( (unsigned int)sub_1007FEF90(*(_QWORD *)(v71 + 688)) )
{
v107 = 0;
do
{
v108 = sub_1007FEFE0(v191[86], v107);
v109 = *((_DWORD *)v191 + 197);
v110 = "GJ_button_02.png";
if ( v109 != (*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)v108 + 64LL))(v108) )
v110 = "GJ_button_04.png";
ButtonSprite::updateBGImage(v108, (__int64)v110);
++v107;
}
while ( v107 < (unsigned int)sub_1007FEF90(v191[86]) );
}
v111 = (__int64)v191;
SetGroupIDLayer::updateGroupIDButtons(v191);
v112 = *(_QWORD *)(v111 + 552);
sub_100278250((float *)v199, (float)(v195 * 0.5) + 217.0, (float)(0.5 * v196) + 142.0);
cocos2d::CCNode::convertToNodeSpace((double *)&v198, v112, (unsigned int *)v199);
v113 = ButtonSprite::create_1(
(__int64)"Copy",
0x14u,
0,
1u,
(__int64)"goldFont.fnt",
(__int64)"GJ_button_04.png",
0.5,
25.0);
v192 = ButtonSprite::create_1(
(__int64)"Paste",
0x14u,
0,
1u,
(__int64)"goldFont.fnt",
(__int64)"GJ_button_04.png",
0.5,
25.0);
v114 = ButtonSprite::create_1(
(__int64)"Extra",
0x14u,
0,
1u,
(__int64)"goldFont.fnt",
(__int64)"GJ_button_04.png",
0.5,
25.0);
v115 = ButtonSprite::create_1(
(__int64)"Extra2",
0x14u,
0,
1u,
(__int64)"goldFont.fnt",
(__int64)"GJ_button_04.png",
0.5,
25.0);
v116 = 1056964608;
v117 = ButtonSprite::create_1(
(__int64)"Anim",
0x14u,
0,
1u,
(__int64)"goldFont.fnt",
(__int64)"GJ_button_04.png",
0.5,
25.0);
v118 = CCMenuItemSpriteExtra::create((__int64)v113, 0, v111, (__int64)SetGroupIDLayer::onCopy, 0);
v192 = CCMenuItemSpriteExtra::create((__int64)v192, 0, v111, (__int64)SetGroupIDLayer::onPaste, 0);
v119 = CCMenuItemSpriteExtra::create((__int64)v114, 0, v111, (__int64)SetGroupIDLayer::onExtra, 0);
v120 = CCMenuItemSpriteExtra::create((__int64)v115, 0, v111, (__int64)SetGroupIDLayer::onExtra2, 0);
v121 = v117;
v123 = CCMenuItemSpriteExtra::create((__int64)v117, 0, v111, (__int64)SetGroupIDLayer::onAnim, 0);
if ( v188 )
{
(*(void (__fastcall **)(_QWORD, void *))(**(_QWORD **)(v111 + 552) + 456LL))(*(_QWORD *)(v111 + 552), v118);
(*(void (__fastcall **)(void *, unsigned __int64 *))(*(_QWORD *)v118 + 184LL))(v118, &v198);
LABEL_73:
(*(void (__fastcall **)(_QWORD, void *))(**(_QWORD **)(v111 + 552) + 456LL))(*(_QWORD *)(v111 + 552), v192);
sub_1002782D0(v199, &v198);
if ( v188 )
{
v116 = 0;
sub_100278250((float *)&v189, 0.0, -31.0);
sub_100278350((double *)&v197, v199, &v189);
sub_100278300(v199, &v197);
}
(*(void (__fastcall **)(void *, unsigned __int64 *))(*(_QWORD *)v192 + 184LL))(v192, v199);
goto LABEL_76;
}
v116 = GameManager::sharedState(v121, 0, v122).u64[0];
if ( LevelEditorLayer::canPasteState(*(_QWORD *)(v124 + 552)) )
goto LABEL_73;
LABEL_76:
(*(void (__fastcall **)(_QWORD, void *, double))(**(_QWORD **)(v111 + 552) + 456LL))(
*(_QWORD *)(v111 + 552),
v119,
*(double *)&v116);
sub_100278250((float *)&v197, 0.0, -62.0);
sub_100278350((double *)v199, &v198, &v197);
(*(void (__fastcall **)(void *, unsigned __int64 *))(*(_QWORD *)v119 + 184LL))(v119, v199);
(*(void (__fastcall **)(_QWORD, void *))(**(_QWORD **)(v111 + 552) + 456LL))(*(_QWORD *)(v111 + 552), v120);
sub_100278250((float *)&v197, 0.0, -93.0);
sub_100278350((double *)v199, &v198, &v197);
(*(void (__fastcall **)(void *, unsigned __int64 *))(*(_QWORD *)v120 + 184LL))(v120, v199);
(*(void (__fastcall **)(_QWORD, void *))(**(_QWORD **)(v111 + 552) + 456LL))(*(_QWORD *)(v111 + 552), v123);
sub_100278250((float *)&v197, 0.0, -124.0);
sub_100278350((double *)v199, &v198, &v197);
v125 = v199;
(*(void (__fastcall **)(void *, unsigned __int64 *))(*(_QWORD *)v123 + 184LL))(v123, v199);
sub_100278250((float *)v199, 0.0, 2.0);
v126 = (char *)&v197;
sub_100278250((float *)&v197, (float)(v195 * 0.5) + 217.0, (float)((float)(0.5 * v196) + 142.0) + -164.0);
if ( v188 )
{
if ( *(_DWORD *)(v188 + 1248) == 1 )
{
GameManager::sharedState(&v197, v199, v127);
if ( *(_QWORD *)(v128 + 552) )
{
v178 = 14;
strcpy(v179, "Preview");
v129 = v111;
v130 = *(_BYTE *)(v188 + 1768);
v131 = *(_QWORD *)(v129 + 552);
sub_100278250((float *)&v187, 0.0, -0.0);
sub_100278350((double *)&v189, &v197, &v187);
sub_1002782D0(&v181, v199);
v132 = &v178;
GameToolbox::createToggleButton(
(unsigned int)&v178,
(unsigned int)SetGroupIDLayer::onToggleGuide,
0,
v130,
v131,
(unsigned int)&v189,
(__int64)v191,
(__int64)v191,
(__int64)&v181,
(__int64)"goldFont.fnt",
1,
0,
0);
if ( (v178 & 1) != 0 )
{
v132 = (char *)v180;
operator delete(v180);
}
GameManager::sharedState(v132, SetGroupIDLayer::onToggleGuide, v133);
v135 = *(_QWORD *)(*(_QWORD *)(v134 + 552) + 14816LL);
v170 = 16;
strcpy(v171, "Playback");
v136 = v191[69];
sub_100278250((float *)&v187, 0.0, -38.0);
sub_100278350((double *)&v189, &v197, &v187);
sub_1002782D0(&v181, v199);
v137 = &v170;
GameToolbox::createToggleButton(
(unsigned int)&v170,
(unsigned int)SetGroupIDLayer::onToggleSelectedOrder,
0,
v135 == v188,
v136,
(unsigned int)&v189,
(__int64)v191,
(__int64)v191,
(__int64)&v181,
(__int64)"goldFont.fnt",
1,
0,
0);
if ( (v170 & 1) != 0 )
{
v137 = (char *)v172;
operator delete(v172);
}
GameManager::sharedState(v137, SetGroupIDLayer::onToggleSelectedOrder, v138);
v140 = *(_QWORD *)(*(_QWORD *)(v139 + 552) + 14832LL);
v173 = 18;
strcpy(v174, "Trace Out");
v141 = v191[69];
sub_100278250((float *)&v187, 0.0, -76.0);
sub_100278350((double *)&v189, &v197, &v187);
sub_1002782D0(&v181, v199);
v125 = (unsigned __int64 *)SetGroupIDLayer::onToggleTraceOut;
v126 = &v173;
GameToolbox::createToggleButton(
(unsigned int)&v173,
(unsigned int)SetGroupIDLayer::onToggleTraceOut,
0,
v140 == v188,
v141,
(unsigned int)&v189,
(__int64)v191,
(__int64)v191,
(__int64)&v181,
(__int64)"goldFont.fnt",
1,
0,
0);
v111 = (__int64)v191;
if ( (v173 & 1) != 0 )
{
v126 = (char *)v175;
operator delete(v175);
}
}
}
GameManager::sharedState(v126, v125, v127);
if ( *(_QWORD *)(v143 + 552) )
{
GameManager::sharedState(v126, v125, v142);
v145 = *(_QWORD *)(*(_QWORD *)(v144 + 552) + 14824LL);
v176 = 16;
strcpy(v177, "Trace In");
v146 = v191[69];
sub_100278250((float *)&v187, 0.0, -114.0);
sub_100278350((double *)&v189, &v197, &v187);
sub_1002782D0(&v181, v199);
GameToolbox::createToggleButton(
(unsigned int)&v176,
(unsigned int)SetGroupIDLayer::onToggleTraceIn,
0,
v145 == v188,
v146,
(unsigned int)&v189,
(__int64)v191,
(__int64)v191,
(__int64)&v181,
(__int64)"goldFont.fnt",
1,
0,
0);
v111 = (__int64)v191;
if ( (v176 & 1) != 0 )
operator delete(*(void **)&v177[15]);
}
}
*(_BYTE *)(v111 + 797) = 0;
if ( (__dst[0] & 1) != 0 )
operator delete(v194);
return v190;
}