//
// VideoOptionsLayer::init from 0x1404cc8b0 to 0x1404cdc07 (4951 bytes)
//
// 5 xrefs:
// > VideoOptionsLayer::create @ 0x1404cc85d
// > VideoOptionsLayer::create @ 0x1404cc864
// > VideoOptionsLayer::create @ 0x1404cc84e
// > ??> @ 0x1407d0228
// > ??> @ 0x140929684
//
// 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:32:59 +0000
//
// Hidden C++ exception states: #wind=25
bool __fastcall VideoOptionsLayer::init(__int64 a1)
{
bool result; // al
__int64 v3; // rcx
__int64 v4; // rax
__int64 v5; // rax
__int64 v6; // rdx
__int64 v7; // rdx
cocos2d::CCObject *v8; // rax
__int64 v9; // rcx
__int64 v10; // rax
__int64 v11; // rax
__int64 v12; // rcx
__int64 v13; // rcx
__int64 v14; // rcx
__int64 v15; // rax
__int64 *v16; // rdi
__int64 v17; // rbx
__int64 v18; // rax
__int64 v19; // rbx
__int64 v20; // rax
struct cocos2d::CCLabelBMFont *v21; // rdi
__int64 v22; // rbx
__int64 v23; // rax
__int64 v24; // rdx
__int64 v25; // rcx
__int64 v26; // r8
__int64 v27; // r9
__int64 v28; // rdx
__int64 v29; // rcx
__int64 v30; // r8
__int64 v31; // r9
__int64 v32; // rax
__int64 v33; // rcx
__int64 v34; // r9
__int64 v35; // rax
int v36; // r14d
unsigned int v37; // edi
cocos2d::CCArray *v38; // rbx
struct cocos2d::CCObject *v39; // rax
__int64 v40; // rcx
cocos2d::CCArray *v41; // rbx
struct cocos2d::CCObject *v42; // rax
__int64 v43; // rax
__int64 v44; // rcx
cocos2d::CCArray *v45; // rdi
__int64 v46; // rcx
bool GameVariable; // bl
__int64 v48; // rax
struct cocos2d::CCObject *v49; // r14
__int64 v50; // rax
__int64 v51; // rcx
__int64 v52; // rbx
bool v53; // al
__int64 v54; // rax
__int64 v55; // rcx
__int64 v56; // rbx
bool v57; // al
struct cocos2d::CCLabelBMFont *v58; // rax
__int64 v59; // rdi
__int64 v60; // rbx
__int64 v61; // rax
struct cocos2d::CCLabelBMFont *v62; // rax
__int64 v63; // rdi
__int64 v64; // rbx
__int64 v65; // rax
struct cocos2d::CCLabelBMFont *v66; // rdi
__int64 v67; // rax
__int64 v68; // rbx
__int64 v69; // rax
struct cocos2d::CCLabelBMFont *v70; // rax
__int64 v71; // rax
__int64 v72; // rbx
__int64 v73; // rax
__int64 *v74; // rdi
cocos2d::CCObject *v75; // rbx
__int64 v76; // rax
__int64 v77; // rbx
__int64 v78; // rax
__int64 v79; // rdi
__int64 v80; // rbx
__int64 v81; // rax
__int64 *v82; // rdi
cocos2d::CCObject *v83; // rbx
__int64 v84; // rax
__int64 v85; // rbx
__int64 v86; // rax
__int64 v87; // rdi
__int64 v88; // rbx
__int64 v89; // rax
__int64 *v90; // rbx
cocos2d::CCObject *v91; // rdi
__int64 v92; // rax
__int64 v93; // rbx
__int64 v94; // rax
__int64 v95; // rbx
__int64 v96; // rax
__int64 *v97; // rbx
cocos2d::CCObject *v98; // rdi
__int64 v99; // rax
__int64 v100; // rbx
__int64 v101; // rax
__int64 v102; // rbx
__int64 v103; // rax
__int64 *v104; // rbx
__int64 *v105; // rax
cocos2d::CCObject *v106; // r14
__int64 *v107; // rbx
cocos2d::CCObject *v108; // rdi
__int64 v109; // rax
__int64 v110; // rbx
__int64 v111; // rax
__int64 v112; // rax
__int64 v113; // rbx
__int64 v114; // rax
__int64 *v115; // rbx
__int64 *v116; // rax
__int64 *v117; // r14
__int64 v118; // rdi
__int64 v119; // rbx
__int64 v120; // rax
__int64 v121; // rax
__int64 v122; // rdx
cocos2d::CCObject *v123; // rbx
cocos2d::CCObject *v124; // r14
__int64 v125; // rdi
__int64 v126; // rbx
__int64 v127; // rax
__int64 v128; // rax
__int128 *v129; // [rsp+58h] [rbp-89h] BYREF
__int64 v130[4]; // [rsp+60h] [rbp-81h] BYREF
void *v131; // [rsp+80h] [rbp-61h] BYREF
char v132[8]; // [rsp+88h] [rbp-59h] BYREF
__int128 v133; // [rsp+90h] [rbp-51h] BYREF
__int64 v134; // [rsp+A0h] [rbp-41h]
__int64 v135; // [rsp+A8h] [rbp-39h]
_BYTE v136[88]; // [rsp+B0h] [rbp-31h] BYREF
__int64 *v137; // [rsp+150h] [rbp+6Fh] BYREF
float v138; // [rsp+158h] [rbp+77h] BYREF
float v139; // [rsp+15Ch] [rbp+7Bh]
float v140; // [rsp+160h] [rbp+7Fh] BYREF
float v141; // [rsp+164h] [rbp+83h]
LODWORD(v137) = 1258291200;
result = cocos2d::CCLayerColor::initWithColor((cocos2d::CCLayerColor *)a1, (const struct cocos2d::_ccColor4B *)&v137);
if ( result )
{
v3 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v131 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v131);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v3 = qword_14090BFD0;
}
if ( GameManager::getGameVariable(v3, "0168") )
*(_BYTE *)(a1 + 596) = 1;
v4 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v137 = (__int64 *)operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v137);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v4 = qword_14090BFD0;
}
v5 = *(_QWORD *)(v4 + 592);
if ( v5 )
*(_BYTE *)(*(_QWORD *)(v5 + 504) + 408LL) = 1;
FLAlertLayer::incrementForcePrio((struct cocos2d::CCObject *)a1);
LOBYTE(v6) = 1;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 920LL))(a1, v6);
LOBYTE(v7) = 1;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 992LL))(a1, v7);
v8 = cocos2d::CCArray::createWithCapacity(1u);
*(_QWORD *)(a1 + 712) = v8;
cocos2d::CCObject::retain(v8);
v10 = cocos2d::CCDirector::sharedDirector(v9);
cocos2d::CCDirector::getWinSize(v10, &v138);
v11 = cocos2d::CCLayer::create();
*(_QWORD *)(a1 + 584) = v11;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 464LL))(a1, v11);
v12 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v137 = (__int64 *)operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v137);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v12 = qword_14090BFD0;
}
*(_BYTE *)(a1 + 752) = !GameManager::getGameVariable(v12, "0025");
v13 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v137 = (__int64 *)operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v137);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v13 = qword_14090BFD0;
}
*(_BYTE *)(a1 + 753) = GameManager::getGameVariable(v13, "0170");
v14 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v137 = (__int64 *)operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v137);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v14 = qword_14090BFD0;
}
*(_BYTE *)(a1 + 754) = GameManager::getGameVariable(v14, "0175");
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v130, 0.0, 0.0, 80.0, 80.0);
v16 = (__int64 *)cocos2d::extension::CCScale9Sprite::create("GJ_square01.png", v15);
v17 = *v16;
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v137, 360.0, 260.0);
(*(void (__fastcall **)(__int64 *, __int64))(v17 + 312))(v16, v18);
(*(void (__fastcall **)(_QWORD, __int64 *, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(
*(_QWORD *)(a1 + 584),
v16,
0xFFFFFFFFLL);
v19 = *v16;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v137, v138 * 0.5, v139 * 0.5);
(*(void (__fastcall **)(__int64 *, __int64))(v19 + 184))(v16, v20);
v21 = cocos2d::CCLabelBMFont::create("Video Options", "goldFont.fnt");
v22 = *(_QWORD *)v21;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v137, v138 * 0.5, (float)((float)(v139 * 0.5) + 130.0) - 14.0);
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, __int64))(v22 + 184))(v21, v23);
(*(void (__fastcall **)(_QWORD, struct cocos2d::CCLabelBMFont *))(**(_QWORD **)(a1 + 584) + 464LL))(
*(_QWORD *)(a1 + 584),
v21);
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v21 + 160LL))(v21);
*(_DWORD *)(a1 + 640) = -1;
if ( cocos2d::CCEGLView::sharedOpenGLView(v25, v24, v26, v27) )
{
v32 = cocos2d::CCEGLView::sharedOpenGLView(v29, v28, v30, v31);
cocos2d::CCEGLView::getDisplaySize(v32, &v140);
}
else
{
if ( !qword_14090BFD0 )
{
v137 = (__int64 *)operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v137);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
}
GameManager::resolutionForKey(v29, (cocos2d::CCSize *)&v140, 1, v31);
}
v35 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v137 = (__int64 *)operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v137);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v35 = qword_14090BFD0;
}
v36 = *(_DWORD *)(v35 + 1088);
*(_DWORD *)(a1 + 756) = -1;
v37 = 1;
while ( 1 )
{
if ( !v35 )
{
v131 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v131);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
}
GameManager::resolutionForKey(v33, (cocos2d::CCSize *)&v137, v37, v34);
if ( v140 >= *(float *)&v137 && v141 >= *((float *)&v137 + 1) )
{
v38 = *(cocos2d::CCArray **)(a1 + 712);
v39 = cocos2d::CCString::createWithFormat((const char *)&word_1406ED6F8, v37);
cocos2d::CCArray::addObject(v38, v39);
if ( v37 == v36 )
*(_DWORD *)(a1 + 756) = cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 712)) - 1;
}
if ( (int)++v37 > 27 )
break;
v35 = qword_14090BFD0;
}
if ( !cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 712)) )
{
v41 = *(cocos2d::CCArray **)(a1 + 712);
v42 = cocos2d::CCString::createWithFormat((const char *)&word_1406ED6F8, 99);
cocos2d::CCArray::addObject(v41, v42);
}
if ( *(_DWORD *)(a1 + 756) == -1 )
*(_DWORD *)(a1 + 756) = cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 712)) - 1;
v43 = cocos2d::CCMenu::create(v40);
*(_QWORD *)(a1 + 552) = v43;
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(*(_QWORD *)(a1 + 584), v43, 10);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v132, (float)(v138 * 0.5) - 65.0, (float)(v139 * 0.5) + 85.0);
v45 = (cocos2d::CCArray *)cocos2d::CCArray::create(v44);
v137 = v130;
v46 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v131 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v131);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v46 = qword_14090BFD0;
}
GameVariable = GameManager::getGameVariable(v46, "0025");
v130[1] = 28261;
v130[2] = 10;
v130[3] = 15;
v130[0] = 0x657263736C6C7546LL;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v129, (const struct cocos2d::CCPoint *)v132);
VideoOptionsLayer::createToggleButton(
a1,
(unsigned int)v130,
(unsigned int)VideoOptionsLayer::onFullscreen,
!GameVariable,
*(_QWORD *)(a1 + 552),
v48,
1060320051,
1120403456);
v49 = cocos2d::CCArray::objectAtIndex(v45, 0);
cocos2d::CCArray::removeAllObjects(v45);
v129 = &v133;
*((_QWORD *)&v133 + 1) = 29555;
v134 = 10;
v135 = 15;
*(_QWORD *)&v133 = 0x656C726564726F42LL;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v131, -24.0, -37.0);
cocos2d::CCPoint::operator+(v132, &v137, v50);
v51 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v130[0] = (__int64)operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager(v130[0]);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v51 = qword_14090BFD0;
}
v52 = *(_QWORD *)(a1 + 552);
v53 = GameManager::getGameVariable(v51, "0170");
*(_QWORD *)(a1 + 720) = VideoOptionsLayer::createToggleButton(
a1,
(unsigned int)&v133,
(unsigned int)VideoOptionsLayer::onBorderless,
v53,
v52,
(__int64)&v137,
1060320051,
1120403456);
*(_QWORD *)(a1 + 728) = cocos2d::CCArray::objectAtIndex(v45, 0);
cocos2d::CCArray::removeAllObjects(v45);
v130[0] = (__int64)&v133;
v133 = 0;
v134 = 3;
v135 = 15;
LODWORD(v133) = 7891270;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v129, 116.0, -37.0);
cocos2d::CCPoint::operator+(v132, &v137, v54);
v55 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v131 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v131);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v55 = qword_14090BFD0;
}
v56 = *(_QWORD *)(a1 + 552);
v57 = GameManager::getGameVariable(v55, "0175");
*(_QWORD *)(a1 + 736) = VideoOptionsLayer::createToggleButton(
a1,
(unsigned int)&v133,
(unsigned int)VideoOptionsLayer::onBorderlessFix,
v57,
v56,
(__int64)&v137,
1060320051,
1120403456);
*(_QWORD *)(a1 + 744) = cocos2d::CCArray::objectAtIndex(v45, 0);
(*(void (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v49 + 160LL))(v49);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 728) + 160LL))(*(_QWORD *)(a1 + 728));
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 744) + 160LL))(*(_QWORD *)(a1 + 744));
v58 = cocos2d::CCLabelBMFont::create("9999x9999", (const char *)&qword_140704F78);
*(_QWORD *)(a1 + 688) = v58;
(*(void (__fastcall **)(_QWORD, struct cocos2d::CCLabelBMFont *))(**(_QWORD **)(a1 + 584) + 464LL))(
*(_QWORD *)(a1 + 584),
v58);
v59 = **(_QWORD **)(a1 + 688);
v60 = *(_QWORD *)(a1 + 688);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v137, v138 * 0.5, (float)(v139 * 0.5) - 8.0);
(*(void (__fastcall **)(__int64, __int64))(v59 + 184))(v60, v61);
v62 = cocos2d::CCLabelBMFont::create("Quality", (const char *)&qword_140704F78);
*(_QWORD *)(a1 + 696) = v62;
(*(void (__fastcall **)(_QWORD, struct cocos2d::CCLabelBMFont *))(**(_QWORD **)(a1 + 584) + 464LL))(
*(_QWORD *)(a1 + 584),
v62);
v63 = **(_QWORD **)(a1 + 696);
v64 = *(_QWORD *)(a1 + 696);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v137, v138 * 0.5, (float)(v139 * 0.5) - 66.0);
(*(void (__fastcall **)(__int64, __int64))(v63 + 184))(v64, v65);
v66 = cocos2d::CCLabelBMFont::create("Texture Quality", "goldFont.fnt");
(*(void (__fastcall **)(_QWORD, struct cocos2d::CCLabelBMFont *))(**(_QWORD **)(a1 + 584) + 464LL))(
*(_QWORD *)(a1 + 584),
v66);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v130, 0.0, 25.0);
v68 = v67;
v69 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 696) + 200LL))(*(_QWORD *)(a1 + 696));
cocos2d::CCPoint::operator+(v69, &v137, v68);
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, __int64 **))(*(_QWORD *)v66 + 184LL))(v66, &v137);
v70 = cocos2d::CCLabelBMFont::create("Windowed Resolution", "goldFont.fnt");
*(_QWORD *)(a1 + 680) = v70;
(*(void (__fastcall **)(_QWORD, struct cocos2d::CCLabelBMFont *))(**(_QWORD **)(a1 + 584) + 464LL))(
*(_QWORD *)(a1 + 584),
v70);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v130, 0.0, 25.0);
v72 = v71;
v73 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 688) + 200LL))(*(_QWORD *)(a1 + 688));
cocos2d::CCPoint::operator+(v73, &v137, v72);
(*(void (__fastcall **)(_QWORD, __int64 **))(**(_QWORD **)(a1 + 680) + 184LL))(*(_QWORD *)(a1 + 680), &v137);
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v66 + 160LL))(v66);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 680) + 160LL))(*(_QWORD *)(a1 + 680));
v74 = (__int64 *)cocos2d::CCSprite::createWithSpriteFrameName("edit_leftBtn_001.png");
v137 = (__int64 *)operator new(0x208u);
v75 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::CCMenuItemSpriteExtra((__int64)v137);
if ( v75 )
{
if ( CCMenuItemSpriteExtra::init((__int64 *)v75, v74, 0, a1, (__int64)VideoOptionsLayer::onResolutionPrev) )
{
cocos2d::CCObject::autorelease(v75);
goto LABEL_47;
}
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v75 + 8LL))(v75, 1);
}
v75 = nullptr;
LABEL_47:
*(_QWORD *)(a1 + 664) = v75;
(*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(**(_QWORD **)(a1 + 552) + 464LL))(*(_QWORD *)(a1 + 552), v75);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v130, -70.0, 0.0);
v77 = v76;
v78 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 688) + 200LL))(*(_QWORD *)(a1 + 688));
cocos2d::CCPoint::operator+(v78, &v137, v77);
v79 = **(_QWORD **)(a1 + 664);
v80 = *(_QWORD *)(a1 + 664);
cocos2d::CCNode::convertToNodeSpace(*(_QWORD *)(a1 + 552), &v129, &v137);
(*(void (__fastcall **)(__int64, __int64))(v79 + 184))(v80, v81);
*(_DWORD *)(*(_QWORD *)(a1 + 664) + 372LL) = 0x40000000;
v82 = (__int64 *)cocos2d::CCSprite::createWithSpriteFrameName("edit_rightBtn_001.png");
v137 = (__int64 *)operator new(0x208u);
v83 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::CCMenuItemSpriteExtra((__int64)v137);
if ( v83 )
{
if ( CCMenuItemSpriteExtra::init((__int64 *)v83, v82, 0, a1, (__int64)VideoOptionsLayer::onResolutionNext) )
{
cocos2d::CCObject::autorelease(v83);
goto LABEL_52;
}
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v83 + 8LL))(v83, 1);
}
v83 = nullptr;
LABEL_52:
*(_QWORD *)(a1 + 672) = v83;
(*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(**(_QWORD **)(a1 + 552) + 464LL))(*(_QWORD *)(a1 + 552), v83);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v130, 70.0, 0.0);
v85 = v84;
v86 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 688) + 200LL))(*(_QWORD *)(a1 + 688));
cocos2d::CCPoint::operator+(v86, &v137, v85);
v87 = **(_QWORD **)(a1 + 672);
v88 = *(_QWORD *)(a1 + 672);
cocos2d::CCNode::convertToNodeSpace(*(_QWORD *)(a1 + 552), &v129, &v137);
(*(void (__fastcall **)(__int64, __int64))(v87 + 184))(v88, v89);
*(_DWORD *)(*(_QWORD *)(a1 + 672) + 372LL) = 0x40000000;
v90 = (__int64 *)cocos2d::CCSprite::createWithSpriteFrameName("edit_leftBtn_001.png");
v137 = (__int64 *)operator new(0x208u);
v91 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::CCMenuItemSpriteExtra((__int64)v137);
if ( v91 )
{
if ( CCMenuItemSpriteExtra::init((__int64 *)v91, v90, 0, a1, (__int64)VideoOptionsLayer::onTextureQualityPrev) )
{
cocos2d::CCObject::autorelease(v91);
goto LABEL_57;
}
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v91 + 8LL))(v91, 1);
}
v91 = nullptr;
LABEL_57:
(*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(**(_QWORD **)(a1 + 552) + 464LL))(*(_QWORD *)(a1 + 552), v91);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v130, -70.0, 0.0);
v93 = v92;
v94 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 696) + 200LL))(*(_QWORD *)(a1 + 696));
cocos2d::CCPoint::operator+(v94, &v137, v93);
v95 = *(_QWORD *)v91;
cocos2d::CCNode::convertToNodeSpace(*(_QWORD *)(a1 + 552), &v129, &v137);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v95 + 184))(v91, v96);
*((_DWORD *)v91 + 93) = 0x40000000;
v97 = (__int64 *)cocos2d::CCSprite::createWithSpriteFrameName("edit_rightBtn_001.png");
v137 = (__int64 *)operator new(0x208u);
v98 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::CCMenuItemSpriteExtra((__int64)v137);
if ( v98 )
{
if ( CCMenuItemSpriteExtra::init((__int64 *)v98, v97, 0, a1, (__int64)VideoOptionsLayer::onTextureQualityNext) )
{
cocos2d::CCObject::autorelease(v98);
goto LABEL_62;
}
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v98 + 8LL))(v98, 1);
}
v98 = nullptr;
LABEL_62:
(*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(**(_QWORD **)(a1 + 552) + 464LL))(*(_QWORD *)(a1 + 552), v98);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v130, 70.0, 0.0);
v100 = v99;
v101 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 696) + 200LL))(*(_QWORD *)(a1 + 696));
cocos2d::CCPoint::operator+(v101, &v137, v100);
v102 = *(_QWORD *)v98;
cocos2d::CCNode::convertToNodeSpace(*(_QWORD *)(a1 + 552), &v129, &v137);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v102 + 184))(v98, v103);
*((_DWORD *)v98 + 93) = 0x40000000;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v136, v138 * 0.5, (float)((float)(v139 * 0.5) - 130.0) + 23.0);
v104 = (__int64 *)ButtonSprite::create_1(
(int)"Back",
80,
0,
1.0,
1,
(__int64)"goldFont.fnt",
(__int64)"GJ_button_01.png",
0);
v137 = (__int64 *)operator new(0x208u);
v105 = (__int64 *)CCMenuItemSpriteExtra::CCMenuItemSpriteExtra((__int64)v137);
v106 = (cocos2d::CCObject *)v105;
if ( v105 )
{
if ( CCMenuItemSpriteExtra::init(v105, v104, 0, a1, (__int64)VideoOptionsLayer::onClose) )
{
cocos2d::CCObject::autorelease(v106);
goto LABEL_67;
}
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v106 + 8LL))(v106, 1);
}
v106 = nullptr;
LABEL_67:
(*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(**(_QWORD **)(a1 + 552) + 464LL))(*(_QWORD *)(a1 + 552), v106);
v107 = (__int64 *)ButtonSprite::create_1(
(int)"Apply",
80,
0,
1.0,
1,
(__int64)"goldFont.fnt",
(__int64)"GJ_button_01.png",
0);
v137 = (__int64 *)operator new(0x208u);
v108 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::CCMenuItemSpriteExtra((__int64)v137);
if ( v108 )
{
if ( CCMenuItemSpriteExtra::init((__int64 *)v108, v107, 0, a1, (__int64)VideoOptionsLayer::onApply) )
{
cocos2d::CCObject::autorelease(v108);
goto LABEL_72;
}
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v108 + 8LL))(v108, 1);
}
v108 = nullptr;
LABEL_72:
(*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(**(_QWORD **)(a1 + 552) + 464LL))(*(_QWORD *)(a1 + 552), v108);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v130, -55.0, 0.0);
cocos2d::CCPoint::operator+(v136, &v137, v109);
v110 = *(_QWORD *)v106;
cocos2d::CCNode::convertToNodeSpace(*(_QWORD *)(a1 + 552), &v129, &v137);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v110 + 184))(v106, v111);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v130, 55.0, 0.0);
cocos2d::CCPoint::operator+(v136, &v137, v112);
v113 = *(_QWORD *)v108;
cocos2d::CCNode::convertToNodeSpace(*(_QWORD *)(a1 + 552), &v129, &v137);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v113 + 184))(v108, v114);
v115 = (__int64 *)cocos2d::CCSprite::createWithSpriteFrameName("GJ_closeBtn_001.png");
v137 = (__int64 *)operator new(0x208u);
v116 = (__int64 *)CCMenuItemSpriteExtra::CCMenuItemSpriteExtra((__int64)v137);
v117 = v116;
if ( v116 )
{
if ( CCMenuItemSpriteExtra::init(v116, v115, 0, a1, (__int64)VideoOptionsLayer::onClose) )
{
cocos2d::CCObject::autorelease((cocos2d::CCObject *)v117);
goto LABEL_77;
}
(*(void (__fastcall **)(__int64 *, __int64))(*v117 + 8))(v117, 1);
}
v117 = nullptr;
LABEL_77:
*((_DWORD *)v117 + 93) = 1069547520;
(*(void (__fastcall **)(_QWORD, __int64 *))(**(_QWORD **)(a1 + 552) + 464LL))(*(_QWORD *)(a1 + 552), v117);
v118 = *v117;
v119 = *(_QWORD *)(a1 + 552);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)&v137,
(float)((float)(v138 * 0.5) - 180.0) + 5.0,
(float)((float)(v139 * 0.5) + 130.0) - 5.0);
cocos2d::CCNode::convertToNodeSpace(v119, v130, v120);
(*(void (__fastcall **)(__int64 *, __int64))(v118 + 184))(v117, v121);
v122 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v129 = (__int128 *)operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v129);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v122 = qword_14090BFD0;
}
VideoOptionsLayer::updateTextureQuality(a1, *(unsigned int *)(v122 + 1092));
VideoOptionsLayer::updateResolution(a1, *(unsigned int *)(a1 + 756));
v137 = (__int64 *)operator new(0x2C8u);
v123 = (cocos2d::CCObject *)ButtonSprite::ButtonSprite((__int64)v137);
if ( v123 )
{
if ( ButtonSprite::init_1(
(__int64)v123,
(__int64)"Advanced",
60,
0,
1058642330,
0,
"goldFont.fnt",
(__int64)"GJ_button_04.png",
1103626240) )
{
cocos2d::CCObject::autorelease(v123);
}
else
{
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v123 + 8LL))(v123, 1);
v123 = nullptr;
}
}
v137 = (__int64 *)operator new(0x208u);
v124 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::CCMenuItemSpriteExtra((__int64)v137);
if ( v124 )
{
if ( CCMenuItemSpriteExtra::init((__int64 *)v124, (__int64 *)v123, 0, a1, (__int64)VideoOptionsLayer::onAdvanced) )
{
cocos2d::CCObject::autorelease(v124);
LABEL_88:
(*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(**(_QWORD **)(a1 + 552) + 464LL))(
*(_QWORD *)(a1 + 552),
v124);
v125 = *(_QWORD *)v124;
v126 = *(_QWORD *)(a1 + 552);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)&v137,
(float)((float)(v138 * 0.5) + 180.0) - 48.0,
(float)((float)(v139 * 0.5) + 130.0) - 20.0);
cocos2d::CCNode::convertToNodeSpace(v126, v130, v127);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v125 + 184))(v124, v128);
return 1;
}
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v124 + 8LL))(v124, 1);
}
v124 = nullptr;
goto LABEL_88;
}
return result;
}