//
// LevelSettingsLayer::init from 0x14031ea20 to 0x140320f24 (9476 bytes)
//
// 2 xrefs:
// > LevelSettingsLayer::create @ 0x14031e9dd
// > ??> @ 0x1406d4bc8
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
// Hidden C++ exception states: #wind=12
bool LevelSettingsLayer::init(LevelSettingsLayer *a1, LevelSettingsObject *a2, LevelEditorLayer *a3)
{
LevelSettingsObject *v4; // rsi
LevelSettingsLayer *v5; // r13
bool result; // al
__int64 m_startSpeed; // rcx
cocos2d::CCDirector *v8; // rax
struct cocos2d::CCRect *v9; // rax
struct cocos2d::extension::CCScale9Sprite *v10; // rdi
cocos2d::extension::CCScale9Sprite_vtbl *v11; // rbx
const cocos2d::CCSize *v12; // rax
float v13; // xmm0_4
cocos2d::extension::CCScale9Sprite_vtbl *v14; // rbx
double v15; // xmm0_8
const cocos2d::CCPoint *v16; // rax
__int64 v17; // rcx
__int64 v18; // rax
struct cocos2d::CCLabelBMFont *v19; // rdi
float v20; // xmm0_4
cocos2d::CCLabelBMFont_vtbl *v21; // rbx
double v22; // xmm0_8
const cocos2d::CCPoint *v23; // rax
struct cocos2d::CCLabelBMFont *v24; // rsi
struct cocos2d::CCLabelBMFont *v25; // r14
struct cocos2d::CCLabelBMFont *v26; // r15
struct cocos2d::CCLabelBMFont *v27; // r12
struct cocos2d::CCLabelBMFont *v28; // r13
struct cocos2d::CCLabelBMFont *v29; // rbx
struct cocos2d::CCLabelBMFont *v30; // rbx
cocos2d::CCLabelBMFont_vtbl *v31; // rbx
__int64 v32; // rax
float v33; // xmm0_4
cocos2d::CCLabelBMFont_vtbl *v34; // rbx
__int64 v35; // rax
float v36; // xmm0_4
cocos2d::CCLabelBMFont_vtbl *v37; // rbx
__int64 v38; // rax
float v39; // xmm0_4
cocos2d::CCLabelBMFont_vtbl *v40; // rbx
__int64 v41; // rax
float v42; // xmm0_4
cocos2d::CCLabelBMFont_vtbl *v43; // rbx
__int64 v44; // rax
float v45; // xmm0_4
struct cocos2d::CCLabelBMFont *v46; // rdi
cocos2d::CCLabelBMFont_vtbl *v47; // rbx
__int64 v48; // rax
float v49; // xmm0_4
struct cocos2d::CCLabelBMFont *v50; // rdi
cocos2d::CCLabelBMFont_vtbl *v51; // rbx
double v52; // xmm0_8
const cocos2d::CCPoint *v53; // rax
ColorChannelSprite *v54; // rax
cocos2d::CCPoint v55; // rbx
ColorChannelSprite *v56; // rax
CCMenuItemSpriteExtra *v57; // rdi
ColorChannelSprite *v58; // rax
CCMenuItemSpriteExtra *v59; // rdi
ColorChannelSprite *v60; // rax
CCMenuItemSpriteExtra *v61; // rdi
ColorChannelSprite *v62; // rax
CCMenuItemSpriteExtra *v63; // rdi
ColorChannelSprite *v64; // rax
CCMenuItemSpriteExtra *v65; // rdi
struct cocos2d::CCSprite *v66; // rax
struct cocos2d::CCLabelBMFont *v67; // rdi
cocos2d::CCLabelBMFont_vtbl *v68; // rbx
float *v69; // rax
const cocos2d::CCPoint *v70; // rax
CCMenuItemSpriteExtra *v71; // rdi
float v72; // xmm0_4
__int64 v73; // rax
CCMenuItemSpriteExtra_vtbl *v74; // rbx
struct cocos2d::CCPoint v75; // rax
float v76; // xmm0_4
__int64 v77; // rax
CCMenuItemSpriteExtra *v78; // r14
CCMenuItemSpriteExtra_vtbl *v79; // rbx
struct cocos2d::CCPoint v80; // rax
float v81; // xmm0_4
__int64 v82; // rax
cocos2d::CCPoint origin; // r14
__int64 v84; // rbx
struct cocos2d::CCPoint v85; // rax
float v86; // xmm0_4
__int64 v87; // rax
__int64 *v88; // r12
__int64 v89; // rbx
struct cocos2d::CCPoint v90; // rax
float v91; // xmm0_4
__int64 v92; // rax
cocos2d::CCSize v93; // rsi
__int64 v94; // rbx
struct cocos2d::CCPoint v95; // rax
float v96; // xmm0_4
__int64 v97; // rax
cocos2d::CCPoint v98; // r14
__int64 v99; // rbx
struct cocos2d::CCPoint v100; // rax
float v101; // xmm0_4
__int64 v102; // rax
CCMenuItemSpriteExtra_vtbl *v103; // rbx
struct cocos2d::CCPoint v104; // rax
int i; // r14d
unsigned int v106; // r15d
float v107; // xmm6_4
cocos2d::CCPoint v108; // rcx
__int64 v109; // rax
__int64 v110; // rax
__int64 v111; // rax
cocos2d::CCPoint v112; // rcx
__int64 v113; // rax
__int64 v114; // rax
struct cocos2d::CCSprite *v115; // rsi
__int64 v116; // rdx
struct cocos2d::CCLabelBMFont *v117; // rdi
__int64 v118; // rdx
float v119; // xmm0_4
struct cocos2d::CCPoint v120; // rax
CCMenuItemSpriteExtra *v121; // rbx
float v122; // xmm0_4
struct cocos2d::CCLabelBMFont *v123; // rbx
float v124; // xmm0_4
ButtonSprite *v125; // rbx
CCMenuItemSpriteExtra *v126; // rax
float v127; // xmm0_4
CCMenuItemSpriteExtra_vtbl *v128; // rbx
struct cocos2d::CCPoint v129; // rax
ButtonSprite *v130; // rbx
CCMenuItemSpriteExtra *v131; // rax
float v132; // xmm0_4
CCMenuItemSpriteExtra_vtbl *v133; // rbx
struct cocos2d::CCPoint v134; // rax
float v135; // xmm8_4
float v136; // xmm7_4
struct cocos2d::CCLabelBMFont *v137; // r14
float v138; // xmm0_4
cocos2d::CCLabelBMFont_vtbl *v139; // rbx
const cocos2d::CCPoint *v140; // rax
int m_backgroundIndex; // edx
cocos2d::CCString *v142; // rax
const char *CString; // rax
struct cocos2d::CCSprite *v144; // rax
CCMenuItemSpriteExtra *v145; // rdi
float v146; // xmm0_4
__int64 v147; // rax
CCMenuItemSpriteExtra_vtbl *v148; // rbx
struct cocos2d::CCPoint v149; // rax
struct cocos2d::CCLabelBMFont *v150; // r14
float v151; // xmm0_4
cocos2d::CCLabelBMFont_vtbl *v152; // rbx
const cocos2d::CCPoint *v153; // rax
int m_groundIndex; // edx
cocos2d::CCString *v155; // rax
const char *v156; // rax
struct cocos2d::CCSprite *v157; // rax
CCMenuItemSpriteExtra *v158; // rdi
float v159; // xmm0_4
__int64 v160; // rax
CCMenuItemSpriteExtra_vtbl *v161; // rbx
struct cocos2d::CCPoint v162; // rax
struct cocos2d::CCLabelBMFont *v163; // r14
float v164; // xmm0_4
cocos2d::CCLabelBMFont_vtbl *v165; // rbx
const cocos2d::CCPoint *v166; // rax
int m_middleGroundIndex; // edx
cocos2d::CCString *v168; // rax
const char *v169; // rax
struct cocos2d::CCSprite *v170; // rax
CCMenuItemSpriteExtra *v171; // rdi
float v172; // xmm0_4
__int64 v173; // rax
CCMenuItemSpriteExtra_vtbl *v174; // rbx
struct cocos2d::CCPoint v175; // rax
ButtonSprite *v176; // rbx
CCMenuItemSpriteExtra *v177; // rdi
float v178; // xmm0_4
double v179; // xmm0_8
__int64 v180; // rax
CCMenuItemSpriteExtra_vtbl *v181; // rbx
struct cocos2d::CCPoint v182; // rax
ButtonSprite *v183; // rbx
CCMenuItemSpriteExtra *v184; // rdi
float v185; // xmm0_4
CCMenuItemSpriteExtra_vtbl *v186; // rbx
double v187; // xmm0_8
struct cocos2d::CCPoint v188; // rax
GJGameLevel *m_level; // rcx
int m_songID; // ebx
bool v191; // di
double v192; // xmm0_8
cocos2d::CCPoint v193; // rax
SongSelectNode *v194; // rax
struct cocos2d::CCLabelBMFont *v195; // rdi
float v196; // xmm0_4
cocos2d::CCLabelBMFont_vtbl *v197; // rbx
const cocos2d::CCPoint *v198; // rax
__int64 v199; // rax
int v200; // r9d
int v201; // r8d
bool m_resetCamera; // r12
cocos2d::CCObject *m_mainLayer; // r15
double v204; // xmm0_8
cocos2d::CCNode *m_buttonMenu; // r14
const char *v206; // rsi
float *v207; // rax
float *v208; // rbx
struct cocos2d::CCPoint v209; // rax
CCMenuItemToggler *ToggleButton; // rbx
float v211; // xmm0_4
struct cocos2d::CCLabelBMFont *v212; // rbx
float v213; // xmm0_4
struct cocos2d::CCRect *v214; // rax
struct cocos2d::extension::CCScale9Sprite *v215; // rdi
__int64 v216; // rdx
const char *v217; // r9
CCTextInputNode *v218; // rax
CCTextInputNode *m_orderInput; // rcx
CCTextInputNode *v220; // rcx
void **p_m_allowedChars; // rcx
CCTextInputNode *v222; // rcx
CCTextInputNode *v223; // rcx
signed int m_targetOrder; // edx
_QWORD *v225; // rax
struct cocos2d::CCLabelBMFont *v226; // rbx
float v227; // xmm0_4
struct cocos2d::CCRect *v228; // rax
struct cocos2d::extension::CCScale9Sprite *v229; // rdi
__int64 v230; // rdx
const char *v231; // r9
CCTextInputNode *v232; // rax
CCTextInputNode *m_channelInput; // rcx
CCTextInputNode *v234; // rcx
void **v235; // rcx
CCTextInputNode *v236; // rcx
CCTextInputNode *v237; // rcx
signed int m_targetChannel; // edx
_QWORD *v239; // rax
struct cocos2d::CCLabelBMFont *v240; // rsi
Speed v241; // edx
__int32 v242; // edx
__int32 v243; // edx
int v244; // edx
__int64 v245; // r8
const char *v246; // rcx
cocos2d::CCNode *m_speedSprite; // rbx
CCMenuItemSpriteExtra *v248; // rdi
float v249; // xmm0_4
__int64 v250; // rax
CCMenuItemSpriteExtra_vtbl *v251; // rbx
struct cocos2d::CCPoint v252; // rax
float v253; // xmm0_4
struct cocos2d::CCLabelBMFont *v254; // rsi
const char *v255; // rcx
cocos2d::CCNode *m_modeSprite; // rbx
CCMenuItemSpriteExtra *v257; // rdi
float v258; // xmm0_4
__int64 v259; // rax
CCMenuItemSpriteExtra_vtbl *v260; // rbx
struct cocos2d::CCPoint v261; // rax
float v262; // xmm0_4
struct cocos2d::CCLabelBMFont *v263; // rsi
struct cocos2d::CCSprite *v264; // rbx
CCMenuItemSpriteExtra *v265; // rdi
float v266; // xmm0_4
__int64 v267; // rax
CCMenuItemSpriteExtra_vtbl *v268; // rbx
struct cocos2d::CCPoint v269; // rax
int v270; // [rsp+28h] [rbp-E0h]
int v271; // [rsp+28h] [rbp-E0h]
float v272; // [rsp+88h] [rbp-80h]
LevelSettingsLayer *v273; // [rsp+90h] [rbp-78h] BYREF
LevelSettingsObject *v274; // [rsp+98h] [rbp-70h] BYREF
CCMenuItemSpriteExtra *v275; // [rsp+A0h] [rbp-68h] BYREF
cocos2d::CCRect v276; // [rsp+A8h] [rbp-60h] BYREF
__int64 *v277; // [rsp+B8h] [rbp-50h] BYREF
__int128 *v278; // [rsp+C0h] [rbp-48h] BYREF
cocos2d::CCPoint v279; // [rsp+C8h] [rbp-40h] BYREF
__int64 *v280; // [rsp+D0h] [rbp-38h] BYREF
struct cocos2d::CCLabelBMFont *v281; // [rsp+D8h] [rbp-30h]
__int64 *v282; // [rsp+E0h] [rbp-28h] BYREF
struct cocos2d::CCLabelBMFont *v283; // [rsp+E8h] [rbp-20h]
CCMenuItemSpriteExtra *v284; // [rsp+F0h] [rbp-18h]
cocos2d::CCRect v285; // [rsp+F8h] [rbp-10h] BYREF
_QWORD Src[4]; // [rsp+108h] [rbp+0h] BYREF
_QWORD v287[4]; // [rsp+128h] [rbp+20h] BYREF
cocos2d::CCPoint v288; // [rsp+148h] [rbp+40h] BYREF
cocos2d::CCPoint v289; // [rsp+150h] [rbp+48h] BYREF
cocos2d::CCPoint v290; // [rsp+158h] [rbp+50h] BYREF
_QWORD v291[4]; // [rsp+160h] [rbp+58h] BYREF
__int128 v292; // [rsp+180h] [rbp+78h] BYREF
__int64 v293; // [rsp+190h] [rbp+88h]
unsigned __int64 v294; // [rsp+198h] [rbp+90h]
v4 = a2;
v274 = a2;
v5 = a1;
v273 = a1;
result = FLAlertLayer::init_1(a1, 150);
if ( result )
{
v5->m_editorLayer = a3;
v5->m_noElasticity = 1;
v5->m_settingsObject = v4;
cocos2d::CCObject::retain(v4);
m_startSpeed = (unsigned int)v5->m_settingsObject->m_startSpeed;
v5->m_speed = m_startSpeed;
v8 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(m_startSpeed);
cocos2d::CCDirector::getWinSize(v8);
cocos2d::CCRect::CCRect(&v276, 0.0, 0.0, 80.0, 80.0);
v10 = cocos2d::extension::CCScale9Sprite::create("GJ_square01.png", v9);
v11 = v10->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v277, 455.0, 305.0);
v11->setContentSize(v10, v12);
v13 = ((float (__fastcall *)(cocos2d::CCLayer *, struct cocos2d::extension::CCScale9Sprite *, __int64))v5->m_mainLayer->addChild_0)(
v5->m_mainLayer,
v10,
4294967294LL);
v14 = v10->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
v15 = cocos2d::CCPoint::CCPoint(v13, v272 * 0.5);
v14->setPosition_0(v10, v16);
v18 = cocos2d::CCMenu::create(v17);
v5->m_buttonMenu = (cocos2d::CCMenu *)v18;
v5->m_mainLayer->addChild_0(v5->m_mainLayer, (cocos2d::CCNode *)v18, 10);
if ( !v4->m_startsWithStartPos )
{
v19 = cocos2d::CCLabelBMFont::create("Select Color:", "goldFont.fnt");
((void (__fastcall *)(struct cocos2d::CCLabelBMFont *))v19->setScale_0)(v19);
v20 = ((float (__fastcall *)(cocos2d::CCLayer *, struct cocos2d::CCLabelBMFont *))v5->m_mainLayer->addChild_1)(
v5->m_mainLayer,
v19);
v21 = v19->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
v22 = cocos2d::CCPoint::CCPoint(v20, v272 * 0.5);
v21->setPosition_0(v19, v23);
v24 = cocos2d::CCLabelBMFont::create("BG:", (const char *)&qword_14052A4D8);
((void (__fastcall *)(struct cocos2d::CCLabelBMFont *))v24->setScale_0)(v24);
v5->m_mainLayer->addChild_1(v5->m_mainLayer, v24);
v25 = cocos2d::CCLabelBMFont::create("G:", (const char *)&qword_14052A4D8);
((void (__fastcall *)(struct cocos2d::CCLabelBMFont *))v25->setScale_0)(v25);
v5->m_mainLayer->addChild_1(v5->m_mainLayer, v25);
v26 = cocos2d::CCLabelBMFont::create("G2:", (const char *)&qword_14052A4D8);
((void (__fastcall *)(struct cocos2d::CCLabelBMFont *))v26->setScale_0)(v26);
v5->m_mainLayer->addChild_1(v5->m_mainLayer, v26);
v27 = cocos2d::CCLabelBMFont::create("Line:", (const char *)&qword_14052A4D8);
((void (__fastcall *)(struct cocos2d::CCLabelBMFont *))v27->setScale_0)(v27);
v5->m_mainLayer->addChild_1(v5->m_mainLayer, v27);
v28 = cocos2d::CCLabelBMFont::create("MG:", (const char *)&qword_14052A4D8);
((void (__fastcall *)(struct cocos2d::CCLabelBMFont *))v28->setScale_0)(v28);
v273->m_mainLayer->addChild_1(v273->m_mainLayer, v28);
v29 = cocos2d::CCLabelBMFont::create("MG2:", (const char *)&qword_14052A4D8);
v283 = v29;
((void (__fastcall *)(struct cocos2d::CCLabelBMFont *))v29->setScale_0)(v29);
v273->m_mainLayer->addChild_1(v273->m_mainLayer, v29);
v30 = cocos2d::CCLabelBMFont::create("More:", (const char *)&qword_14052A4D8);
v281 = v30;
((void (__fastcall *)(struct cocos2d::CCLabelBMFont *))v30->setScale_0)(v30);
v273->m_mainLayer->addChild_1(v273->m_mainLayer, v30);
v19->getPosition_0(v19);
v31 = v24->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
cocos2d::CCPoint::CCPoint(*(float *)&v22, (float)(v272 * 0.5) - 138.0);
v33 = ((float (__fastcall *)(struct cocos2d::CCLabelBMFont *, __int64))v31->setPosition_0)(v24, v32);
v34 = v25->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
cocos2d::CCPoint::CCPoint(v33, (float)(v272 * 0.5) - 92.0);
v36 = ((float (__fastcall *)(struct cocos2d::CCLabelBMFont *, __int64))v34->setPosition_0)(v25, v35);
v37 = v26->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
cocos2d::CCPoint::CCPoint(v36, (float)(v272 * 0.5) - 46.0);
v39 = ((float (__fastcall *)(struct cocos2d::CCLabelBMFont *, __int64))v37->setPosition_0)(v26, v38);
v40 = v27->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
cocos2d::CCPoint::CCPoint(v39, (float)(v272 * 0.5) - 0.0);
v42 = ((float (__fastcall *)(struct cocos2d::CCLabelBMFont *, __int64))v40->setPosition_0)(v27, v41);
v43 = v28->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
cocos2d::CCPoint::CCPoint(v42, (float)(v272 * 0.5) + 46.0);
v45 = ((float (__fastcall *)(struct cocos2d::CCLabelBMFont *, __int64))v43->setPosition_0)(v28, v44);
v46 = v283;
v47 = v283->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
cocos2d::CCPoint::CCPoint(v45, (float)(v272 * 0.5) + 92.0);
v49 = ((float (__fastcall *)(struct cocos2d::CCLabelBMFont *, __int64))v47->setPosition_0)(v46, v48);
v50 = v281;
v51 = v281->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
v52 = cocos2d::CCPoint::CCPoint(v49, (float)(v272 * 0.5) + 138.0);
v51->setPosition_0(v50, v53);
v54 = ColorChannelSprite::create();
v55 = (cocos2d::CCPoint)v273;
v273->m_bgColorSprite = v54;
((void (__fastcall *)(ColorChannelSprite *))v54->setScale_0)(v54);
v275 = CCMenuItemSpriteExtra::create(
*(cocos2d::CCNode **)(*(_QWORD *)&v55 + 696LL),
nullptr,
*(cocos2d::CCObject **)&v55,
(cocos2d::SEL_MenuHandler *)LevelSettingsLayer::onShowPicker);
v275->setTag(v275, 1000);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(*(_QWORD *)&v55 + 696LL) + 64LL))(
*(_QWORD *)(*(_QWORD *)&v55 + 696LL),
1000);
(*(void (__fastcall **)(_QWORD, CCMenuItemSpriteExtra *))(**(_QWORD **)(*(_QWORD *)&v55 + 544LL) + 448LL))(
*(_QWORD *)(*(_QWORD *)&v55 + 544LL),
v275);
v56 = ColorChannelSprite::create();
*(_QWORD *)(*(_QWORD *)&v55 + 704LL) = v56;
((void (__fastcall *)(ColorChannelSprite *))v56->setScale_0)(v56);
v57 = CCMenuItemSpriteExtra::create(
*(cocos2d::CCNode **)(*(_QWORD *)&v55 + 704LL),
nullptr,
*(cocos2d::CCObject **)&v55,
(cocos2d::SEL_MenuHandler *)LevelSettingsLayer::onShowPicker);
v284 = v57;
v57->setTag(v57, 1001);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(*(_QWORD *)&v55 + 704LL) + 64LL))(
*(_QWORD *)(*(_QWORD *)&v55 + 704LL),
1001);
(*(void (__fastcall **)(_QWORD, CCMenuItemSpriteExtra *))(**(_QWORD **)(*(_QWORD *)&v55 + 544LL) + 448LL))(
*(_QWORD *)(*(_QWORD *)&v55 + 544LL),
v57);
v58 = ColorChannelSprite::create();
*(_QWORD *)(*(_QWORD *)&v55 + 712LL) = v58;
((void (__fastcall *)(ColorChannelSprite *))v58->setScale_0)(v58);
v59 = CCMenuItemSpriteExtra::create(
*(cocos2d::CCNode **)(*(_QWORD *)&v55 + 712LL),
nullptr,
*(cocos2d::CCObject **)&v55,
(cocos2d::SEL_MenuHandler *)LevelSettingsLayer::onShowPicker);
v285.origin = (cocos2d::CCPoint)v59;
v59->setTag(v59, 1009);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(*(_QWORD *)&v55 + 712LL) + 64LL))(
*(_QWORD *)(*(_QWORD *)&v55 + 712LL),
1009);
(*(void (__fastcall **)(_QWORD, CCMenuItemSpriteExtra *))(**(_QWORD **)(*(_QWORD *)&v55 + 544LL) + 448LL))(
*(_QWORD *)(*(_QWORD *)&v55 + 544LL),
v59);
v60 = ColorChannelSprite::create();
*(_QWORD *)(*(_QWORD *)&v55 + 720LL) = v60;
((void (__fastcall *)(ColorChannelSprite *))v60->setScale_0)(v60);
v61 = CCMenuItemSpriteExtra::create(
*(cocos2d::CCNode **)(*(_QWORD *)&v55 + 720LL),
nullptr,
*(cocos2d::CCObject **)&v55,
(cocos2d::SEL_MenuHandler *)LevelSettingsLayer::onShowPicker);
v277 = (__int64 *)v61;
v61->setTag(v61, 1002);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(*(_QWORD *)&v55 + 720LL) + 64LL))(
*(_QWORD *)(*(_QWORD *)&v55 + 720LL),
1002);
(*(void (__fastcall **)(_QWORD, CCMenuItemSpriteExtra *))(**(_QWORD **)(*(_QWORD *)&v55 + 544LL) + 448LL))(
*(_QWORD *)(*(_QWORD *)&v55 + 544LL),
v61);
v62 = ColorChannelSprite::create();
*(_QWORD *)(*(_QWORD *)&v55 + 728LL) = v62;
((void (__fastcall *)(ColorChannelSprite *))v62->setScale_0)(v62);
v63 = CCMenuItemSpriteExtra::create(
*(cocos2d::CCNode **)(*(_QWORD *)&v55 + 728LL),
nullptr,
*(cocos2d::CCObject **)&v55,
(cocos2d::SEL_MenuHandler *)LevelSettingsLayer::onShowPicker);
v280 = (__int64 *)v63;
v63->setTag(v63, 1013);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(*(_QWORD *)&v55 + 728LL) + 64LL))(
*(_QWORD *)(*(_QWORD *)&v55 + 728LL),
1013);
(*(void (__fastcall **)(_QWORD, CCMenuItemSpriteExtra *))(**(_QWORD **)(*(_QWORD *)&v55 + 544LL) + 448LL))(
*(_QWORD *)(*(_QWORD *)&v55 + 544LL),
v63);
v64 = ColorChannelSprite::create();
*(_QWORD *)(*(_QWORD *)&v55 + 736LL) = v64;
((void (__fastcall *)(ColorChannelSprite *))v64->setScale_0)(v64);
v65 = CCMenuItemSpriteExtra::create(
*(cocos2d::CCNode **)(*(_QWORD *)&v55 + 736LL),
nullptr,
*(cocos2d::CCObject **)&v55,
(cocos2d::SEL_MenuHandler *)LevelSettingsLayer::onShowPicker);
v282 = (__int64 *)v65;
v65->setTag(v65, 1014);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(*(_QWORD *)&v55 + 736LL) + 64LL))(
*(_QWORD *)(*(_QWORD *)&v55 + 736LL),
1014);
(*(void (__fastcall **)(_QWORD, CCMenuItemSpriteExtra *))(**(_QWORD **)(*(_QWORD *)&v55 + 544LL) + 448LL))(
*(_QWORD *)(*(_QWORD *)&v55 + 544LL),
v65);
v66 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_colorBtn_001.png");
*(_QWORD *)(*(_QWORD *)&v55 + 744LL) = v66;
((void (__fastcall *)(struct cocos2d::CCSprite *))v66->setScale_0)(v66);
(**(void (__fastcall ***)(__int64, void *))(*(_QWORD *)(*(_QWORD *)&v55 + 744LL) + 320LL))(
*(_QWORD *)(*(_QWORD *)&v55 + 744LL) + 320LL,
&unk_140529B74);
v67 = cocos2d::CCLabelBMFont::create("+", (const char *)&qword_14052A4D8);
(*(void (__fastcall **)(_QWORD, struct cocos2d::CCLabelBMFont *, __int64))(**(_QWORD **)(*(_QWORD *)&v55 + 744LL)
+ 440LL))(
*(_QWORD *)(*(_QWORD *)&v55 + 744LL),
v67,
1);
v68 = v67->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
v273->m_moreColorsSprite->getContentSize(v273->m_moreColorsSprite);
v69 = (float *)v273->m_moreColorsSprite->getContentSize(v273->m_moreColorsSprite);
cocos2d::CCPoint::CCPoint(*(float *)&v52, (float)(*v69 * 0.5) + 1.0);
v68->setPosition_0(v67, v70);
v71 = CCMenuItemSpriteExtra::create(
v273->m_moreColorsSprite,
nullptr,
v273,
(cocos2d::SEL_MenuHandler *)LevelSettingsLayer::onCol);
v72 = ((float (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))v273->m_buttonMenu->addChild_1)(
v273->m_buttonMenu,
v71);
cocos2d::CCPoint::CCPoint(v72, 0.0);
v73 = (__int64)v24->getPosition_0(v24);
cocos2d::CCPoint::operator+(v73, &v279);
v74 = v275->cocos2d::CCMenuItemSprite::cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
v75 = cocos2d::CCNode::convertToNodeSpace(v273->m_buttonMenu, &v276.origin);
v76 = ((float (__fastcall *)(CCMenuItemSpriteExtra *, struct cocos2d::CCPoint))v74->setPosition_0)(v275, v75);
cocos2d::CCPoint::CCPoint(v76, 0.0);
v77 = (__int64)v25->getPosition_0(v25);
cocos2d::CCPoint::operator+(v77, &v279);
v78 = v284;
v79 = v284->cocos2d::CCMenuItemSprite::cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
v80 = cocos2d::CCNode::convertToNodeSpace(v273->m_buttonMenu, (const struct cocos2d::CCPoint *)&v278);
v81 = ((float (__fastcall *)(CCMenuItemSpriteExtra *, struct cocos2d::CCPoint))v79->setPosition_0)(v78, v80);
cocos2d::CCPoint::CCPoint(v81, 0.0);
v82 = (__int64)v26->getPosition_0(v26);
cocos2d::CCPoint::operator+(v82, &v279);
origin = v285.origin;
v84 = **(_QWORD **)&v285.origin;
v85 = cocos2d::CCNode::convertToNodeSpace(v273->m_buttonMenu, (const struct cocos2d::CCPoint *)&v278);
v86 = (*(float (__fastcall **)(cocos2d::CCPoint, struct cocos2d::CCPoint))(v84 + 184))(origin, v85);
cocos2d::CCPoint::CCPoint(v86, 0.0);
v87 = (__int64)v27->getPosition_0(v27);
cocos2d::CCPoint::operator+(v87, &v279);
v88 = v277;
v89 = *v277;
v90 = cocos2d::CCNode::convertToNodeSpace(v273->m_buttonMenu, (const struct cocos2d::CCPoint *)&v278);
v91 = (*(float (__fastcall **)(__int64 *, struct cocos2d::CCPoint))(v89 + 184))(v88, v90);
cocos2d::CCPoint::CCPoint(v91, 0.0);
v92 = (__int64)v28->getPosition_0(v28);
cocos2d::CCPoint::operator+(v92, &v277);
v93 = (cocos2d::CCSize)v280;
v94 = *v280;
v5 = v273;
v95 = cocos2d::CCNode::convertToNodeSpace(v273->m_buttonMenu, (const struct cocos2d::CCPoint *)&v278);
v96 = (*(float (__fastcall **)(cocos2d::CCSize, struct cocos2d::CCPoint))(v94 + 184))(v93, v95);
cocos2d::CCPoint::CCPoint(v96, 0.0);
v97 = (__int64)v283->getPosition_0(v283);
cocos2d::CCPoint::operator+(v97, &v277);
v98 = (cocos2d::CCPoint)v282;
v99 = *v282;
v100 = cocos2d::CCNode::convertToNodeSpace(v273->m_buttonMenu, (const struct cocos2d::CCPoint *)&v278);
v101 = (*(float (__fastcall **)(cocos2d::CCPoint, struct cocos2d::CCPoint))(v99 + 184))(v98, v100);
cocos2d::CCPoint::CCPoint(v101, 0.0);
v102 = (__int64)v281->getPosition_0(v281);
cocos2d::CCPoint::operator+(v102, &v277);
v103 = v71->cocos2d::CCMenuItemSprite::cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
v104 = cocos2d::CCNode::convertToNodeSpace(v273->m_buttonMenu, (const struct cocos2d::CCPoint *)&v278);
((void (__fastcall *)(CCMenuItemSpriteExtra *, struct cocos2d::CCPoint))v103->setPosition_0)(v71, v104);
LevelSettingsLayer::updateColorSprites(v273);
for ( i = 0; i < 6; ++i )
{
v106 = 0;
v107 = 0.0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v273);
switch ( i )
{
case 0:
v106 = 1000;
v108 = (cocos2d::CCPoint)v275;
goto LABEL_6;
case 1:
v106 = 1001;
v110 = (__int64)v284->getPosition_0(v284);
cocos2d::CCPoint::operator=(&v273, v110);
v107 = -4.0;
break;
case 2:
v106 = 1009;
v108 = v285.origin;
LABEL_6:
v109 = (*(__int64 (__fastcall **)(cocos2d::CCPoint))(**(_QWORD **)&v108 + 200LL))(v108);
cocos2d::CCPoint::operator=(&v273, v109);
break;
case 3:
v106 = 1002;
v111 = *v88;
v112 = (cocos2d::CCPoint)v88;
goto LABEL_12;
case 4:
v106 = 1013;
v113 = (*(__int64 (__fastcall **)(cocos2d::CCSize))(**(_QWORD **)&v93 + 200LL))(v93);
cocos2d::CCPoint::operator=(&v273, v113);
v107 = 0.0;
break;
case 5:
v106 = 1014;
v112 = (cocos2d::CCPoint)v282;
v111 = *v282;
LABEL_12:
v114 = (*(__int64 (__fastcall **)(cocos2d::CCPoint))(v111 + 200))(v112);
cocos2d::CCPoint::operator=(&v273, v114);
v107 = 3.0;
break;
default:
break;
}
v115 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_colorBtn_001.png");
v115->setColor(&v115->cocos2d::CCRGBAProtocol, &stru_140529B70);
LOBYTE(v116) = 100;
v115->setOpacity(&v115->cocos2d::CCRGBAProtocol, v116);
v117 = cocos2d::CCLabelBMFont::create("+", (const char *)&qword_14052A4D8);
v115->addChild_1(v115, v117);
((void (__fastcall *)(struct cocos2d::CCLabelBMFont *))v117->setScale_0)(v117);
LOBYTE(v118) = 100;
v119 = ((float (__fastcall *)(cocos2d::CCRGBAProtocol *, __int64))v117->setOpacity)(
&v117->cocos2d::CCRGBAProtocol,
v118);
cocos2d::CCPoint::CCPoint(v119, 2.0);
v120 = cocos2d::CCNode::convertToNodeSpace(v115, (const struct cocos2d::CCPoint *)&v278);
((void (__fastcall *)(_QWORD, _QWORD))cocos2d::CCPoint::operator+)(v120, &v277);
v117->setPosition_0(v117, (const cocos2d::CCPoint *)&v277);
((void (__fastcall *)(struct cocos2d::CCSprite *))v115->setScale_0)(v115);
v121 = CCMenuItemSpriteExtra::create(
v115,
nullptr,
v5,
(cocos2d::SEL_MenuHandler *)LevelSettingsLayer::onLiveEdit);
v5->m_buttonMenu->addChild_1(v5->m_buttonMenu, v121);
v122 = ((float (__fastcall *)(CCMenuItemSpriteExtra *, _QWORD))v121->setTag)(v121, v106);
cocos2d::CCPoint::CCPoint(v122, (float)(v107 * 0.80000001) + 18.0);
v15 = cocos2d::CCPoint::operator+(&v273, &v279);
v121->setPosition_0(v121, &v279);
HIDWORD(v121->m_pfnSelector.adj) = 0x40000000;
v93 = (cocos2d::CCSize)v280;
}
v4 = v274;
}
if ( !v4->m_startsWithStartPos )
{
cocos2d::CCPoint::CCPoint(*(float *)&v15, v272 * 0.5);
v123 = cocos2d::CCLabelBMFont::create("Game Type:", "goldFont.fnt");
((void (__fastcall *)(struct cocos2d::CCLabelBMFont *))v123->setScale_0)(v123);
v124 = ((float (__fastcall *)(cocos2d::CCLayer *, struct cocos2d::CCLabelBMFont *, __int64))v5->m_mainLayer->addChild_0)(
v5->m_mainLayer,
v123,
10);
cocos2d::CCPoint::CCPoint(v124, 0.0);
cocos2d::CCPoint::operator+(&v273, &v274);
v123->setPosition_0(v123, (const cocos2d::CCPoint *)&v274);
v276.origin = (cocos2d::CCPoint)operator new(0x2C0u);
v125 = ButtonSprite::ButtonSprite(*(ButtonSprite **)&v276.origin);
if ( v125 )
{
if ( ButtonSprite::init_1(
v125,
"Classic",
100,
0,
0.55000001,
1,
(const char *)&qword_14052A4D8,
"GJ_button_04.png",
24.0) )
{
cocos2d::CCObject::autorelease(v125);
}
else
{
((void (__fastcall *)(ButtonSprite *, __int64))v125->~ButtonSprite)(v125, 1);
v125 = nullptr;
}
}
v126 = CCMenuItemSpriteExtra::create(
v125,
nullptr,
v5,
(cocos2d::SEL_MenuHandler *)LevelSettingsLayer::onGameplayMode);
v5->m_classicButton = v126;
v126->setTag(v126, 3);
v127 = ((float (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))v5->m_buttonMenu->addChild_1)(
v5->m_buttonMenu,
v5->m_classicButton);
cocos2d::CCPoint::CCPoint(v127, -65.0);
cocos2d::CCPoint::operator+(&v273, &v274);
v128 = v5->m_classicButton->__vftable;
v129 = cocos2d::CCNode::convertToNodeSpace(v5->m_buttonMenu, (const struct cocos2d::CCPoint *)&v278);
((void (__fastcall *)(CCMenuItemSpriteExtra *, struct cocos2d::CCPoint))v128->setPosition_0)(
v5->m_classicButton,
v129);
v276.origin = (cocos2d::CCPoint)operator new(0x2C0u);
v130 = ButtonSprite::ButtonSprite(*(ButtonSprite **)&v276.origin);
if ( v130 )
{
if ( ButtonSprite::init_1(
v130,
"Platformer",
100,
0,
0.55000001,
1,
(const char *)&qword_14052A4D8,
"GJ_button_04.png",
24.0) )
{
cocos2d::CCObject::autorelease(v130);
}
else
{
((void (__fastcall *)(ButtonSprite *, __int64))v130->~ButtonSprite)(v130, 1);
v130 = nullptr;
}
}
v131 = CCMenuItemSpriteExtra::create(
v130,
nullptr,
v5,
(cocos2d::SEL_MenuHandler *)LevelSettingsLayer::onGameplayMode);
v5->m_platformerButton = v131;
v131->setTag(v131, 4);
v132 = ((float (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))v5->m_buttonMenu->addChild_1)(
v5->m_buttonMenu,
v5->m_platformerButton);
cocos2d::CCPoint::CCPoint(v132, 65.0);
cocos2d::CCPoint::operator+(&v273, &v274);
v133 = v5->m_platformerButton->__vftable;
v134 = cocos2d::CCNode::convertToNodeSpace(v5->m_buttonMenu, (const struct cocos2d::CCPoint *)&v278);
((void (__fastcall *)(CCMenuItemSpriteExtra *, struct cocos2d::CCPoint))v133->setPosition_0)(
v5->m_platformerButton,
v134);
LevelSettingsLayer::updateGameplayModeButtons(v5);
}
v135 = (float)(v272 * 0.5) + 185.0;
v136 = (float)(v272 * 0.5) - 185.0;
if ( !v4->m_startsWithStartPos )
{
v137 = cocos2d::CCLabelBMFont::create("BG:", "goldFont.fnt");
((void (__fastcall *)(struct cocos2d::CCLabelBMFont *))v137->setScale_0)(v137);
v138 = ((float (__fastcall *)(cocos2d::CCLayer *, struct cocos2d::CCLabelBMFont *))v5->m_mainLayer->addChild_1)(
v5->m_mainLayer,
v137);
v139 = v137->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
cocos2d::CCPoint::CCPoint(v138, v135);
v139->setPosition_0(v137, v140);
m_backgroundIndex = v4->m_backgroundIndex;
if ( m_backgroundIndex <= 59 )
{
if ( m_backgroundIndex < 1 )
m_backgroundIndex = 1;
}
else
{
m_backgroundIndex = 59;
}
v142 = cocos2d::CCString::createWithFormat("bgIcon_%02d_001.png", m_backgroundIndex);
CString = cocos2d::CCString::getCString(v142);
v144 = cocos2d::CCSprite::createWithSpriteFrameName(CString);
v5->m_backgroundSprite = v144;
v145 = CCMenuItemSpriteExtra::create(v144, nullptr, v5, (cocos2d::SEL_MenuHandler *)LevelSettingsLayer::onBGArt);
v146 = ((float (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))v5->m_buttonMenu->addChild_1)(
v5->m_buttonMenu,
v145);
cocos2d::CCPoint::CCPoint(v146, 0.0);
v147 = (__int64)v137->getPosition_0(v137);
cocos2d::CCPoint::operator+(v147, &v274);
v148 = v145->cocos2d::CCMenuItemSprite::cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
v149 = cocos2d::CCNode::convertToNodeSpace(v5->m_buttonMenu, (const struct cocos2d::CCPoint *)&v278);
((void (__fastcall *)(CCMenuItemSpriteExtra *, struct cocos2d::CCPoint))v148->setPosition_0)(v145, v149);
v150 = cocos2d::CCLabelBMFont::create("G:", "goldFont.fnt");
((void (__fastcall *)(struct cocos2d::CCLabelBMFont *))v150->setScale_0)(v150);
v151 = ((float (__fastcall *)(cocos2d::CCLayer *, struct cocos2d::CCLabelBMFont *))v5->m_mainLayer->addChild_1)(
v5->m_mainLayer,
v150);
v152 = v150->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
cocos2d::CCPoint::CCPoint(v151, v135);
v152->setPosition_0(v150, v153);
m_groundIndex = v4->m_groundIndex;
if ( m_groundIndex <= 22 )
{
if ( m_groundIndex < 1 )
m_groundIndex = 1;
}
else
{
m_groundIndex = 22;
}
v155 = cocos2d::CCString::createWithFormat("gIcon_%02d_001.png", m_groundIndex);
v156 = cocos2d::CCString::getCString(v155);
v157 = cocos2d::CCSprite::createWithSpriteFrameName(v156);
v5->m_groundSprite = v157;
v158 = CCMenuItemSpriteExtra::create(v157, nullptr, v5, (cocos2d::SEL_MenuHandler *)LevelSettingsLayer::onGArt);
v159 = ((float (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))v5->m_buttonMenu->addChild_1)(
v5->m_buttonMenu,
v158);
cocos2d::CCPoint::CCPoint(v159, 0.0);
v160 = (__int64)v150->getPosition_0(v150);
cocos2d::CCPoint::operator+(v160, &v274);
v161 = v158->cocos2d::CCMenuItemSprite::cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
v162 = cocos2d::CCNode::convertToNodeSpace(v5->m_buttonMenu, (const struct cocos2d::CCPoint *)&v278);
((void (__fastcall *)(CCMenuItemSpriteExtra *, struct cocos2d::CCPoint))v161->setPosition_0)(v158, v162);
v163 = cocos2d::CCLabelBMFont::create("MG:", "goldFont.fnt");
((void (__fastcall *)(struct cocos2d::CCLabelBMFont *))v163->setScale_0)(v163);
v164 = ((float (__fastcall *)(cocos2d::CCLayer *, struct cocos2d::CCLabelBMFont *))v5->m_mainLayer->addChild_1)(
v5->m_mainLayer,
v163);
v165 = v163->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
cocos2d::CCPoint::CCPoint(v164, v135);
v165->setPosition_0(v163, v166);
m_middleGroundIndex = v4->m_middleGroundIndex;
if ( m_middleGroundIndex <= 3 )
{
if ( m_middleGroundIndex < 0 )
m_middleGroundIndex = 0;
}
else
{
m_middleGroundIndex = 3;
}
v168 = cocos2d::CCString::createWithFormat("mgIcon_%02d_001.png", m_middleGroundIndex);
v169 = cocos2d::CCString::getCString(v168);
v170 = cocos2d::CCSprite::createWithSpriteFrameName(v169);
v5->m_middlegroundSprite = v170;
v171 = CCMenuItemSpriteExtra::create(v170, nullptr, v5, (cocos2d::SEL_MenuHandler *)LevelSettingsLayer::onFGArt);
v172 = ((float (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))v5->m_buttonMenu->addChild_1)(
v5->m_buttonMenu,
v171);
cocos2d::CCPoint::CCPoint(v172, 0.0);
v173 = (__int64)v163->getPosition_0(v163);
cocos2d::CCPoint::operator+(v173, &v274);
v174 = v171->cocos2d::CCMenuItemSprite::cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
v175 = cocos2d::CCNode::convertToNodeSpace(v5->m_buttonMenu, (const struct cocos2d::CCPoint *)&v278);
((void (__fastcall *)(CCMenuItemSpriteExtra *, struct cocos2d::CCPoint))v174->setPosition_0)(v171, v175);
if ( !v4->m_startsWithStartPos )
{
v276.origin = (cocos2d::CCPoint)operator new(0x2C0u);
v176 = ButtonSprite::ButtonSprite(*(ButtonSprite **)&v276.origin);
if ( v176 )
{
if ( ButtonSprite::init_1(v176, "Font", 30, 0, 0.80000001, 1, "goldFont.fnt", "GJ_button_04.png", 28.0) )
{
cocos2d::CCObject::autorelease(v176);
}
else
{
((void (__fastcall *)(ButtonSprite *, __int64))v176->~ButtonSprite)(v176, 1);
v176 = nullptr;
}
}
v177 = CCMenuItemSpriteExtra::create(
v176,
nullptr,
v5,
(cocos2d::SEL_MenuHandler *)LevelSettingsLayer::onSelectFont);
v178 = ((float (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))v5->m_buttonMenu->addChild_1)(
v5->m_buttonMenu,
v177);
v179 = cocos2d::CCPoint::CCPoint(v178, 0.0);
cocos2d::CCPoint::CCPoint(*(float *)&v179, v135);
cocos2d::CCPoint::operator+(v180, &v274);
v181 = v177->cocos2d::CCMenuItemSprite::cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
v182 = cocos2d::CCNode::convertToNodeSpace(v5->m_buttonMenu, (const struct cocos2d::CCPoint *)&v277);
((void (__fastcall *)(CCMenuItemSpriteExtra *, struct cocos2d::CCPoint))v181->setPosition_0)(v177, v182);
}
}
v276.origin = (cocos2d::CCPoint)operator new(0x2C0u);
v183 = ButtonSprite::ButtonSprite(*(ButtonSprite **)&v276.origin);
if ( v183 )
{
if ( ButtonSprite::init_1(v183, "OK", 40, 0, 0.80000001, 1, "goldFont.fnt", "GJ_button_01.png", 30.0) )
{
cocos2d::CCObject::autorelease(v183);
}
else
{
((void (__fastcall *)(ButtonSprite *, __int64))v183->~ButtonSprite)(v183, 1);
v183 = nullptr;
}
}
v276.origin = (cocos2d::CCPoint)operator new(0x208u);
v184 = CCMenuItemSpriteExtra::CCMenuItemSpriteExtra(*(CCMenuItemSpriteExtra **)&v276.origin);
if ( v184 )
{
if ( CCMenuItemSpriteExtra::init(v184, v183, nullptr, v5, (cocos2d::SEL_MenuHandler *)LevelSettingsLayer::onClose) )
{
cocos2d::CCObject::autorelease(v184);
goto LABEL_53;
}
((void (__fastcall *)(CCMenuItemSpriteExtra *, __int64))v184->~CCMenuItemSpriteExtra)(v184, 1);
}
v184 = nullptr;
LABEL_53:
v185 = ((float (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))v5->m_buttonMenu->addChild_1)(
v5->m_buttonMenu,
v184);
v186 = v184->cocos2d::CCMenuItemSprite::cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
v187 = cocos2d::CCPoint::CCPoint(v185, v272 * 0.5);
v188 = cocos2d::CCNode::convertToNodeSpace(v5->m_buttonMenu, (const struct cocos2d::CCPoint *)&v278);
((void (__fastcall *)(CCMenuItemSpriteExtra *, struct cocos2d::CCPoint))v186->setPosition_0)(v184, v188);
if ( v4->m_startsWithStartPos )
{
v195 = cocos2d::CCLabelBMFont::create("Disable", "goldFont.fnt");
((void (__fastcall *)(struct cocos2d::CCLabelBMFont *))v195->setScale_0)(v195);
v196 = ((float (__fastcall *)(cocos2d::CCLayer *, struct cocos2d::CCLabelBMFont *))v5->m_mainLayer->addChild_1)(
v5->m_mainLayer,
v195);
v197 = v195->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
cocos2d::CCPoint::CCPoint(v196, v136 + 270.0);
v197->setPosition_0(v195, v198);
v276.origin = (cocos2d::CCPoint)&v292;
v292 = 0;
v293 = 0;
v294 = 15;
LOBYTE(v292) = 0;
cocos2d::CCPoint::CCPoint(0.0, 0.0);
v199 = (__int64)v195->getPosition_0(v195);
cocos2d::CCPoint::operator+(v199, &v274);
LOBYTE(v200) = !v5->m_settingsObject->m_disableStartPos;
LevelSettingsLayer::createToggleButton(
(_DWORD)v5,
(unsigned int)&v292,
v201,
v200,
(__int64)v5->m_buttonMenu,
(__int64)&v274);
v276.origin = (cocos2d::CCPoint)&v292;
v293 = 12;
v294 = 15;
strcpy((char *)&v292, "Reset\nCamera");
BYTE13(v292) = 0;
HIWORD(v292) = 0;
v278 = &v292;
m_resetCamera = v4->m_resetCamera;
m_mainLayer = v5->m_mainLayer;
v204 = cocos2d::CCPoint::CCPoint(7.1837755e22, v272 * 0.5);
m_buttonMenu = v5->m_buttonMenu;
cocos2d::CCPoint::CCPoint(*(float *)&v204, 8.0);
v276.origin = (cocos2d::CCPoint)v291;
v206 = (const char *)sub_14003BDB0((__int64)v291, (__int64)&v292);
cocos2d::CCPoint::CCPoint(&v279);
v208 = v207;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v282);
ToggleButton = GameToolbox::createToggleButton(
v206,
(cocos2d::SEL_MenuHandler *)LevelSettingsLayer::onOptionToggle,
m_resetCamera,
m_buttonMenu,
v209,
v5,
m_mainLayer,
0.69999999,
0.5,
80.0,
v208,
(const char *)&qword_14052A4D8,
0,
0,
nullptr);
sub_14003A830((__int64)&v292);
v211 = ((float (__fastcall *)(CCMenuItemToggler *, __int64))ToggleButton->setTag)(ToggleButton, 1);
cocos2d::CCPoint::CCPoint(v211, (float)(v272 * 0.5) - 100.0);
v212 = cocos2d::CCLabelBMFont::create("Target Order", "goldFont.fnt");
((void (__fastcall *)(struct cocos2d::CCLabelBMFont *))v212->setScale_0)(v212);
v213 = ((float (__fastcall *)(cocos2d::CCLayer *, struct cocos2d::CCLabelBMFont *))v5->m_mainLayer->addChild_1)(
v5->m_mainLayer,
v212);
cocos2d::CCPoint::CCPoint(v213, 0.0);
cocos2d::CCPoint::operator+(&v273, &v274);
v212->setPosition_0(v212, (const cocos2d::CCPoint *)&v274);
cocos2d::CCRect::CCRect(&v285, 0.0, 0.0, 40.0, 40.0);
cocos2d::CCRect::CCRect(&v276, &v285);
v215 = cocos2d::extension::CCScale9Sprite::create("square02b_small.png", v214);
LOBYTE(v216) = 100;
v215->setOpacity(&v215->cocos2d::CCRGBAProtocol, v216);
LOWORD(v275) = 0;
BYTE2(v275) = 0;
v215->setColor(&v215->cocos2d::CCRGBAProtocol, (const cocos2d::ccColor3B *)&v275);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v280, 50.0, 30.0);
v215->setContentSize(v215, (const cocos2d::CCSize *)&v280);
v5->m_mainLayer->addChild_0(v5->m_mainLayer, v215, -1);
v215->setPosition_0(v215, (const cocos2d::CCPoint *)&v273);
v218 = CCTextInputNode::create(50.0, 40.0, "Order", v217, v270, (const char *)&qword_14052A4D8);
v5->m_orderInput = v218;
v5->m_mainLayer->addChild_0(v5->m_mainLayer, v218, 20);
v5->m_orderInput->setPosition_0(v5->m_orderInput, (const cocos2d::CCPoint *)&v273);
m_orderInput = v5->m_orderInput;
m_orderInput->m_maxLabelScale = 0.60000002;
CCTextInputNode::refreshLabel(m_orderInput);
v220 = v5->m_orderInput;
v220->m_maxLabelWidth = 200.0;
CCTextInputNode::refreshLabel(v220);
v5->m_orderInput->m_textField->setVisible(v5->m_orderInput->m_textField, 0);
v5->m_orderInput->m_maxLabelLength = 6;
Src[1] = 14648;
Src[2] = 10;
Src[3] = 15;
Src[0] = 0x3736353433323130LL;
v276.origin = (cocos2d::CCPoint)Src;
p_m_allowedChars = (void **)&v5->m_orderInput->m_allowedChars;
if ( p_m_allowedChars != Src )
sub_14003CCE0(p_m_allowedChars, Src, 0xAu);
sub_14003A830((__int64)Src);
LOWORD(v275) = -21896;
v222 = v5->m_orderInput;
*(_WORD *)&v222->m_placeholderColor.r = -21896;
v222->m_placeholderColor.b = -16;
CCTextInputNode::refreshLabel(v222);
v223 = v5->m_orderInput;
v223->m_placeholderScale = 0.5;
CCTextInputNode::refreshLabel(v223);
v5->m_orderInput->m_delegate = &v5->TextInputDelegate;
v5->m_orderInput->m_numberInput = 1;
v5->m_orderInput->setTag(v5->m_orderInput, 1);
m_targetOrder = v5->m_settingsObject->m_targetOrder;
if ( m_targetOrder > 0 )
{
v225 = GameToolbox::intToString(v291, m_targetOrder);
CCTextInputNode::setString((__int64)v5->m_orderInput, v225);
}
*(float *)&v273 = *(float *)&v273 + 200.0;
v226 = cocos2d::CCLabelBMFont::create("Target Channel", "goldFont.fnt");
((void (__fastcall *)(struct cocos2d::CCLabelBMFont *))v226->setScale_0)(v226);
v227 = ((float (__fastcall *)(cocos2d::CCLayer *, struct cocos2d::CCLabelBMFont *))v5->m_mainLayer->addChild_1)(
v5->m_mainLayer,
v226);
cocos2d::CCPoint::CCPoint(v227, 0.0);
cocos2d::CCPoint::operator+(&v273, &v274);
v226->setPosition_0(v226, (const cocos2d::CCPoint *)&v274);
cocos2d::CCRect::CCRect(&v276, &v285);
v229 = cocos2d::extension::CCScale9Sprite::create("square02b_small.png", v228);
LOBYTE(v230) = 100;
v229->setOpacity(&v229->cocos2d::CCRGBAProtocol, v230);
LOWORD(v275) = 0;
BYTE2(v275) = 0;
v229->setColor(&v229->cocos2d::CCRGBAProtocol, (const cocos2d::ccColor3B *)&v275);
v229->setContentSize(v229, (const cocos2d::CCSize *)&v280);
v5->m_mainLayer->addChild_0(v5->m_mainLayer, v229, -1);
v229->setPosition_0(v229, (const cocos2d::CCPoint *)&v273);
v232 = CCTextInputNode::create(50.0, 40.0, "Channel", v231, v271, (const char *)&qword_14052A4D8);
v5->m_channelInput = v232;
v5->m_mainLayer->addChild_0(v5->m_mainLayer, v232, 20);
v5->m_channelInput->setPosition_0(v5->m_channelInput, (const cocos2d::CCPoint *)&v273);
m_channelInput = v5->m_channelInput;
m_channelInput->m_maxLabelScale = 0.60000002;
CCTextInputNode::refreshLabel(m_channelInput);
v234 = v5->m_channelInput;
v234->m_maxLabelWidth = 200.0;
CCTextInputNode::refreshLabel(v234);
v5->m_channelInput->m_textField->setVisible(v5->m_channelInput->m_textField, 0);
v5->m_channelInput->m_maxLabelLength = 6;
v287[1] = 14648;
v287[2] = 10;
v287[3] = 15;
LODWORD(v192) = 858927408;
v287[0] = 0x3736353433323130LL;
v276.origin = (cocos2d::CCPoint)v287;
v235 = (void **)&v5->m_channelInput->m_allowedChars;
if ( v235 != v287 )
sub_14003CCE0(v235, v287, 0xAu);
sub_14003A830((__int64)v287);
LOWORD(v275) = -21896;
v236 = v5->m_channelInput;
*(_WORD *)&v236->m_placeholderColor.r = -21896;
v236->m_placeholderColor.b = -16;
CCTextInputNode::refreshLabel(v236);
v237 = v5->m_channelInput;
v237->m_placeholderScale = 0.5;
CCTextInputNode::refreshLabel(v237);
v5->m_channelInput->m_delegate = &v5->TextInputDelegate;
v5->m_channelInput->m_numberInput = 1;
v5->m_channelInput->setTag(v5->m_channelInput, 2);
m_targetChannel = v5->m_settingsObject->m_targetChannel;
if ( m_targetChannel > 0 )
{
v239 = GameToolbox::intToString(v291, m_targetChannel);
CCTextInputNode::setString((__int64)v5->m_channelInput, v239);
}
}
else
{
m_level = v5->m_settingsObject->m_level;
m_songID = m_level->m_songID;
v191 = m_songID != 0;
if ( !m_songID )
m_songID = m_level->m_audioTrack;
v192 = cocos2d::CCPoint::CCPoint(*(float *)&v187, v272 * 0.5);
v194 = SongSelectNode::create(
m_songID,
v191,
v5->m_settingsObject,
(SongSelectType)0,
v193,
v5->m_mainLayer,
v5->m_buttonMenu,
0);
v5->m_songSelectNode = v194;
v5->m_mainLayer->addChild_0(v5->m_mainLayer, v194, 5);
}
cocos2d::CCPoint::CCPoint(*(float *)&v192, v136);
v240 = cocos2d::CCLabelBMFont::create("Speed:", "goldFont.fnt");
((void (__fastcall *)(struct cocos2d::CCLabelBMFont *))v240->setScale_0)(v240);
v5->m_mainLayer->addChild_1(v5->m_mainLayer, v240);
v240->setPosition_0(v240, &v288);
v241 = v5->m_settingsObject->m_startSpeed;
if ( v241 )
{
v242 = v241 - 1;
if ( !v242 )
{
v245 = 0;
goto LABEL_75;
}
v243 = v242 - 1;
if ( !v243 )
{
v245 = 2;
goto LABEL_75;
}
v244 = v243 - 1;
if ( !v244 )
{
v245 = 3;
goto LABEL_75;
}
if ( v244 == 1 )
{
v245 = 4;
goto LABEL_75;
}
}
v245 = 1;
LABEL_75:
SelectSettingLayer::frameForItem(&v292, 2, v245);
v246 = (const char *)&v292;
if ( v294 > 0xF )
v246 = (const char *)v292;
v5->m_speedSprite = cocos2d::CCSprite::createWithSpriteFrameName(v246);
sub_14003A830((__int64)&v292);
((void (__fastcall *)(cocos2d::CCSprite *))v5->m_speedSprite->setScale_0)(v5->m_speedSprite);
m_speedSprite = v5->m_speedSprite;
v276.origin = (cocos2d::CCPoint)operator new(0x208u);
v248 = CCMenuItemSpriteExtra::CCMenuItemSpriteExtra(*(CCMenuItemSpriteExtra **)&v276.origin);
if ( v248 )
{
if ( CCMenuItemSpriteExtra::init(
v248,
m_speedSprite,
nullptr,
v5,
(cocos2d::SEL_MenuHandler *)LevelSettingsLayer::onSpeed) )
{
cocos2d::CCObject::autorelease(v248);
goto LABEL_82;
}
((void (__fastcall *)(CCMenuItemSpriteExtra *, __int64))v248->~CCMenuItemSpriteExtra)(v248, 1);
}
v248 = nullptr;
LABEL_82:
v249 = ((float (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))v5->m_buttonMenu->addChild_1)(
v5->m_buttonMenu,
v248);
cocos2d::CCPoint::CCPoint(v249, 0.0);
v250 = (__int64)v240->getPosition_0(v240);
cocos2d::CCPoint::operator+(v250, &v274);
v251 = v248->cocos2d::CCMenuItemSprite::cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
v252 = cocos2d::CCNode::convertToNodeSpace(v5->m_buttonMenu, (const struct cocos2d::CCPoint *)&v278);
v253 = ((float (__fastcall *)(CCMenuItemSpriteExtra *, struct cocos2d::CCPoint))v251->setPosition_0)(v248, v252);
cocos2d::CCPoint::CCPoint(v253, v136);
v254 = cocos2d::CCLabelBMFont::create("Mode:", "goldFont.fnt");
((void (__fastcall *)(struct cocos2d::CCLabelBMFont *))v254->setScale_0)(v254);
v5->m_mainLayer->addChild_1(v5->m_mainLayer, v254);
v254->setPosition_0(v254, &v289);
SelectSettingLayer::frameForItem(
&v292,
v5->m_settingsObject->m_platformerMode,
(unsigned int)v5->m_settingsObject->m_startMode);
v255 = (const char *)&v292;
if ( v294 > 0xF )
v255 = (const char *)v292;
v5->m_modeSprite = cocos2d::CCSprite::createWithSpriteFrameName(v255);
sub_14003A830((__int64)&v292);
((void (__fastcall *)(cocos2d::CCSprite *))v5->m_modeSprite->setScale_0)(v5->m_modeSprite);
m_modeSprite = v5->m_modeSprite;
v276.origin = (cocos2d::CCPoint)operator new(0x208u);
v257 = CCMenuItemSpriteExtra::CCMenuItemSpriteExtra(*(CCMenuItemSpriteExtra **)&v276.origin);
if ( v257 )
{
if ( CCMenuItemSpriteExtra::init(
v257,
m_modeSprite,
nullptr,
v5,
(cocos2d::SEL_MenuHandler *)LevelSettingsLayer::onMode) )
{
cocos2d::CCObject::autorelease(v257);
goto LABEL_89;
}
((void (__fastcall *)(CCMenuItemSpriteExtra *, __int64))v257->~CCMenuItemSpriteExtra)(v257, 1);
}
v257 = nullptr;
LABEL_89:
v258 = ((float (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))v5->m_buttonMenu->addChild_1)(
v5->m_buttonMenu,
v257);
cocos2d::CCPoint::CCPoint(v258, 0.0);
v259 = (__int64)v254->getPosition_0(v254);
cocos2d::CCPoint::operator+(v259, &v274);
v260 = v257->cocos2d::CCMenuItemSprite::cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
v261 = cocos2d::CCNode::convertToNodeSpace(v5->m_buttonMenu, (const struct cocos2d::CCPoint *)&v278);
v262 = ((float (__fastcall *)(CCMenuItemSpriteExtra *, struct cocos2d::CCPoint))v260->setPosition_0)(v257, v261);
cocos2d::CCPoint::CCPoint(v262, v136);
v263 = cocos2d::CCLabelBMFont::create("Options:", "goldFont.fnt");
((void (__fastcall *)(struct cocos2d::CCLabelBMFont *))v263->setScale_0)(v263);
v5->m_mainLayer->addChild_1(v5->m_mainLayer, v263);
v263->setPosition_0(v263, &v290);
v264 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_optionsBtn_001.png");
((void (__fastcall *)(struct cocos2d::CCSprite *))v264->setScale_0)(v264);
v276.origin = (cocos2d::CCPoint)operator new(0x208u);
v265 = CCMenuItemSpriteExtra::CCMenuItemSpriteExtra(*(CCMenuItemSpriteExtra **)&v276.origin);
if ( v265 )
{
if ( CCMenuItemSpriteExtra::init(
v265,
v264,
nullptr,
v5,
(cocos2d::SEL_MenuHandler *)LevelSettingsLayer::onSettings) )
{
cocos2d::CCObject::autorelease(v265);
LABEL_94:
v266 = ((float (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))v5->m_buttonMenu->addChild_1)(
v5->m_buttonMenu,
v265);
cocos2d::CCPoint::CCPoint(v266, 0.0);
v267 = (__int64)v263->getPosition_0(v263);
cocos2d::CCPoint::operator+(v267, &v274);
v268 = v265->cocos2d::CCMenuItemSprite::cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
v269 = cocos2d::CCNode::convertToNodeSpace(v5->m_buttonMenu, (const struct cocos2d::CCPoint *)&v278);
((void (__fastcall *)(CCMenuItemSpriteExtra *, struct cocos2d::CCPoint))v268->setPosition_0)(v265, v269);
return 1;
}
((void (__fastcall *)(CCMenuItemSpriteExtra *, __int64))v265->~CCMenuItemSpriteExtra)(v265, 1);
}
v265 = nullptr;
goto LABEL_94;
}
return result;
}