//
// EditorUI::init from 0x1401a9630 to 0x1401ac4e1 (11953 bytes)
//
// 2 xrefs:
// > LevelEditorLayer::init @ 0x1403eea69
// > ??> @ 0x140919d00
//
// 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 11:27:53 +0000
//
// Hidden C++ exception states: #wind=10
bool __fastcall EditorUI::init(__int64 a1, __int64 a2)
{
bool result; // al
__int64 v5; // rdx
__int64 v6; // rdx
__int64 v7; // rdx
__int64 v8; // rdx
__int64 v9; // rcx
__int64 v10; // rax
__int64 v11; // rcx
cocos2d::CCObject *v12; // rax
__int64 v13; // rcx
__int64 v14; // rbx
cocos2d::CCString *v15; // rax
int v16; // ebx
void *v17; // r8
float v18; // xmm0_4
__int64 v19; // rcx
__int64 v20; // rbx
cocos2d::CCString *v21; // rax
int v22; // ebx
__int64 v23; // r8
void *v24; // r8
float v25; // xmm1_4
float v26; // xmm1_4
cocos2d::CCLayer *v27; // rax
__int64 v28; // rdi
__int64 v29; // rcx
cocos2d::CCDirector *v30; // rax
float v31; // xmm0_4
__int64 v32; // rbx
__int64 v33; // rax
char *v34; // rbx
bool (__fastcall *v35)(cocos2d::CCLayer *); // rdx
bool v36; // al
char *v37; // rbx
bool (__fastcall *v38)(__int64); // rdx
bool v39; // al
char *v40; // rax
__int64 v41; // rax
__int64 v42; // rax
float *v43; // rsi
__int64 v44; // rbx
__int64 v45; // rax
__int64 v46; // rbx
__int64 v47; // rcx
cocos2d::CCDirector *v48; // rax
float v49; // xmm6_4
__int64 v50; // rcx
cocos2d::CCDirector *v51; // rax
float v52; // xmm0_4
__int64 v53; // rax
__int64 v54; // rdx
__int64 v55; // rcx
cocos2d::CCObject *v56; // rax
__int64 v57; // rcx
cocos2d::CCObject *v58; // rax
__int64 v59; // rcx
cocos2d::CCObject *v60; // rax
__int64 v61; // rcx
cocos2d::CCDirector *v62; // rax
__int64 v63; // rcx
__int64 v64; // r14
__int64 v65; // rax
__int64 SpriteButton_1; // rax
__int64 v67; // rbx
__int64 v68; // rax
__int64 v69; // rax
__int64 v70; // rax
__int64 v71; // rbx
__int64 v72; // rax
__int64 v73; // rax
__int64 v74; // rax
__int64 v75; // rbx
__int64 v76; // rax
__int64 v77; // rax
__int64 v78; // rax
__int64 v79; // rbx
__int64 v80; // rax
float v81; // xmm6_4
__int64 v82; // rcx
cocos2d::CCDirector *v83; // rax
float v84; // xmm7_4
__int64 v85; // rcx
cocos2d::CCDirector *v86; // rax
float v87; // xmm0_4
__int64 v88; // rax
__int64 v89; // rax
__int64 v90; // rax
__int64 v91; // rax
struct cocos2d::CCSprite *v92; // rdi
__int64 v93; // rbx
float v94; // xmm6_4
__int64 v95; // rcx
cocos2d::CCDirector *v96; // rax
float v97; // xmm7_4
__int64 v98; // rcx
cocos2d::CCDirector *v99; // rax
float v100; // xmm0_4
__int64 v101; // rax
__int64 v102; // rax
const struct cocos2d::CCPoint *v103; // rax
const struct cocos2d::CCPoint *v104; // rbx
__int64 v105; // rax
__int64 v106; // rax
__int64 v107; // rax
__int64 *v108; // rax
__int64 v109; // rdi
float v110; // xmm6_4
__int64 v111; // rcx
cocos2d::CCDirector *v112; // rax
float v113; // xmm7_4
__int64 v114; // rcx
cocos2d::CCDirector *v115; // rax
float v116; // xmm0_4
__int64 v117; // rbx
__int64 v118; // rax
__int64 v119; // rax
__int64 v120; // rax
__int64 v121; // rbx
__int64 v122; // rax
__int64 v123; // rax
__int64 v124; // rbx
__int64 v125; // rax
__int64 v126; // rax
__int64 v127; // rbx
__int64 v128; // rax
struct cocos2d::CCSprite *v129; // rdi
__int64 v130; // rbx
float v131; // xmm6_4
__int64 v132; // rcx
cocos2d::CCDirector *v133; // rax
float v134; // xmm7_4
__int64 v135; // rcx
cocos2d::CCDirector *v136; // rax
float v137; // xmm0_4
__int64 v138; // rax
int v139; // eax
cocos2d::CCObject *v140; // rax
__int64 v141; // rdi
__int64 v142; // rcx
cocos2d::CCDirector *v143; // rax
float v144; // xmm6_4
__int64 v145; // rcx
cocos2d::CCDirector *v146; // rax
float v147; // xmm0_4
__int64 v148; // rbx
__int64 v149; // rax
__int64 v150; // rax
int v151; // eax
cocos2d::CCObject *v152; // rax
__int64 v153; // rax
__int64 v154; // rbx
__int64 v155; // rax
struct cocos2d::CCSprite *v156; // rax
cocos2d::CCObject *v157; // rax
__int64 v158; // rax
__int64 v159; // rbx
__int64 v160; // rax
int v161; // eax
cocos2d::CCObject *v162; // rax
__int64 v163; // rax
__int64 v164; // rbx
__int64 v165; // rax
int v166; // eax
cocos2d::CCObject *v167; // rax
__int64 v168; // rax
__int64 v169; // rbx
__int64 v170; // rax
int v171; // eax
cocos2d::CCObject *v172; // rax
__int64 v173; // rax
__int64 v174; // rbx
__int64 v175; // rax
int v176; // eax
cocos2d::CCObject *v177; // rax
__int64 v178; // rax
__int64 v179; // rbx
__int64 v180; // rax
struct cocos2d::CCSprite *v181; // rax
cocos2d::CCObject *v182; // rsi
__int64 v183; // rax
__int64 v184; // rbx
__int64 v185; // rax
struct cocos2d::CCSprite *v186; // rax
cocos2d::CCObject *v187; // rdi
__int64 v188; // rax
__int64 v189; // rbx
__int64 v190; // rax
__int64 v191; // rax
__int64 v192; // rbx
__int64 v193; // rax
struct cocos2d::CCSprite *v194; // rax
cocos2d::CCObject *v195; // rax
__int64 v196; // rax
struct cocos2d::CCSprite *v197; // rax
cocos2d::CCObject *v198; // rax
__int64 v199; // rax
struct cocos2d::CCSprite *v200; // rbx
cocos2d::CCObject *v201; // rax
__int64 v202; // rax
__int64 v203; // rcx
__int64 v204; // rcx
int v205; // eax
cocos2d::CCObject *v206; // rax
struct cocos2d::CCMenu *v207; // r12
__int64 v208; // rbx
__int64 v209; // rcx
cocos2d::CCDirector *v210; // rax
__int64 v211; // rcx
cocos2d::CCDirector *v212; // rax
__int64 *v213; // rdi
__int64 v214; // rbx
float v215; // xmm6_4
__int64 v216; // rcx
cocos2d::CCDirector *v217; // rax
float v218; // xmm0_4
__int64 v219; // rax
int v220; // eax
cocos2d::CCObject *v221; // r14
__int64 v222; // rbx
__int64 v223; // rcx
cocos2d::CCDirector *v224; // rax
float v225; // xmm6_4
__int64 v226; // rcx
cocos2d::CCDirector *v227; // rax
float v228; // xmm0_4
__int64 v229; // rax
__int64 v230; // rax
int v231; // eax
cocos2d::CCObject *v232; // r15
__int64 v233; // rsi
__int64 (__fastcall *v234)(cocos2d::CCObject *); // rdi
__int64 v235; // rax
__int64 v236; // rbx
__int64 v237; // rax
__int64 v238; // rax
int v239; // eax
cocos2d::CCObject *v240; // r14
__int64 v241; // rsi
__int64 (__fastcall *v242)(cocos2d::CCObject *); // rdi
__int64 v243; // rax
__int64 v244; // rbx
__int64 v245; // rax
__int64 v246; // rax
__int64 v247; // rcx
cocos2d::CCDirector *v248; // rax
float v249; // xmm6_4
__int64 v250; // rcx
cocos2d::CCDirector *v251; // rax
float ScreenRight; // xmm0_4
__int64 v253; // rax
struct cocos2d::CCSprite *v254; // rax
cocos2d::CCObject *v255; // rax
struct cocos2d::CCSprite *v256; // rax
cocos2d::CCObject *v257; // rax
__int64 v258; // rdi
__int64 v259; // rbx
__int64 v260; // rax
__int64 v261; // rax
struct cocos2d::CCSprite *v262; // rax
cocos2d::CCObject *v263; // rax
__int64 v264; // rdi
__int64 v265; // rbx
__int64 v266; // rax
__int64 v267; // rax
struct cocos2d::CCSprite *v268; // rax
cocos2d::CCObject *v269; // rax
__int64 v270; // rdi
__int64 v271; // rbx
__int64 v272; // rax
__int64 v273; // rax
struct cocos2d::CCSprite *v274; // rax
cocos2d::CCObject *v275; // rax
__int64 v276; // rdi
__int64 v277; // rbx
__int64 v278; // rax
__int64 v279; // rax
struct cocos2d::CCSprite *v280; // rax
cocos2d::CCObject *v281; // rax
__int64 v282; // rdi
__int64 v283; // rbx
__int64 v284; // rax
__int64 v285; // rax
struct cocos2d::CCSprite *v286; // rax
cocos2d::CCObject *v287; // rax
__int64 v288; // rdi
__int64 v289; // rbx
__int64 v290; // rax
__int64 v291; // rax
struct cocos2d::CCSprite *v292; // rax
cocos2d::CCObject *v293; // rax
__int64 v294; // rdi
__int64 v295; // rbx
__int64 v296; // rax
__int64 v297; // rax
struct cocos2d::CCSprite *v298; // rax
cocos2d::CCObject *v299; // rax
__int64 v300; // rdi
__int64 v301; // rbx
__int64 v302; // rax
__int64 v303; // rax
struct cocos2d::CCSprite *v304; // rax
cocos2d::CCObject *v305; // rax
__int64 v306; // rdi
__int64 v307; // rbx
__int64 v308; // rax
__int64 v309; // rax
struct cocos2d::CCSprite *v310; // rax
cocos2d::CCObject *v311; // rax
__int64 v312; // rdi
__int64 v313; // rbx
__int64 v314; // rax
__int64 v315; // rax
struct cocos2d::CCSprite *v316; // rax
cocos2d::CCObject *v317; // rax
__int64 v318; // rdi
__int64 v319; // rbx
__int64 v320; // rax
__int64 v321; // rax
__int64 v322; // rcx
cocos2d::CCDirector *v323; // rax
float v324; // xmm6_4
__int64 v325; // rcx
cocos2d::CCDirector *v326; // rax
float v327; // xmm0_4
cocos2d::CCSprite *v328; // rbx
cocos2d::CCObject *v329; // rax
__int64 v330; // rdi
__int64 v331; // rbx
__int64 v332; // rax
__int64 v333; // rax
__int64 v334; // rax
struct cocos2d::CCSprite *v335; // rax
cocos2d::CCObject *v336; // rax
__int64 v337; // rdi
__int64 v338; // rbx
__int64 v339; // rax
__int64 v340; // rax
__int64 v341; // rax
struct cocos2d::CCSprite *v342; // rbx
__int64 v343; // rdx
cocos2d::CCObject *v344; // rax
__int64 v345; // rdi
__int64 v346; // rbx
__int64 v347; // rax
__int64 v348; // rax
__int64 v349; // rax
struct cocos2d::CCSprite *v350; // rbx
__int64 v351; // rdx
cocos2d::CCObject *v352; // rax
__int64 v353; // rdi
__int64 v354; // rbx
__int64 v355; // rax
struct cocos2d::CCLabelBMFont *v356; // rax
struct cocos2d::CCSprite *v357; // rbx
cocos2d::CCObject *v358; // rsi
__int64 v359; // rdi
__int64 v360; // rax
__int64 v361; // rbx
__int64 v362; // rax
__int64 v363; // rax
struct cocos2d::CCSprite *v364; // rax
__int64 v365; // rsi
__int64 v366; // rax
__int64 v367; // rbx
__int64 v368; // rdi
__int64 v369; // rax
__int64 v370; // rax
struct cocos2d::CCLabelBMFont *v371; // rax
__int64 v372; // rdi
__int64 v373; // rbx
__int64 v374; // rax
__int64 v375; // rdi
__int64 v376; // rbx
__int64 v377; // rax
struct cocos2d::CCLabelBMFont *v378; // rax
__int64 v379; // rdi
__int64 v380; // rbx
__int64 v381; // rax
__int64 v382; // rdi
__int64 v383; // rbx
__int64 v384; // rax
__int64 v385; // rax
__int64 v386; // rax
__int64 v387; // rcx
__int64 v388; // rcx
__int64 v389; // rax
cocos2d::CCArray *v390; // rbx
struct cocos2d::CCArray *v391; // rax
cocos2d::CCArray *v392; // rbx
struct cocos2d::CCArray *v393; // rax
struct cocos2d::CCSprite *v394; // rbx
__int64 v395; // rdx
cocos2d::CCObject *v396; // rdi
__int64 v397; // rbx
__int64 v398; // rax
char v399[8]; // [rsp+48h] [rbp-C0h] BYREF
char v400[8]; // [rsp+50h] [rbp-B8h] BYREF
__int64 v401; // [rsp+58h] [rbp-B0h] BYREF
void *v402; // [rsp+60h] [rbp-A8h] BYREF
void *v403; // [rsp+68h] [rbp-A0h] BYREF
float v404; // [rsp+70h] [rbp-98h] BYREF
float v405; // [rsp+74h] [rbp-94h]
char v406[8]; // [rsp+78h] [rbp-90h] BYREF
char v407[8]; // [rsp+80h] [rbp-88h] BYREF
char v408[8]; // [rsp+88h] [rbp-80h] BYREF
char v409[8]; // [rsp+90h] [rbp-78h] BYREF
char v410[8]; // [rsp+98h] [rbp-70h] BYREF
char v411[8]; // [rsp+A0h] [rbp-68h] BYREF
char v412[8]; // [rsp+A8h] [rbp-60h] BYREF
char v413[8]; // [rsp+B0h] [rbp-58h] BYREF
char v414[8]; // [rsp+B8h] [rbp-50h] BYREF
char v415[8]; // [rsp+C0h] [rbp-48h] BYREF
char v416[8]; // [rsp+C8h] [rbp-40h] BYREF
char v417[8]; // [rsp+D0h] [rbp-38h] BYREF
char v418[8]; // [rsp+D8h] [rbp-30h] BYREF
char v419[8]; // [rsp+E0h] [rbp-28h] BYREF
char v420[8]; // [rsp+E8h] [rbp-20h] BYREF
char v421[8]; // [rsp+F0h] [rbp-18h] BYREF
char v422[8]; // [rsp+F8h] [rbp-10h] BYREF
char v423[8]; // [rsp+100h] [rbp-8h] BYREF
char v424[8]; // [rsp+108h] [rbp+0h] BYREF
char v425[8]; // [rsp+110h] [rbp+8h] BYREF
char v426[8]; // [rsp+118h] [rbp+10h] BYREF
char v427[8]; // [rsp+120h] [rbp+18h] BYREF
char v428[8]; // [rsp+128h] [rbp+20h] BYREF
void *Block[2]; // [rsp+130h] [rbp+28h] BYREF
__int64 v430; // [rsp+140h] [rbp+38h]
unsigned __int64 v431; // [rsp+148h] [rbp+40h]
result = cocos2d::CCLayer::init((cocos2d::CCLayer *)a1);
if ( result )
{
*(_QWORD *)(a1 + 1708) = 0;
*(_BYTE *)(a1 + 1716) = 0;
*(_QWORD *)(a1 + 1512) = a2;
LOBYTE(v5) = 1;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 920LL))(a1, v5);
LOBYTE(v6) = 1;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 992LL))(a1, v6);
LOBYTE(v7) = 1;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 1008LL))(a1, v7);
LOBYTE(v8) = 1;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 1024LL))(a1, v8);
v10 = cocos2d::CCDirector::sharedDirector(v9);
cocos2d::CCDirector::getWinSize(v10, &v404);
v12 = (cocos2d::CCObject *)cocos2d::CCArray::create(v11);
*(_QWORD *)(a1 + 688) = v12;
cocos2d::CCObject::retain(v12);
v13 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v402 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager(v402);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v13 = qword_14090BFD0;
}
*(_BYTE *)(a1 + 739) = GameManager::getGameVariable(v13, "0112");
v14 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v402 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager(v402);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v14 = qword_14090BFD0;
}
*(_OWORD *)Block = 0;
v430 = 3;
v431 = 15;
LODWORD(Block[0]) = 6256231;
sub_140044D80(Block, "0193", 4u);
v15 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(*(_QWORD *)(v14 + 432), Block);
v16 = cocos2d::CCString::intValue(v15);
if ( v431 > 0xF )
{
v17 = Block[0];
if ( v431 + 1 >= 0x1000 )
{
v17 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v17 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v17);
}
v430 = 0;
v431 = 15;
LOBYTE(Block[0]) = 0;
v18 = (float)v16 / 10.0;
if ( v18 < 5.0 || v18 > 300.0 )
v18 = 0.0;
*(float *)(a1 + 700) = v18;
v19 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v402 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager(v402);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v19 = qword_14090BFD0;
}
*(_BYTE *)(a1 + 704) = GameManager::getGameVariable(v19, "0194");
v20 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v402 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager(v402);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v20 = qword_14090BFD0;
}
*(_OWORD *)Block = 0;
v430 = 3;
v431 = 15;
LODWORD(Block[0]) = 6256231;
sub_140044D80(Block, "0238", 4u);
v21 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(*(_QWORD *)(v20 + 432), Block);
v22 = cocos2d::CCString::intValue(v21);
if ( v431 > 0xF )
{
v24 = Block[0];
if ( v431 + 1 >= 0x1000 )
{
v24 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v24 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v24);
}
v25 = (float)v22 / 1000.0;
if ( v25 < 0.0099999998 || v25 > 300.0 )
v25 = 10.0;
*(float *)(a1 + 1704) = v25;
v26 = fminf(1.0, (float)((float)(v404 / v405) - 1.5) / 0.1);
if ( v26 < 0.0 )
v26 = 0.0;
v27 = Slider::create(
a1,
(__int64)EditorUI::sliderChanged,
v23,
"slidergroove_02.png",
(__int64)"GJ_moveBtn.png",
(__int64)"GJ_moveSBtn.png",
(float)((float)(v26 * 0.30000001) + 0.69999999) * 0.80000001);
*(_QWORD *)(a1 + 888) = v27;
(*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)v27 + 52) + 336LL))(*((_QWORD *)v27 + 52), 0);
(*(void (__fastcall **)(__int64, _QWORD, __int64))(*(_QWORD *)a1 + 456LL))(a1, *(_QWORD *)(a1 + 888), 2);
v28 = **(_QWORD **)(a1 + 888);
v30 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v29);
v31 = cocos2d::CCDirector::getScreenTop(v30) - 20.0;
v32 = *(_QWORD *)(a1 + 888);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v402, (float)(v404 * 0.5) + 10.0, v31);
(*(void (__fastcall **)(__int64, __int64))(v28 + 184))(v32, v33);
cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(a1 + 688), *(struct cocos2d::CCObject **)(a1 + 888));
v34 = (char *)operator new(0x208u);
v402 = v34;
cocos2d::CCLayer::CCLayer((cocos2d::CCLayer *)v34);
*(_QWORD *)v34 = &GJRotationControl::`vftable';
*((_QWORD *)v34 + 40) = &GJRotationControl::`vftable';
*((_QWORD *)v34 + 41) = &GJRotationControl::`vftable';
*((_QWORD *)v34 + 42) = &GJRotationControl::`vftable';
*((_QWORD *)v34 + 43) = &GJRotationControl::`vftable';
*((_QWORD *)v34 + 44) = &GJRotationControl::`vftable';
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)(v34 + 408));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)(v34 + 416));
*((_QWORD *)v34 + 54) = 0;
*((_DWORD *)v34 + 110) = -1;
*((_QWORD *)v34 + 56) = 0;
v34[456] = 0;
*((_QWORD *)v34 + 58) = 0;
*((_QWORD *)v34 + 59) = 0;
*((_QWORD *)v34 + 60) = 0;
*((_QWORD *)v34 + 61) = 0;
*((_QWORD *)v34 + 62) = 0;
*((_QWORD *)v34 + 63) = 0;
*((_QWORD *)v34 + 64) = 0;
v35 = *(bool (__fastcall **)(cocos2d::CCLayer *))(*(_QWORD *)v34 + 72LL);
if ( v35 == GJRotationControl::init )
v36 = GJRotationControl::init((cocos2d::CCLayer *)v34);
else
v36 = v35((cocos2d::CCLayer *)v34);
if ( v36 )
{
cocos2d::CCObject::autorelease((cocos2d::CCObject *)v34);
}
else
{
(*(void (__fastcall **)(char *, __int64))(*(_QWORD *)v34 + 8LL))(v34, 1);
v34 = nullptr;
}
*(_QWORD *)(a1 + 808) = v34;
cocos2d::CCObject::retain((cocos2d::CCObject *)v34);
(*(void (__fastcall **)(_QWORD, _QWORD, __int64))(**(_QWORD **)(*(_QWORD *)(a1 + 1512) + 4296LL) + 456LL))(
*(_QWORD *)(*(_QWORD *)(a1 + 1512) + 4296LL),
*(_QWORD *)(a1 + 808),
10000);
*(_QWORD *)(*(_QWORD *)(a1 + 808) + 512LL) = a1 + 424;
EditorUI::deactivateRotationControl(a1);
v37 = (char *)operator new(0x268u);
v402 = v37;
cocos2d::CCLayer::CCLayer((cocos2d::CCLayer *)v37);
*(_QWORD *)v37 = &GJScaleControl::`vftable';
*((_QWORD *)v37 + 40) = &GJScaleControl::`vftable';
*((_QWORD *)v37 + 41) = &GJScaleControl::`vftable';
*((_QWORD *)v37 + 42) = &GJScaleControl::`vftable';
*((_QWORD *)v37 + 43) = &GJScaleControl::`vftable';
*((_QWORD *)v37 + 44) = &GJScaleControl::`vftable';
*((_QWORD *)v37 + 51) = 0;
*((_QWORD *)v37 + 52) = 0;
*((_QWORD *)v37 + 53) = 0;
*((_DWORD *)v37 + 108) = -1;
*(_QWORD *)(v37 + 436) = 0;
*((_QWORD *)v37 + 56) = 0;
v37[456] = 0;
*((_WORD *)v37 + 229) = 0;
*((_QWORD *)v37 + 61) = 0;
*((_QWORD *)v37 + 62) = 0;
*((_QWORD *)v37 + 63) = 0;
*((_QWORD *)v37 + 64) = 0;
*((_QWORD *)v37 + 65) = 0;
*((_QWORD *)v37 + 66) = 0;
*((_QWORD *)v37 + 67) = 0;
*((_QWORD *)v37 + 68) = 0;
*((_QWORD *)v37 + 69) = 0;
*((_QWORD *)v37 + 70) = 0;
*((_QWORD *)v37 + 71) = 0;
*((_QWORD *)v37 + 72) = 0;
*((_DWORD *)v37 + 146) = 0x40000000;
*(_QWORD *)(v37 + 588) = 1056964608;
*((_QWORD *)v37 + 75) = 0;
v37[608] = 0;
v38 = *(bool (__fastcall **)(__int64))(*(_QWORD *)v37 + 72LL);
if ( v38 == GJScaleControl::init )
v39 = GJScaleControl::init((__int64)v37);
else
v39 = v38((__int64)v37);
if ( v39 )
{
cocos2d::CCObject::autorelease((cocos2d::CCObject *)v37);
}
else
{
(*(void (__fastcall **)(char *, __int64))(*(_QWORD *)v37 + 8LL))(v37, 1);
v37 = nullptr;
}
*(_QWORD *)(a1 + 832) = v37;
cocos2d::CCObject::retain((cocos2d::CCObject *)v37);
(*(void (__fastcall **)(_QWORD, _QWORD, __int64))(**(_QWORD **)(*(_QWORD *)(a1 + 1512) + 4296LL) + 456LL))(
*(_QWORD *)(*(_QWORD *)(a1 + 1512) + 4296LL),
*(_QWORD *)(a1 + 832),
10000);
*(_QWORD *)(*(_QWORD *)(a1 + 832) + 576LL) = a1 + 432;
EditorUI::deactivateScaleControl(a1);
v40 = GJTransformControl::create();
*(_QWORD *)(a1 + 840) = v40;
cocos2d::CCObject::retain((cocos2d::CCObject *)v40);
(*(void (__fastcall **)(_QWORD, _QWORD, __int64))(**(_QWORD **)(*(_QWORD *)(a1 + 1512) + 4296LL) + 456LL))(
*(_QWORD *)(*(_QWORD *)(a1 + 1512) + 4296LL),
*(_QWORD *)(a1 + 840),
10000);
*(_QWORD *)(*(_QWORD *)(a1 + 840) + 440LL) = a1 + 440;
EditorUI::deactivateTransformControl(a1);
v41 = cocos2d::CCNode::create();
*(_QWORD *)(a1 + 848) = v41;
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 1512) + 464LL))(*(_QWORD *)(a1 + 1512), v41);
v42 = cocos2d::CCNode::create();
*(_QWORD *)(a1 + 856) = v42;
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 848) + 464LL))(*(_QWORD *)(a1 + 848), v42);
v43 = (float *)cocos2d::CCSprite::create("edit_barBG_001.png");
(*(void (__fastcall **)(float *))(*(_QWORD *)v43 + 120LL))(v43);
v44 = *(_QWORD *)v43;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v402, 0.0, 0.0);
(*(void (__fastcall **)(float *, __int64))(v44 + 288))(v43, v45);
v46 = *(_QWORD *)v43;
v48 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v47);
v49 = cocos2d::CCDirector::getScreenBottom(v48) - 1.0;
v51 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v50);
v52 = cocos2d::CCDirector::getScreenLeft(v51) - 1.0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v402, v52, v49);
(*(void (__fastcall **)(float *, __int64))(v46 + 184))(v43, v53);
LOBYTE(v54) = -56;
(*(void (__fastcall **)(float *, __int64))(*((_QWORD *)v43 + 40) + 40LL))(v43 + 80, v54);
*(float *)(a1 + 904) = v43[109];
*(float *)(a1 + 900) = (float)((float)(*(float *)((*(__int64 (__fastcall **)(float *))(*(_QWORD *)v43 + 200LL))(v43)
+ 4)
+ v43[109])
+ 20.0)
+ 120.0;
(*(void (__fastcall **)(__int64, float *, __int64))(*(_QWORD *)a1 + 456LL))(a1, v43, 1);
cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(a1 + 688), (struct cocos2d::CCObject *)v43);
v56 = (cocos2d::CCObject *)cocos2d::CCArray::create(v55);
*(_QWORD *)(a1 + 944) = v56;
cocos2d::CCObject::retain(v56);
v58 = (cocos2d::CCObject *)cocos2d::CCArray::create(v57);
*(_QWORD *)(a1 + 928) = v58;
cocos2d::CCObject::retain(v58);
v60 = (cocos2d::CCObject *)cocos2d::CCArray::create(v59);
*(_QWORD *)(a1 + 1416) = v60;
cocos2d::CCObject::retain(v60);
v62 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v61);
*(float *)(a1 + 896) = cocos2d::CCDirector::getScreenBottom(v62) + 20.0;
*(_DWORD *)(a1 + 1508) = 0;
v64 = cocos2d::CCMenu::create(v63);
v402 = (void *)v64;
(*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)a1 + 456LL))(a1, v64, 2);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v406, 0.0, -1.0);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v399, (const struct cocos2d::CCPoint *)&dword_14090A6E8);
SpriteButton_1 = EditorUI::getSpriteButton_1(
a1,
(unsigned int)"edit_buildBtn_001.png",
(unsigned int)EditorUI::toggleMode,
v64,
1065353216,
1,
v65,
0);
*(_QWORD *)(a1 + 976) = SpriteButton_1;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)SpriteButton_1 + 64LL))(SpriteButton_1, 2);
v67 = *(_QWORD *)((*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 976) + 952LL))(*(_QWORD *)(a1 + 976)) + 640);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v67 + 160LL))(v67);
v68 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v67 + 200LL))(v67);
cocos2d::CCPoint::operator+(v68, v399, v406);
(*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v67 + 184LL))(v67, v399);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v399, (const struct cocos2d::CCPoint *)&dword_14090A6E8);
v70 = EditorUI::getSpriteButton_1(
a1,
(unsigned int)"edit_editBtn_001.png",
(unsigned int)EditorUI::toggleMode,
v64,
1065353216,
1,
v69,
0);
*(_QWORD *)(a1 + 984) = v70;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v70 + 64LL))(v70, 3);
v71 = *(_QWORD *)((*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 984) + 952LL))(*(_QWORD *)(a1 + 984)) + 640);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v71 + 160LL))(v71);
v72 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v71 + 200LL))(v71);
cocos2d::CCPoint::operator+(v72, v399, v406);
(*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v71 + 184LL))(v71, v399);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v399, (const struct cocos2d::CCPoint *)&dword_14090A6E8);
v74 = EditorUI::getSpriteButton_1(
a1,
(unsigned int)"edit_deleteBtn_001.png",
(unsigned int)EditorUI::toggleMode,
v64,
1065353216,
1,
v73,
0);
*(_QWORD *)(a1 + 968) = v74;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v74 + 64LL))(v74, 1);
v75 = *(_QWORD *)((*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 968) + 952LL))(*(_QWORD *)(a1 + 968)) + 640);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v75 + 160LL))(v75);
v76 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v75 + 200LL))(v75);
cocos2d::CCPoint::operator+(v76, v399, v406);
(*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v75 + 184LL))(v75, v399);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v399, (const struct cocos2d::CCPoint *)&dword_14090A6E8);
v78 = EditorUI::getSpriteButton_1(
a1,
(unsigned int)"edit_viewBtn_001.png",
(unsigned int)EditorUI::toggleMode,
v64,
1065353216,
1,
v77,
0);
*(_QWORD *)(a1 + 992) = v78;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v78 + 64LL))(v78, 4);
v79 = *(_QWORD *)((*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 992) + 952LL))(*(_QWORD *)(a1 + 992)) + 640);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v79 + 160LL))(v79);
v80 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v79 + 200LL))(v79);
cocos2d::CCPoint::operator+(v80, v399, v406);
(*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v79 + 184LL))(v79, v399);
v81 = *(float *)(a1 + 904);
v83 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v82);
v84 = (float)(cocos2d::CCDirector::getScreenBottom(v83) + v81) - 26.0;
v86 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v85);
v87 = (float)(cocos2d::CCDirector::getScreenLeft(v86) + 25.0) + 0.0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v399, v87, v84);
cocos2d::CCNode::convertToNodeSpace(v64, v407, v88);
(*(void (__fastcall **)(_QWORD, char *))(**(_QWORD **)(a1 + 976) + 184LL))(*(_QWORD *)(a1 + 976), v407);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v400, 44.0, 0.0);
cocos2d::CCPoint::operator+(v407, v399, v89);
(*(void (__fastcall **)(_QWORD, char *))(**(_QWORD **)(a1 + 984) + 184LL))(*(_QWORD *)(a1 + 984), v399);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v400, 0.0, -43.0);
cocos2d::CCPoint::operator+(v407, v399, v90);
(*(void (__fastcall **)(_QWORD, char *))(**(_QWORD **)(a1 + 968) + 184LL))(*(_QWORD *)(a1 + 968), v399);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v400, 44.0, -43.0);
cocos2d::CCPoint::operator+(v407, v399, v91);
(*(void (__fastcall **)(_QWORD, char *))(**(_QWORD **)(a1 + 992) + 184LL))(*(_QWORD *)(a1 + 992), v399);
v92 = cocos2d::CCSprite::createWithSpriteFrameName("edit_vLine_001.png");
(*(void (__fastcall **)(__int64, struct cocos2d::CCSprite *, __int64))(*(_QWORD *)a1 + 456LL))(a1, v92, 2);
v93 = *(_QWORD *)v92;
v94 = v43[109] * 0.5;
v96 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v95);
v97 = cocos2d::CCDirector::getScreenBottom(v96) + v94;
v99 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v98);
v100 = (float)(cocos2d::CCDirector::getScreenLeft(v99) + 96.0) + 0.0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v400, v100, v97);
(*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v93 + 184))(v92, v101);
cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(a1 + 688), v92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v400, (const struct cocos2d::CCPoint *)&dword_14090A6E8);
*(_QWORD *)(a1 + 1000) = EditorUI::getSpriteButton_1(
a1,
(unsigned int)"edit_swipeBtn_001.png",
(unsigned int)EditorUI::toggleSwipe,
v64,
1065353216,
1,
v102,
0);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v400, 0.0, -1.0);
v104 = v103;
LODWORD(v92) = (unsigned int)cocos2d::CCSprite::createWithSpriteFrameName("edit_freeMoveBtn_001.png");
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v399, v104);
*(_QWORD *)(a1 + 1008) = EditorUI::getSpriteButton(
a1,
(_DWORD)v92,
(unsigned int)EditorUI::toggleFreeMove,
v64,
1065353216,
1,
v105,
0);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v400, (const struct cocos2d::CCPoint *)&dword_14090A6E8);
*(_QWORD *)(a1 + 1024) = EditorUI::getSpriteButton_1(
a1,
(unsigned int)"edit_snapBtn_001.png",
(unsigned int)EditorUI::toggleSnap,
v64,
1065353216,
1,
v106,
0);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v400, (const struct cocos2d::CCPoint *)&dword_14090A6E8);
v108 = (__int64 *)EditorUI::getSpriteButton_1(
a1,
(unsigned int)"edit_enableRotateBtn_001.png",
(unsigned int)EditorUI::toggleEnableRotate,
v64,
1065353216,
1,
v107,
0);
*(_QWORD *)(a1 + 1032) = v108;
v109 = *v108;
v110 = *(float *)(a1 + 904);
v112 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v111);
v113 = (float)(cocos2d::CCDirector::getScreenBottom(v112) + v110) - 26.0;
v115 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v114);
v116 = (float)(cocos2d::CCDirector::getScreenRight(v115) - 25.0) - 0.0;
v117 = *(_QWORD *)(a1 + 1032);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v400, v116, v113);
cocos2d::CCNode::convertToNodeSpace(v64, v399, v118);
(*(void (__fastcall **)(__int64, __int64))(v109 + 184))(v117, v119);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v400, 0.0, -43.0);
v121 = v120;
v122 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 1032) + 200LL))(*(_QWORD *)(a1 + 1032));
cocos2d::CCPoint::operator+(v122, v399, v121);
(*(void (__fastcall **)(_QWORD, char *))(**(_QWORD **)(a1 + 1024) + 184LL))(*(_QWORD *)(a1 + 1024), v399);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v400, -44.0, 0.0);
v124 = v123;
v125 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 1032) + 200LL))(*(_QWORD *)(a1 + 1032));
cocos2d::CCPoint::operator+(v125, v399, v124);
(*(void (__fastcall **)(_QWORD, char *))(**(_QWORD **)(a1 + 1000) + 184LL))(*(_QWORD *)(a1 + 1000), v399);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v400, -44.0, 0.0);
v127 = v126;
v128 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 1024) + 200LL))(*(_QWORD *)(a1 + 1024));
cocos2d::CCPoint::operator+(v128, v399, v127);
(*(void (__fastcall **)(_QWORD, char *))(**(_QWORD **)(a1 + 1008) + 184LL))(*(_QWORD *)(a1 + 1008), v399);
v129 = cocos2d::CCSprite::createWithSpriteFrameName("edit_vLine_001.png");
(*(void (__fastcall **)(__int64, struct cocos2d::CCSprite *, __int64))(*(_QWORD *)a1 + 456LL))(a1, v129, 2);
v130 = *(_QWORD *)v129;
v131 = v43[109] * 0.5;
v133 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v132);
v134 = cocos2d::CCDirector::getScreenBottom(v133) + v131;
v136 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v135);
v137 = (float)(cocos2d::CCDirector::getScreenRight(v136) - 96.0) - 0.0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v400, v137, v134);
(*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v130 + 184))(v129, v138);
cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(a1 + 688), v129);
v139 = (unsigned int)cocos2d::CCSprite::createWithSpriteFrameName("GJ_undoBtn_001.png");
v140 = CCMenuItemSpriteExtra::create(v139, 0, a1, (__int64)EditorUI::undoLastAction);
*(_QWORD *)(a1 + 1120) = v140;
(*(void (__fastcall **)(__int64, cocos2d::CCObject *))(*(_QWORD *)v64 + 464LL))(v64, v140);
v141 = **(_QWORD **)(a1 + 1120);
v143 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v142);
v144 = cocos2d::CCDirector::getScreenTop(v143) - 20.0;
v146 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v145);
v147 = (float)(cocos2d::CCDirector::getScreenLeft(v146) + 25.0) + 0.0;
v148 = *(_QWORD *)(a1 + 1120);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v400, v147, v144);
cocos2d::CCNode::convertToNodeSpace(v64, v399, v149);
(*(void (__fastcall **)(__int64, __int64))(v141 + 184))(v148, v150);
v151 = (unsigned int)cocos2d::CCSprite::createWithSpriteFrameName("GJ_redoBtn_001.png");
v152 = CCMenuItemSpriteExtra::create(v151, 0, a1, (__int64)EditorUI::redoLastAction);
*(_QWORD *)(a1 + 1128) = v152;
(*(void (__fastcall **)(__int64, cocos2d::CCObject *))(*(_QWORD *)v64 + 464LL))(v64, v152);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v400, 46.0, 0.0);
v154 = v153;
v155 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 1120) + 200LL))(*(_QWORD *)(a1 + 1120));
cocos2d::CCPoint::operator+(v155, v399, v154);
(*(void (__fastcall **)(_QWORD, char *))(**(_QWORD **)(a1 + 1128) + 184LL))(*(_QWORD *)(a1 + 1128), v399);
v156 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_trashBtn_001.png");
LODWORD(v154) = (_DWORD)v156;
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v156 + 160LL))(v156);
v157 = CCMenuItemSpriteExtra::create(v154, 0, a1, (__int64)EditorUI::onDeleteSelected);
*(_QWORD *)(a1 + 1072) = v157;
(*(void (__fastcall **)(__int64, cocos2d::CCObject *))(*(_QWORD *)v64 + 464LL))(v64, v157);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v400, 46.0, 0.0);
v159 = v158;
v160 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 1128) + 200LL))(*(_QWORD *)(a1 + 1128));
cocos2d::CCPoint::operator+(v160, v399, v159);
(*(void (__fastcall **)(_QWORD, char *))(**(_QWORD **)(a1 + 1072) + 184LL))(*(_QWORD *)(a1 + 1072), v399);
v161 = (unsigned int)cocos2d::CCSprite::createWithSpriteFrameName("sideBtn_hide_001.png");
v162 = CCMenuItemSpriteExtra::create(v161, 0, a1, (__int64)EditorUI::onHideUIBtn);
*(_QWORD *)(a1 + 1080) = v162;
(*(void (__fastcall **)(__int64, cocos2d::CCObject *))(*(_QWORD *)v64 + 464LL))(v64, v162);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v400, 41.0, 0.0);
v164 = v163;
v165 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 1072) + 200LL))(*(_QWORD *)(a1 + 1072));
cocos2d::CCPoint::operator+(v165, v399, v164);
(*(void (__fastcall **)(_QWORD, char *))(**(_QWORD **)(a1 + 1080) + 184LL))(*(_QWORD *)(a1 + 1080), v399);
v166 = (unsigned int)cocos2d::CCSprite::createWithSpriteFrameName("GJ_playMusicBtn_001.png");
v167 = CCMenuItemSpriteExtra::create(v166, 0, a1, (__int64)EditorUI::onPlayback);
*(_QWORD *)(a1 + 1040) = v167;
(*(void (__fastcall **)(__int64, cocos2d::CCObject *))(*(_QWORD *)v64 + 464LL))(v64, v167);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v400, 0.0, -45.0);
v169 = v168;
v170 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 1120) + 200LL))(*(_QWORD *)(a1 + 1120));
cocos2d::CCPoint::operator+(v170, v399, v169);
(*(void (__fastcall **)(_QWORD, char *))(**(_QWORD **)(a1 + 1040) + 184LL))(*(_QWORD *)(a1 + 1040), v399);
v171 = (unsigned int)cocos2d::CCSprite::createWithSpriteFrameName("GJ_playEditorBtn_001.png");
v172 = CCMenuItemSpriteExtra::create(v171, 0, a1, (__int64)EditorUI::onPlaytest);
*(_QWORD *)(a1 + 1048) = v172;
(*(void (__fastcall **)(__int64, cocos2d::CCObject *))(*(_QWORD *)v64 + 464LL))(v64, v172);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v400, 0.0, -45.0);
v174 = v173;
v175 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 1040) + 200LL))(*(_QWORD *)(a1 + 1040));
cocos2d::CCPoint::operator+(v175, v399, v174);
(*(void (__fastcall **)(_QWORD, char *))(**(_QWORD **)(a1 + 1048) + 184LL))(*(_QWORD *)(a1 + 1048), v399);
v176 = (unsigned int)cocos2d::CCSprite::createWithSpriteFrameName("GJ_stopEditorBtn_001.png");
v177 = CCMenuItemSpriteExtra::create(v176, 0, a1, (__int64)EditorUI::onStopPlaytest);
*(_QWORD *)(a1 + 1056) = v177;
(*(void (__fastcall **)(__int64, cocos2d::CCObject *))(*(_QWORD *)v64 + 464LL))(v64, v177);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v400, 50.0, 0.0);
v179 = v178;
v180 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 1048) + 200LL))(*(_QWORD *)(a1 + 1048));
cocos2d::CCPoint::operator+(v180, v399, v179);
(*(void (__fastcall **)(_QWORD, char *))(**(_QWORD **)(a1 + 1056) + 184LL))(*(_QWORD *)(a1 + 1056), v399);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 1056) + 336LL))(*(_QWORD *)(a1 + 1056), 0);
v181 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_zoomInBtn_001.png");
LODWORD(v179) = (_DWORD)v181;
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v181 + 160LL))(v181);
v182 = CCMenuItemSpriteExtra::create(v179, 0, a1, (__int64)EditorUI::zoomIn);
(*(void (__fastcall **)(__int64, cocos2d::CCObject *))(*(_QWORD *)v64 + 464LL))(v64, v182);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v400, 0.0, -45.0);
v184 = v183;
v185 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 1048) + 200LL))(*(_QWORD *)(a1 + 1048));
cocos2d::CCPoint::operator+(v185, v399, v184);
(*(void (__fastcall **)(cocos2d::CCObject *, char *))(*(_QWORD *)v182 + 184LL))(v182, v399);
v186 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_zoomOutBtn_001.png");
LODWORD(v184) = (_DWORD)v186;
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v186 + 160LL))(v186);
v187 = CCMenuItemSpriteExtra::create(v184, 0, a1, (__int64)EditorUI::zoomOut);
(*(void (__fastcall **)(__int64, cocos2d::CCObject *))(*(_QWORD *)v64 + 464LL))(v64, v187);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v400, 0.0, -35.0);
v189 = v188;
v190 = (*(__int64 (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)v182 + 200LL))(v182);
cocos2d::CCPoint::operator+(v190, v399, v189);
(*(void (__fastcall **)(cocos2d::CCObject *, char *))(*(_QWORD *)v187 + 184LL))(v187, v399);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v400, 34.0, -17.5);
v192 = v191;
v193 = (*(__int64 (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)v182 + 200LL))(v182);
cocos2d::CCPoint::operator+(v193, v409, v192);
v194 = cocos2d::CCSprite::createWithSpriteFrameName("gj_linkEnableBtn_001.png");
LODWORD(v192) = (_DWORD)v194;
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v194 + 160LL))(v194);
v195 = CCMenuItemSpriteExtra::create(v192, 0, a1, (__int64)EditorUI::onStickyToggle);
*(_QWORD *)(a1 + 1112) = v195;
(*(void (__fastcall **)(__int64, cocos2d::CCObject *))(*(_QWORD *)v64 + 464LL))(v64, v195);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v400, 0.0, 25.0);
cocos2d::CCPoint::operator+(v409, v399, v196);
(*(void (__fastcall **)(_QWORD, char *))(**(_QWORD **)(a1 + 1112) + 184LL))(*(_QWORD *)(a1 + 1112), v399);
v197 = cocos2d::CCSprite::createWithSpriteFrameName("gj_linkBtn_001.png");
LODWORD(v192) = (_DWORD)v197;
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v197 + 160LL))(v197);
v198 = CCMenuItemSpriteExtra::create(v192, 0, a1, (__int64)EditorUI::onGroupSticky);
*(_QWORD *)(a1 + 1096) = v198;
(*(void (__fastcall **)(__int64, cocos2d::CCObject *))(*(_QWORD *)v64 + 464LL))(v64, v198);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v400, 0.0, 0.0);
cocos2d::CCPoint::operator+(v409, v399, v199);
(*(void (__fastcall **)(_QWORD, char *))(**(_QWORD **)(a1 + 1096) + 184LL))(*(_QWORD *)(a1 + 1096), v399);
v200 = cocos2d::CCSprite::createWithSpriteFrameName("gj_linkBtnOff_001.png");
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v200 + 160LL))(v200);
v201 = CCMenuItemSpriteExtra::create((int)v200, 0, a1, (__int64)EditorUI::onUngroupSticky);
*(_QWORD *)(a1 + 1104) = v201;
(*(void (__fastcall **)(__int64, cocos2d::CCObject *))(*(_QWORD *)v64 + 464LL))(v64, v201);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v400, 0.0, -25.0);
cocos2d::CCPoint::operator+(v409, v399, v202);
(*(void (__fastcall **)(_QWORD, char *))(**(_QWORD **)(a1 + 1104) + 184LL))(*(_QWORD *)(a1 + 1104), v399);
v203 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v403 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager(v403);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v203 = qword_14090BFD0;
}
*(_BYTE *)(a1 + 915) = GameManager::getGameVariable(v203, "0097");
v204 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v403 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager(v403);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v204 = qword_14090BFD0;
}
*(_BYTE *)(a1 + 916) = GameManager::getGameVariable(v204, "0180");
if ( !*(_BYTE *)(a1 + 915) )
{
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 1096) + 936LL))(*(_QWORD *)(a1 + 1096), 0);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 1096) + 336LL))(*(_QWORD *)(a1 + 1096), 0);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 1104) + 936LL))(*(_QWORD *)(a1 + 1104), 0);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 1104) + 336LL))(*(_QWORD *)(a1 + 1104), 0);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 1112) + 936LL))(*(_QWORD *)(a1 + 1112), 0);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 1112) + 336LL))(*(_QWORD *)(a1 + 1112), 0);
}
EditorUI::setupDeleteMenu(a1);
EditorUI::setupCreateMenu(a1);
EditorUI::createMoveMenu(a1);
EditorUI::updateEditMenu(a1);
EditorUI::setupViewMenu(a1);
EditorUI::resetUI(a1);
v205 = (unsigned int)cocos2d::CCSprite::createWithSpriteFrameName("GJ_pauseBtn_001.png");
v206 = CCMenuItemSpriteExtra::create(v205, 0, a1, (__int64)EditorUI::onPause);
*(_QWORD *)(a1 + 1064) = v206;
*((_DWORD *)v206 + 103) = 0;
v207 = cocos2d::CCMenu::create(*(struct cocos2d::CCMenuItem **)(a1 + 1064), 0);
(*(void (__fastcall **)(__int64, struct cocos2d::CCMenu *, __int64))(*(_QWORD *)a1 + 456LL))(a1, v207, 10);
v208 = *(_QWORD *)v207;
v210 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v209);
cocos2d::CCDirector::getScreenTop(v210);
v212 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v211);
cocos2d::CCDirector::getScreenRight(v212);
(*(void (__fastcall **)(struct cocos2d::CCMenu *))(v208 + 176))(v207);
EditorUI::toggleMode(a1, *(_QWORD *)(a1 + 976));
v213 = *(__int64 **)(*(_QWORD *)(a1 + 1512) + 4296LL);
v214 = *v213;
v215 = *(float *)(a1 + 900) + 30.0;
v217 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v216);
v218 = cocos2d::CCDirector::getScreenLeft(v217) + 0.0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v403, v218, v215);
(*(void (__fastcall **)(__int64 *, __int64))(v214 + 184))(v213, v219);
EditorUI::constrainGameLayerPosition(a1);
EditorUI::updateSlider(a1);
v220 = (unsigned int)cocos2d::CCSprite::createWithSpriteFrameName("GJ_optionsBtn02_001.png");
v221 = CCMenuItemSpriteExtra::create(v220, 0, a1, (__int64)EditorUI::onSettings);
(*(void (__fastcall **)(struct cocos2d::CCMenu *, cocos2d::CCObject *))(*(_QWORD *)v207 + 464LL))(v207, v221);
v222 = *(_QWORD *)v221;
v224 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v223);
v225 = cocos2d::CCDirector::getScreenTop(v224) - 20.0;
v227 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v226);
v228 = (float)(cocos2d::CCDirector::getScreenRight(v227) - 65.0) - 0.0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v403, v228, v225);
cocos2d::CCNode::convertToNodeSpace(v207, v400, v229);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v222 + 184))(v221, v230);
v231 = (unsigned int)cocos2d::CCSprite::createWithSpriteFrameName("sideBtn_config_001.png");
v232 = CCMenuItemSpriteExtra::create(v231, 0, a1, (__int64)EditorUI::onEditorCommands);
(*(void (__fastcall **)(struct cocos2d::CCMenu *, cocos2d::CCObject *))(*(_QWORD *)v207 + 464LL))(v207, v232);
v233 = *(_QWORD *)v232;
v234 = *(__int64 (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)v221 + 200LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v403, -41.0, 0.0);
v236 = v235;
v237 = v234(v221);
v238 = sub_140191A00((__int64)v400, v237, v236);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v233 + 184))(v232, v238);
v239 = (unsigned int)cocos2d::CCSprite::createWithSpriteFrameName("sideBtn_grid_001.png");
v240 = CCMenuItemSpriteExtra::create(v239, 0, a1, (__int64)EditorUI::onGridSizeIndicator);
(*(void (__fastcall **)(struct cocos2d::CCMenu *, cocos2d::CCObject *))(*(_QWORD *)v207 + 464LL))(v207, v240);
v241 = *(_QWORD *)v240;
v242 = *(__int64 (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)v232 + 200LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v403, -36.0, 0.0);
v244 = v243;
v245 = v242(v232);
v246 = sub_140191A00((__int64)v400, v245, v244);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v241 + 184))(v240, v246);
v248 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v247);
v249 = cocos2d::CCDirector::getScreenTop(v248) - 60.0;
v251 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v250);
ScreenRight = cocos2d::CCDirector::getScreenRight(v251);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v403, (float)(ScreenRight - 24.0) - 0.0, v249);
cocos2d::CCNode::convertToNodeSpace(v207, &v401, v253);
v254 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_duplicateObjectBtn2_001.png");
LODWORD(v244) = (_DWORD)v254;
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v254 + 160LL))(v254);
v255 = CCMenuItemSpriteExtra::create(v244, 0, a1, (__int64)EditorUI::onDuplicate);
*(_QWORD *)(a1 + 1176) = v255;
(*(void (__fastcall **)(struct cocos2d::CCMenu *, cocos2d::CCObject *))(*(_QWORD *)v207 + 464LL))(v207, v255);
(*(void (__fastcall **)(_QWORD, __int64 *))(**(_QWORD **)(a1 + 1176) + 184LL))(*(_QWORD *)(a1 + 1176), &v401);
*(_DWORD *)(*(_QWORD *)(a1 + 1176) + 372LL) = 1067030938;
v256 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_copyBtn2_001.png");
LODWORD(v244) = (_DWORD)v256;
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v256 + 160LL))(v256);
v257 = CCMenuItemSpriteExtra::create(v244, 0, a1, (__int64)EditorUI::onCopy);
*(_QWORD *)(a1 + 1184) = v257;
(*(void (__fastcall **)(struct cocos2d::CCMenu *, cocos2d::CCObject *))(*(_QWORD *)v207 + 464LL))(v207, v257);
v258 = **(_QWORD **)(a1 + 1184);
v259 = *(_QWORD *)(a1 + 1184);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v399, -76.0, 0.0);
v261 = sub_140191A00((__int64)&v403, (__int64)&v401, v260);
(*(void (__fastcall **)(__int64, __int64))(v258 + 184))(v259, v261);
*(_DWORD *)(*(_QWORD *)(a1 + 1184) + 372LL) = 1067030938;
v262 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_pasteBtn2_001.png");
LODWORD(v259) = (_DWORD)v262;
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v262 + 160LL))(v262);
v263 = CCMenuItemSpriteExtra::create(v259, 0, a1, (__int64)EditorUI::onPaste);
*(_QWORD *)(a1 + 1192) = v263;
(*(void (__fastcall **)(struct cocos2d::CCMenu *, cocos2d::CCObject *))(*(_QWORD *)v207 + 464LL))(v207, v263);
v264 = **(_QWORD **)(a1 + 1192);
v265 = *(_QWORD *)(a1 + 1192);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v413, -38.0, 0.0);
v267 = sub_140191A00((__int64)&v403, (__int64)&v401, v266);
(*(void (__fastcall **)(__int64, __int64))(v264 + 184))(v265, v267);
*(_DWORD *)(*(_QWORD *)(a1 + 1192) + 372LL) = 1067030938;
v268 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_editHSVBtn2_001.png");
LODWORD(v265) = (_DWORD)v268;
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v268 + 160LL))(v268);
v269 = CCMenuItemSpriteExtra::create(v265, 0, a1, (__int64)EditorUI::onEditColor);
*(_QWORD *)(a1 + 1152) = v269;
(*(void (__fastcall **)(struct cocos2d::CCMenu *, cocos2d::CCObject *))(*(_QWORD *)v207 + 464LL))(v207, v269);
v270 = **(_QWORD **)(a1 + 1152);
v271 = *(_QWORD *)(a1 + 1152);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v414, -76.0, -105.0);
v273 = sub_140191A00((__int64)v413, (__int64)&v401, v272);
(*(void (__fastcall **)(__int64, __int64))(v270 + 184))(v271, v273);
*(_DWORD *)(*(_QWORD *)(a1 + 1152) + 372LL) = 1067030938;
v274 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_editObjBtn4_001.png");
LODWORD(v271) = (_DWORD)v274;
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v274 + 160LL))(v274);
v275 = CCMenuItemSpriteExtra::create(v271, 0, a1, (__int64)EditorUI::editObject2);
*(_QWORD *)(a1 + 1160) = v275;
(*(void (__fastcall **)(struct cocos2d::CCMenu *, cocos2d::CCObject *))(*(_QWORD *)v207 + 464LL))(v207, v275);
v276 = **(_QWORD **)(a1 + 1160);
v277 = *(_QWORD *)(a1 + 1160);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v415, -76.0, -35.0);
v279 = sub_140191A00((__int64)v414, (__int64)&v401, v278);
(*(void (__fastcall **)(__int64, __int64))(v276 + 184))(v277, v279);
*(_DWORD *)(*(_QWORD *)(a1 + 1160) + 372LL) = 1067030938;
v280 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_editObjBtn3_001.png");
LODWORD(v277) = (_DWORD)v280;
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v280 + 160LL))(v280);
v281 = CCMenuItemSpriteExtra::create(v277, 0, a1, (__int64)EditorUI::editObject);
*(_QWORD *)(a1 + 1136) = v281;
(*(void (__fastcall **)(struct cocos2d::CCMenu *, cocos2d::CCObject *))(*(_QWORD *)v207 + 464LL))(v207, v281);
v282 = **(_QWORD **)(a1 + 1136);
v283 = *(_QWORD *)(a1 + 1136);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v416, 0.0, -35.0);
v285 = sub_140191A00((__int64)v415, (__int64)&v401, v284);
(*(void (__fastcall **)(__int64, __int64))(v282 + 184))(v283, v285);
*(_DWORD *)(*(_QWORD *)(a1 + 1136) + 372LL) = 1067030938;
v286 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_deSelBtn2_001.png");
LODWORD(v283) = (_DWORD)v286;
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v286 + 160LL))(v286);
v287 = CCMenuItemSpriteExtra::create(v283, 0, a1, (__int64)EditorUI::onDeselectAll);
*(_QWORD *)(a1 + 1016) = v287;
(*(void (__fastcall **)(struct cocos2d::CCMenu *, cocos2d::CCObject *))(*(_QWORD *)v207 + 464LL))(v207, v287);
v288 = **(_QWORD **)(a1 + 1016);
v289 = *(_QWORD *)(a1 + 1016);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v417, 0.0, -105.0);
v291 = sub_140191A00((__int64)v416, (__int64)&v401, v290);
(*(void (__fastcall **)(__int64, __int64))(v288 + 184))(v289, v291);
*(_DWORD *)(*(_QWORD *)(a1 + 1016) + 372LL) = 1067030938;
v292 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_groupIDBtn2_001.png");
LODWORD(v289) = (_DWORD)v292;
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v292 + 160LL))(v292);
v293 = CCMenuItemSpriteExtra::create(v289, 0, a1, (__int64)EditorUI::editGroup);
*(_QWORD *)(a1 + 1144) = v293;
(*(void (__fastcall **)(struct cocos2d::CCMenu *, cocos2d::CCObject *))(*(_QWORD *)v207 + 464LL))(v207, v293);
v294 = **(_QWORD **)(a1 + 1144);
v295 = *(_QWORD *)(a1 + 1144);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v418, -38.0, -35.0);
v297 = sub_140191A00((__int64)v417, (__int64)&v401, v296);
(*(void (__fastcall **)(__int64, __int64))(v294 + 184))(v295, v297);
*(_DWORD *)(*(_QWORD *)(a1 + 1144) + 372LL) = 1067030938;
v298 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_copyStateBtn_001.png");
LODWORD(v295) = (_DWORD)v298;
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v298 + 160LL))(v298);
v299 = CCMenuItemSpriteExtra::create(v295, 0, a1, (__int64)EditorUI::onCopyState);
*(_QWORD *)(a1 + 1200) = v299;
(*(void (__fastcall **)(struct cocos2d::CCMenu *, cocos2d::CCObject *))(*(_QWORD *)v207 + 464LL))(v207, v299);
v300 = **(_QWORD **)(a1 + 1200);
v301 = *(_QWORD *)(a1 + 1200);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v419, -76.0, -70.0);
v303 = sub_140191A00((__int64)v418, (__int64)&v401, v302);
(*(void (__fastcall **)(__int64, __int64))(v300 + 184))(v301, v303);
*(_DWORD *)(*(_QWORD *)(a1 + 1200) + 372LL) = 1067030938;
v304 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_pasteStateBtn_001.png");
LODWORD(v301) = (_DWORD)v304;
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v304 + 160LL))(v304);
v305 = CCMenuItemSpriteExtra::create(v301, 0, a1, (__int64)EditorUI::onPasteState);
*(_QWORD *)(a1 + 1208) = v305;
(*(void (__fastcall **)(struct cocos2d::CCMenu *, cocos2d::CCObject *))(*(_QWORD *)v207 + 464LL))(v207, v305);
v306 = **(_QWORD **)(a1 + 1208);
v307 = *(_QWORD *)(a1 + 1208);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v420, -38.0, -70.0);
v309 = sub_140191A00((__int64)v419, (__int64)&v401, v308);
(*(void (__fastcall **)(__int64, __int64))(v306 + 184))(v307, v309);
*(_DWORD *)(*(_QWORD *)(a1 + 1208) + 372LL) = 1067030938;
v310 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_pasteColorBtn_001.png");
LODWORD(v307) = (_DWORD)v310;
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v310 + 160LL))(v310);
v311 = CCMenuItemSpriteExtra::create(v307, 0, a1, (__int64)EditorUI::onPasteColor);
*(_QWORD *)(a1 + 1216) = v311;
(*(void (__fastcall **)(struct cocos2d::CCMenu *, cocos2d::CCObject *))(*(_QWORD *)v207 + 464LL))(v207, v311);
v312 = **(_QWORD **)(a1 + 1216);
v313 = *(_QWORD *)(a1 + 1216);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v410, 0.0, -70.0);
v315 = sub_140191A00((__int64)v420, (__int64)&v401, v314);
(*(void (__fastcall **)(__int64, __int64))(v312 + 184))(v313, v315);
*(_DWORD *)(*(_QWORD *)(a1 + 1216) + 372LL) = 1067030938;
v316 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_goToLayerBtn_001.png");
LODWORD(v313) = (_DWORD)v316;
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v316 + 160LL))(v316);
v317 = CCMenuItemSpriteExtra::create(v313, 0, a1, (__int64)EditorUI::onGoToLayer);
*(_QWORD *)(a1 + 1224) = v317;
(*(void (__fastcall **)(struct cocos2d::CCMenu *, cocos2d::CCObject *))(*(_QWORD *)v207 + 464LL))(v207, v317);
v318 = **(_QWORD **)(a1 + 1224);
v319 = *(_QWORD *)(a1 + 1224);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v411, -38.0, -105.0);
v321 = sub_140191A00((__int64)v410, (__int64)&v401, v320);
(*(void (__fastcall **)(__int64, __int64))(v318 + 184))(v319, v321);
*(_DWORD *)(*(_QWORD *)(a1 + 1224) + 372LL) = 1067030938;
v323 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v322);
v324 = cocos2d::CCDirector::getScreenBottom(v323) + 123.0;
v326 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v325);
v327 = cocos2d::CCDirector::getScreenRight(v326);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v408, (float)(v327 - 46.0) - 0.0, v324);
v328 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_03_001.png");
cocos2d::CCSprite::setFlipX(v328, 1);
(*(void (__fastcall **)(cocos2d::CCSprite *))(*(_QWORD *)v328 + 160LL))(v328);
v329 = CCMenuItemSpriteExtra::create((int)v328, 0, a1, (__int64)EditorUI::onGroupUp);
*(_QWORD *)(a1 + 1336) = v329;
(*(void (__fastcall **)(struct cocos2d::CCMenu *, cocos2d::CCObject *))(*(_QWORD *)v207 + 464LL))(v207, v329);
v330 = **(_QWORD **)(a1 + 1336);
v331 = *(_QWORD *)(a1 + 1336);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v412, 30.0, 0.0);
v333 = sub_140191A00((__int64)v411, (__int64)v408, v332);
cocos2d::CCNode::convertToNodeSpace(v207, v410, v333);
(*(void (__fastcall **)(__int64, __int64))(v330 + 184))(v331, v334);
*(_DWORD *)(*(_QWORD *)(a1 + 1336) + 372LL) = 1067030938;
v335 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_03_001.png");
LODWORD(v331) = (_DWORD)v335;
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v335 + 160LL))(v335);
v336 = CCMenuItemSpriteExtra::create(v331, 0, a1, (__int64)EditorUI::onGroupDown);
*(_QWORD *)(a1 + 1344) = v336;
(*(void (__fastcall **)(struct cocos2d::CCMenu *, cocos2d::CCObject *))(*(_QWORD *)v207 + 464LL))(v207, v336);
v337 = **(_QWORD **)(a1 + 1344);
v338 = *(_QWORD *)(a1 + 1344);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v421, -30.0, 0.0);
v340 = sub_140191A00((__int64)v412, (__int64)v408, v339);
cocos2d::CCNode::convertToNodeSpace(v207, v411, v340);
(*(void (__fastcall **)(__int64, __int64))(v337 + 184))(v338, v341);
*(_DWORD *)(*(_QWORD *)(a1 + 1344) + 372LL) = 1067030938;
v342 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_02_001.png");
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v342 + 160LL))(v342);
LOBYTE(v343) = -81;
(*(void (__fastcall **)(__int64, __int64))(*((_QWORD *)v342 + 40) + 40LL))((__int64)v342 + 320, v343);
v344 = CCMenuItemSpriteExtra::create((int)v342, 0, a1, (__int64)EditorUI::onGoToBaseLayer);
*(_QWORD *)(a1 + 1352) = v344;
(*(void (__fastcall **)(struct cocos2d::CCMenu *, cocos2d::CCObject *))(*(_QWORD *)v207 + 464LL))(v207, v344);
v345 = **(_QWORD **)(a1 + 1352);
v346 = *(_QWORD *)(a1 + 1352);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v422, -58.0, 0.0);
v348 = sub_140191A00((__int64)v421, (__int64)v408, v347);
cocos2d::CCNode::convertToNodeSpace(v207, v412, v348);
(*(void (__fastcall **)(__int64, __int64))(v345 + 184))(v346, v349);
*(_DWORD *)(*(_QWORD *)(a1 + 1352) + 372LL) = 1067030938;
v350 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_plus2Btn_001.png");
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v350 + 160LL))(v350);
LOBYTE(v351) = -56;
(*(void (__fastcall **)(__int64, __int64))(*((_QWORD *)v350 + 40) + 40LL))((__int64)v350 + 320, v351);
v352 = CCMenuItemSpriteExtra::create((int)v350, 0, a1, (__int64)EditorUI::onGoToFreeLayer);
*(_QWORD *)(a1 + 1232) = v352;
(*(void (__fastcall **)(struct cocos2d::CCMenu *, cocos2d::CCObject *))(*(_QWORD *)v207 + 464LL))(v207, v352);
v353 = **(_QWORD **)(a1 + 1232);
v354 = *(_QWORD *)(a1 + 1232);
v355 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 1352) + 200LL))(*(_QWORD *)(a1 + 1352));
(*(void (__fastcall **)(__int64, __int64))(v353 + 184))(v354, v355);
*(_DWORD *)(*(_QWORD *)(a1 + 1232) + 372LL) = 1067030938;
v356 = cocos2d::CCLabelBMFont::create("All", (const char *)&qword_140704F78);
*(_QWORD *)(a1 + 1328) = v356;
(*(void (__fastcall **)(__int64, struct cocos2d::CCLabelBMFont *))(*(_QWORD *)a1 + 464LL))(a1, v356);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 1328) + 160LL))(*(_QWORD *)(a1 + 1328));
cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(a1 + 688), *(struct cocos2d::CCObject **)(a1 + 1328));
(*(void (__fastcall **)(_QWORD, char *))(**(_QWORD **)(a1 + 1328) + 184LL))(*(_QWORD *)(a1 + 1328), v408);
v357 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_03_001.png");
(*(void (__fastcall **)(__int64, _QWORD))(*((_QWORD *)v357 + 40) + 40LL))((__int64)v357 + 320, 0);
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v357 + 136LL))(v357);
v358 = CCMenuItemSpriteExtra::create((int)v357, 0, a1, (__int64)EditorUI::onLockLayer);
(*(void (__fastcall **)(struct cocos2d::CCMenu *, cocos2d::CCObject *))(*(_QWORD *)v207 + 464LL))(v207, v358);
v359 = *(_QWORD *)v358;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v423, -24.5, 1.0);
v361 = v360;
v362 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 1336) + 200LL))(*(_QWORD *)(a1 + 1336));
v363 = sub_140191A00((__int64)v422, v362, v361);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v359 + 184))(v358, v363);
v364 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_lock_001.png");
*(_QWORD *)(a1 + 1648) = v364;
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v364 + 160LL))(v364);
v365 = **(_QWORD **)(a1 + 1648);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v424, 12.0, 5.0);
v367 = v366;
v368 = *(_QWORD *)(a1 + 1648);
v369 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 1328) + 200LL))(*(_QWORD *)(a1 + 1328));
v370 = sub_140191A00((__int64)v423, v369, v367);
(*(void (__fastcall **)(__int64, __int64))(v365 + 184))(v368, v370);
cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(a1 + 688), *(struct cocos2d::CCObject **)(a1 + 1648));
(*(void (__fastcall **)(__int64, _QWORD, __int64))(*(_QWORD *)a1 + 456LL))(a1, *(_QWORD *)(a1 + 1648), 2);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 1648) + 336LL))(*(_QWORD *)(a1 + 1648), 0);
EditorUI::updateGroupIDLabel(a1);
EditorUI::updateButtons(a1);
v371 = cocos2d::CCLabelBMFont::create(" ", "chatFont.fnt");
*(_QWORD *)(a1 + 800) = v371;
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v371 + 160LL))(v371);
v372 = **(_QWORD **)(a1 + 800);
v373 = *(_QWORD *)(a1 + 800);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v425, 0.0, 1.0);
(*(void (__fastcall **)(__int64, __int64))(v372 + 288))(v373, v374);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a1 + 464LL))(a1, *(_QWORD *)(a1 + 800));
v375 = **(_QWORD **)(a1 + 800);
v376 = *(_QWORD *)(a1 + 800);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v426, 52.0, v405 - 50.0);
(*(void (__fastcall **)(__int64, __int64))(v375 + 184))(v376, v377);
v378 = cocos2d::CCLabelBMFont::create("Zoom: 1.00", (const char *)&qword_140704F78);
*(_QWORD *)(a1 + 1600) = v378;
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v378 + 160LL))(v378);
v379 = **(_QWORD **)(a1 + 1600);
v380 = *(_QWORD *)(a1 + 1600);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v427, 0.5, 0.5);
(*(void (__fastcall **)(__int64, __int64))(v379 + 288))(v380, v381);
(*(void (__fastcall **)(__int64, _QWORD, __int64))(*(_QWORD *)a1 + 456LL))(a1, *(_QWORD *)(a1 + 1600), 5);
v382 = **(_QWORD **)(a1 + 1600);
v383 = *(_QWORD *)(a1 + 1600);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v428, v404 * 0.5, v405 - 60.0);
(*(void (__fastcall **)(__int64, __int64))(v382 + 184))(v383, v384);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)(*(_QWORD *)(a1 + 1600) + 368LL) + 40LL))(
*(_QWORD *)(a1 + 1600) + 368LL,
0);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 1600) + 336LL))(*(_QWORD *)(a1 + 1600), 0);
cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(a1 + 688), *(struct cocos2d::CCObject **)(a1 + 1600));
*(_QWORD *)(a1 + 744) = -1;
*(_DWORD *)(a1 + 752) = -1;
*(_DWORD *)(a1 + 760) = -1;
v385 = GameManager::sharedState();
*(_BYTE *)(a1 + 908) = GameManager::getGameVariable(v385, "0003") ^ 1;
v386 = GameManager::sharedState();
*(_BYTE *)(a1 + 912) = GameManager::getGameVariable(v386, "0004") ^ 1;
GameManager::sharedState();
GameManager::toggleGameVariable(v387, "0008");
GameManager::sharedState();
GameManager::toggleGameVariable(v388, "0007");
EditorUI::toggleSwipe(a1, 0);
EditorUI::toggleFreeMove(a1, 0);
EditorUI::toggleSnap(a1, 0);
EditorUI::toggleEnableRotate(a1, 0);
v389 = MusicDownloadManager::sharedState();
MusicDownloadManager::addMusicDownloadDelegate(v389, a1 + 448);
EditorUI::toggleObjectInfoLabel(a1);
v390 = *(cocos2d::CCArray **)(a1 + 688);
v391 = (struct cocos2d::CCArray *)(*(__int64 (__fastcall **)(void *))(*(_QWORD *)v402 + 480LL))(v402);
cocos2d::CCArray::addObjectsFromArray(v390, v391);
v392 = *(cocos2d::CCArray **)(a1 + 688);
v393 = (struct cocos2d::CCArray *)(*(__int64 (__fastcall **)(struct cocos2d::CCMenu *))(*(_QWORD *)v207 + 480LL))(v207);
cocos2d::CCArray::addObjectsFromArray(v392, v393);
cocos2d::CCArray::removeObject(*(cocos2d::CCArray **)(a1 + 688), *(struct cocos2d::CCObject **)(a1 + 1064), 1);
cocos2d::CCArray::removeObject(*(cocos2d::CCArray **)(a1 + 688), *(struct cocos2d::CCObject **)(a1 + 1048), 1);
cocos2d::CCArray::removeObject(*(cocos2d::CCArray **)(a1 + 688), *(struct cocos2d::CCObject **)(a1 + 1056), 1);
v394 = cocos2d::CCSprite::createWithSpriteFrameName("hideBtn_001.png");
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v394 + 160LL))(v394);
LOBYTE(v395) = 125;
(*(void (__fastcall **)(__int64, __int64))(*((_QWORD *)v394 + 40) + 40LL))((__int64)v394 + 320, v395);
v396 = CCMenuItemSpriteExtra::create((int)v394, 0, a1, (__int64)EditorUI::onShowUIBtn);
*(_QWORD *)(a1 + 1088) = cocos2d::CCMenu::createWithItem(v396);
v397 = *(_QWORD *)v396;
v398 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 1080) + 200LL))(*(_QWORD *)(a1 + 1080));
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v397 + 184))(v396, v398);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 1088) + 336LL))(*(_QWORD *)(a1 + 1088), 0);
(*(void (__fastcall **)(__int64, _QWORD, __int64))(*(_QWORD *)a1 + 456LL))(a1, *(_QWORD *)(a1 + 1088), 100);
return 1;
}
return result;
}