//
// VideoOptionsLayer::init from 0x424a38 to 0x42551e (2790 bytes)
//
// 1 xrefs:
// > VideoOptionsLayer::create @ 0x424458
//
// 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
//
bool VideoOptionsLayer::init(VideoOptionsLayer *a1)
{
GameManager *v2; // r0
GameManager *v3; // r0
unsigned int v4; // r1
cocos2d::CCArray *v5; // r0
cocos2d::CCDirector *v6; // r0
cocos2d::CCLayer *v7; // r0
VideoOptionsLayer_vtbl *v8; // r3
GameManager *v9; // r0
GameManager *v10; // r0
GameManager *v11; // r0
cocos2d::CCNode *v12; // r6
void (__fastcall *setContentSize)(cocos2d::CCNode *__hidden, const cocos2d::CCSize *); // r7
void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r7
cocos2d::CCLabelBMFont *v15; // r6
void (__fastcall *v16)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r7
int m_resolution; // r7
const char *v18; // r6
GameManager *v19; // r0
cocos2d::CCArray *m_availableResolutions; // r9
cocos2d::CCObject *v21; // r0
cocos2d::CCArray *v22; // r6
cocos2d::CCObject *v23; // r0
cocos2d::CCMenu *v24; // r0
cocos2d::CCArray *v25; // r0
cocos2d::CCArray *v26; // r8
GameManager *v27; // r0
bool v28; // r10
int *v29; // r10
GameManager *v30; // r0
GameManager *v31; // r0
cocos2d::CCLabelBMFont *v32; // r0
int v33; // r3
cocos2d::CCLabelBMFont *v34; // r0
cocos2d::CCLabelBMFont *m_selectedResolutionLabel; // r7
void (__fastcall *v36)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r8
cocos2d::CCLabelBMFont *v37; // r0
cocos2d::CCLabelBMFont *m_qualityLabel; // r5
void (__fastcall *v39)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r7
cocos2d::CCLabelBMFont *v40; // r5
void (__fastcall *v41)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r8
const cocos2d::CCPoint *v42; // r10
cocos2d::CCLabelBMFont *v43; // r0
cocos2d::CCLabelBMFont *m_windowedResolutionLabel; // r8
const cocos2d::CCPoint *v45; // r10
cocos2d::CCSprite *v46; // r0
CCMenuItemSpriteExtra *v47; // r0
CCMenuItemSpriteExtra *m_prevResolutionBtn; // r8
const cocos2d::CCPoint *v49; // r10
cocos2d::CCSprite *v50; // r0
CCMenuItemSpriteExtra *v51; // r0
CCMenuItemSpriteExtra *m_nextResolutionBtn; // r8
const cocos2d::CCPoint *v53; // r10
cocos2d::CCSprite *v54; // r0
CCMenuItemSpriteExtra *v55; // r8
const cocos2d::CCPoint *v56; // r10
cocos2d::CCSprite *v57; // r0
CCMenuItemSpriteExtra *v58; // r8
const cocos2d::CCPoint *v59; // r10
ButtonSprite *v60; // r0
CCMenuItemSpriteExtra *v61; // r9
ButtonSprite *v62; // r0
CCMenuItemSpriteExtra *v63; // r10
void (__fastcall *v64)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r9
cocos2d::CCSprite *v65; // r0
CCMenuItemSpriteExtra *v66; // r7
cocos2d::CCMenu *v67; // r10
void (__fastcall *v68)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r9
GameManager *v69; // r0
ButtonSprite *v70; // r0
CCMenuItemSpriteExtra *v71; // r5
cocos2d::CCMenu *v72; // r7
void (__fastcall *v73)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r6
float v75; // r2
float v76; // r3
bool v77; // [sp+4h] [bp-D8h]
bool v78; // [sp+4h] [bp-D8h]
float v79; // [sp+10h] [bp-CCh]
cocos2d::CCMenu *m_buttonMenu; // [sp+24h] [bp-B8h]
cocos2d::CCSprite *v81; // [sp+28h] [bp-B4h]
cocos2d::CCSprite *v82; // [sp+28h] [bp-B4h]
cocos2d::CCSprite *v83; // [sp+28h] [bp-B4h]
cocos2d::CCSprite *v84; // [sp+28h] [bp-B4h]
cocos2d::CCSprite *v85; // [sp+28h] [bp-B4h]
int v86; // [sp+2Ch] [bp-B0h]
cocos2d::CCMenu *v87; // [sp+30h] [bp-ACh]
cocos2d::CCMenu *v88; // [sp+30h] [bp-ACh]
cocos2d::CCPoint *v89; // [sp+30h] [bp-ACh]
cocos2d::CCMenu *v90; // [sp+30h] [bp-ACh]
cocos2d::CCMenu *v91; // [sp+30h] [bp-ACh]
cocos2d::CCMenu *v92; // [sp+30h] [bp-ACh]
cocos2d::CCPoint *v93; // [sp+34h] [bp-A8h]
cocos2d::CCMenu *v94; // [sp+34h] [bp-A8h]
cocos2d::CCPoint *v95; // [sp+34h] [bp-A8h]
cocos2d::CCSize v96; // [sp+44h] [bp-98h] BYREF
cocos2d::CCSize v97; // [sp+4Ch] [bp-90h] BYREF
cocos2d::CCPoint v98; // [sp+54h] [bp-88h] BYREF
cocos2d::CCPoint v99; // [sp+5Ch] [bp-80h] BYREF
cocos2d::CCPoint v100; // [sp+64h] [bp-78h] BYREF
cocos2d::CCPoint v101; // [sp+6Ch] [bp-70h] BYREF
cocos2d::SEL_MenuHandler v102; // [sp+74h] [bp-68h]
cocos2d::SEL_MenuHandler v103; // [sp+7Ch] [bp-60h]
cocos2d::SEL_MenuHandler v104; // [sp+84h] [bp-58h]
void (*v105)(VideoOptionsLayer *, cocos2d::CCObject *); // [sp+8Ch] [bp-50h]
int v106; // [sp+90h] [bp-4Ch]
void (*v107)(VideoOptionsLayer *, cocos2d::CCObject *); // [sp+94h] [bp-48h]
int v108; // [sp+98h] [bp-44h]
void (*v109)(VideoOptionsLayer *, cocos2d::CCObject *); // [sp+9Ch] [bp-40h]
int v110; // [sp+A0h] [bp-3Ch]
void (*v111)(VideoOptionsLayer *, cocos2d::CCObject *); // [sp+A4h] [bp-38h]
int v112; // [sp+A8h] [bp-34h]
void (*v113)(VideoOptionsLayer *, cocos2d::CCObject *); // [sp+ACh] [bp-30h]
int v114; // [sp+B0h] [bp-2Ch]
cocos2d::CCPoint v115; // [sp+B4h] [bp-28h] BYREF
cocos2d::CCPoint v116; // [sp+BCh] [bp-20h] BYREF
cocos2d::CCRect v117; // [sp+C4h] [bp-18h] BYREF
cocos2d::CCSize v118; // 0:^0.8
cocos2d::CCRect v119; // 0:kr00_16.16
v117.origin.x = 8388600.0;
v86 = cocos2d::CCLayerColor::initWithColor(a1, (const cocos2d::_ccColor4B *)&v117);
if ( v86 )
{
v2 = GameManager::sharedState();
if ( GameManager::getGameVariable(v2, "0168") )
a1->m_noElasticity = 1;
if ( GameManager::sharedState()->m_menuLayer )
{
v3 = GameManager::sharedState();
MenuLayer::videoOptionsOpened(v3->m_menuLayer);
}
FLAlertLayer::incrementForcePrio(a1);
a1->setTouchEnabled(a1, 1);
a1->setKeypadEnabled(a1, 1);
v5 = (cocos2d::CCArray *)cocos2d::CCArray::createWithCapacity((cocos2d::CCArray *)((char *)&dword_0 + 1), v4);
a1->m_availableResolutions = v5;
cocos2d::CCObject::retain(v5);
v6 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(&v96, v6);
v7 = cocos2d::CCLayer::create();
v8 = a1->FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
a1->m_mainLayer = v7;
v8->addChild(a1, v7);
v9 = GameManager::sharedState();
a1->m_fullscreen = !GameManager::getGameVariable(v9, "0025");
v10 = GameManager::sharedState();
a1->m_borderless = GameManager::getGameVariable(v10, "0170");
v11 = GameManager::sharedState();
a1->m_fix = GameManager::getGameVariable(v11, "0175");
cocos2d::CCRect::CCRect(&v117, 0.0, 0.0, 80.0, 80.0);
v119.origin.x = v75;
v119.origin.y = v76;
v119.size = v118;
v12 = (cocos2d::CCNode *)cocos2d::extension::CCScale9Sprite::create(
(cocos2d::extension::CCScale9Sprite *)"GJ_square01.png",
(const char *)&v117,
v119);
setContentSize = v12->setContentSize;
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v117, 360.0, 260.0);
setContentSize(v12, (const cocos2d::CCSize *)&v117);
a1->m_mainLayer->addChild_0(a1->m_mainLayer, v12, -1);
setPosition = v12->setPosition;
cocos2d::CCPoint::CCPoint(&v117.origin, v96.width * 0.5, v96.height * 0.5);
setPosition(v12, &v117.origin);
v15 = cocos2d::CCLabelBMFont::create();
v16 = v15->setPosition;
cocos2d::CCPoint::CCPoint(&v117.origin, v96.width * 0.5, (float)((float)(v96.height * 0.5) + 130.0) - 14.0);
v16(v15, &v117.origin);
a1->m_mainLayer->addChild(a1->m_mainLayer, v15);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))v15->setScale)(v15, 1060320051);
a1->m_joystickConnected = -1;
PlatformToolbox::getDisplaySize(&v97);
m_resolution = GameManager::sharedState()->m_resolution;
a1->m_currentResolution = -1;
v18 = (_BYTE *)(&dword_0 + 1);
do
{
v19 = GameManager::sharedState();
GameManager::resolutionForKey((cocos2d::CCSize *)&v117, v19, (int)v18);
if ( v117.origin.x <= v97.width && v117.origin.y <= v97.height )
{
m_availableResolutions = a1->m_availableResolutions;
v21 = (cocos2d::CCObject *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i", v18);
cocos2d::CCArray::addObject(m_availableResolutions, v21);
if ( v18 == (const char *)m_resolution )
a1->m_currentResolution = cocos2d::CCArray::count(a1->m_availableResolutions) - 1;
}
++v18;
}
while ( v18 != (const char *)&dword_1C );
if ( !cocos2d::CCArray::count(a1->m_availableResolutions) )
{
v22 = a1->m_availableResolutions;
v23 = (cocos2d::CCObject *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%i",
(const char *)&dword_60 + 3);
cocos2d::CCArray::addObject(v22, v23);
}
if ( a1->m_currentResolution == -1 )
a1->m_currentResolution = cocos2d::CCArray::count(a1->m_availableResolutions) - 1;
v24 = cocos2d::CCMenu::create();
a1->m_buttonMenu = v24;
a1->m_mainLayer->addChild_0(a1->m_mainLayer, v24, 10);
v25 = (cocos2d::CCArray *)cocos2d::CCPoint::CCPoint(
&v98,
(float)(v96.width * 0.5) - 65.0,
(float)(v96.height * 0.5) + 85.0);
v26 = (cocos2d::CCArray *)cocos2d::CCArray::create(v25);
sub_776584((int)&v116, "Fullscreen");
v102.ptr = (void (__cdecl *)(cocos2d::CCObject *))VideoOptionsLayer::onFullscreen;
v102.adj = 0;
v27 = GameManager::sharedState();
v28 = !GameManager::getGameVariable(v27, "0025");
m_buttonMenu = a1->m_buttonMenu;
cocos2d::CCPoint::CCPoint(&v117.origin, &v98);
VideoOptionsLayer::createToggleButton(
(int)a1,
(int)&v116,
v102,
v28,
m_buttonMenu,
&v117.origin,
0.7,
100.0,
0,
v26);
sub_774008(&v116);
v29 = (int *)cocos2d::CCArray::objectAtIndex(v26, 0);
cocos2d::CCArray::removeAllObjects(v26);
sub_776584((int)&v115, "Borderless");
v103.ptr = (void (__cdecl *)(cocos2d::CCObject *))VideoOptionsLayer::onBorderless;
v103.adj = 0;
v30 = GameManager::sharedState();
LOBYTE(m_buttonMenu) = GameManager::getGameVariable(v30, "0170");
v81 = (cocos2d::CCSprite *)a1->m_buttonMenu;
cocos2d::CCPoint::CCPoint(&v116, -24.0, -37.0);
cocos2d::CCPoint::operator+(&v117, &v98, &v116);
a1->m_borderlessToggle = VideoOptionsLayer::createToggleButton(
(int)a1,
(int)&v115,
v103,
(bool)m_buttonMenu,
v81,
&v117.origin,
0.7,
100.0,
0,
v26);
sub_774008(&v115);
a1->m_borderlessLabel = (cocos2d::CCLabelBMFont *)cocos2d::CCArray::objectAtIndex(v26, 0);
cocos2d::CCArray::removeAllObjects(v26);
sub_776584((int)&v115, "Fix");
v104.ptr = (void (__cdecl *)(cocos2d::CCObject *))VideoOptionsLayer::onBorderlessFix;
v104.adj = 0;
v31 = GameManager::sharedState();
LOBYTE(m_buttonMenu) = GameManager::getGameVariable(v31, "0175");
v82 = (cocos2d::CCSprite *)a1->m_buttonMenu;
cocos2d::CCPoint::CCPoint(&v116, 116.0, -37.0);
cocos2d::CCPoint::operator+(&v117, &v98, &v116);
a1->m_fixToggle = VideoOptionsLayer::createToggleButton(
(int)a1,
(int)&v115,
v104,
(bool)m_buttonMenu,
v82,
&v117.origin,
0.7,
100.0,
0,
v26);
sub_774008(&v115);
v32 = (cocos2d::CCLabelBMFont *)cocos2d::CCArray::objectAtIndex(v26, 0);
v33 = *v29;
a1->m_fixLabel = v32;
(*(void (__fastcall **)(int *, int))(v33 + 80))(v29, 1056964608);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))a1->m_borderlessLabel->setScale)(
a1->m_borderlessLabel,
1056964608);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))a1->m_fixLabel->setScale)(a1->m_fixLabel, 1056964608);
v34 = cocos2d::CCLabelBMFont::create();
a1->m_selectedResolutionLabel = v34;
a1->m_mainLayer->addChild(a1->m_mainLayer, v34);
m_selectedResolutionLabel = a1->m_selectedResolutionLabel;
v36 = m_selectedResolutionLabel->setPosition;
cocos2d::CCPoint::CCPoint(&v117.origin, v96.width * 0.5, (float)(v96.height * 0.5) - 8.0);
v36(m_selectedResolutionLabel, &v117.origin);
v37 = cocos2d::CCLabelBMFont::create();
a1->m_qualityLabel = v37;
a1->m_mainLayer->addChild(a1->m_mainLayer, v37);
m_qualityLabel = a1->m_qualityLabel;
v39 = m_qualityLabel->setPosition;
cocos2d::CCPoint::CCPoint(&v117.origin, v96.width * 0.5, (float)(v96.height * 0.5) - 66.0);
v39(m_qualityLabel, &v117.origin);
v40 = cocos2d::CCLabelBMFont::create();
a1->m_mainLayer->addChild(a1->m_mainLayer, v40);
v41 = v40->setPosition;
v42 = a1->m_qualityLabel->getPosition(a1->m_qualityLabel);
cocos2d::CCPoint::CCPoint(&v116, 0.0, 25.0);
cocos2d::CCPoint::operator+(&v117, v42, &v116);
v41(v40, &v117.origin);
v43 = cocos2d::CCLabelBMFont::create();
a1->m_windowedResolutionLabel = v43;
a1->m_mainLayer->addChild(a1->m_mainLayer, v43);
m_windowedResolutionLabel = a1->m_windowedResolutionLabel;
v83 = (cocos2d::CCSprite *)m_windowedResolutionLabel->setPosition;
v45 = a1->m_selectedResolutionLabel->getPosition(a1->m_selectedResolutionLabel);
cocos2d::CCPoint::CCPoint(&v116, 0.0, 25.0);
cocos2d::CCPoint::operator+(&v117, v45, &v116);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, cocos2d::CCRect *))v83)(m_windowedResolutionLabel, &v117);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))v40->setScale)(v40, 1061997773);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))a1->m_windowedResolutionLabel->setScale)(
a1->m_windowedResolutionLabel,
1061997773);
v46 = cocos2d::CCSprite::createWithSpriteFrameName("edit_leftBtn_001.png");
v106 = 0;
v105 = VideoOptionsLayer::onResolutionPrev;
v47 = CCMenuItemSpriteExtra::create(
v46,
nullptr,
(cocos2d::SEL_MenuHandler)__PAIR64__(VideoOptionsLayer::onResolutionPrev, (unsigned int)a1));
a1->m_prevResolutionBtn = v47;
a1->m_buttonMenu->addChild(a1->m_buttonMenu, v47);
m_prevResolutionBtn = a1->m_prevResolutionBtn;
v84 = (cocos2d::CCSprite *)m_prevResolutionBtn->setPosition;
v87 = a1->m_buttonMenu;
v49 = a1->m_selectedResolutionLabel->getPosition(a1->m_selectedResolutionLabel);
cocos2d::CCPoint::CCPoint(&v115, -70.0, 0.0);
cocos2d::CCPoint::operator+(&v116, v49, &v115);
cocos2d::CCNode::convertToNodeSpace(&v117.origin, v87, &v116);
((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCRect *))v84)(m_prevResolutionBtn, &v117);
CCMenuItemSpriteExtra::setSizeMult(a1->m_prevResolutionBtn, 2.0);
v50 = cocos2d::CCSprite::createWithSpriteFrameName("edit_rightBtn_001.png");
v108 = 0;
v107 = VideoOptionsLayer::onResolutionNext;
v51 = CCMenuItemSpriteExtra::create(
v50,
nullptr,
(cocos2d::SEL_MenuHandler)__PAIR64__(VideoOptionsLayer::onResolutionNext, (unsigned int)a1));
a1->m_nextResolutionBtn = v51;
a1->m_buttonMenu->addChild(a1->m_buttonMenu, v51);
m_nextResolutionBtn = a1->m_nextResolutionBtn;
v93 = (cocos2d::CCPoint *)m_nextResolutionBtn->setPosition;
v88 = a1->m_buttonMenu;
v53 = a1->m_selectedResolutionLabel->getPosition(a1->m_selectedResolutionLabel);
cocos2d::CCPoint::CCPoint(&v115, 70.0, 0.0);
cocos2d::CCPoint::operator+(&v116, v53, &v115);
cocos2d::CCNode::convertToNodeSpace(&v117.origin, v88, &v116);
((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCRect *))v93)(m_nextResolutionBtn, &v117);
CCMenuItemSpriteExtra::setSizeMult(a1->m_nextResolutionBtn, 2.0);
v54 = cocos2d::CCSprite::createWithSpriteFrameName("edit_leftBtn_001.png");
v110 = 0;
v109 = VideoOptionsLayer::onTextureQualityPrev;
v55 = CCMenuItemSpriteExtra::create(
v54,
nullptr,
(cocos2d::SEL_MenuHandler)__PAIR64__(VideoOptionsLayer::onTextureQualityPrev, (unsigned int)a1));
a1->m_buttonMenu->addChild(a1->m_buttonMenu, v55);
v89 = (cocos2d::CCPoint *)v55->setPosition;
v94 = a1->m_buttonMenu;
v56 = a1->m_qualityLabel->getPosition(a1->m_qualityLabel);
cocos2d::CCPoint::CCPoint(&v115, -70.0, 0.0);
cocos2d::CCPoint::operator+(&v116, v56, &v115);
cocos2d::CCNode::convertToNodeSpace(&v117.origin, v94, &v116);
((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCRect *))v89)(v55, &v117);
CCMenuItemSpriteExtra::setSizeMult(v55, 2.0);
v57 = cocos2d::CCSprite::createWithSpriteFrameName("edit_rightBtn_001.png");
v112 = 0;
v111 = VideoOptionsLayer::onTextureQualityNext;
v58 = CCMenuItemSpriteExtra::create(
v57,
nullptr,
(cocos2d::SEL_MenuHandler)__PAIR64__(VideoOptionsLayer::onTextureQualityNext, (unsigned int)a1));
a1->m_buttonMenu->addChild(a1->m_buttonMenu, v58);
v85 = (cocos2d::CCSprite *)v58->setPosition;
v90 = a1->m_buttonMenu;
v59 = a1->m_qualityLabel->getPosition(a1->m_qualityLabel);
cocos2d::CCPoint::CCPoint(&v115, 70.0, 0.0);
cocos2d::CCPoint::operator+(&v116, v59, &v115);
cocos2d::CCNode::convertToNodeSpace(&v117.origin, v90, &v116);
((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCRect *))v85)(v58, &v117);
CCMenuItemSpriteExtra::setSizeMult(v58, 2.0);
cocos2d::CCPoint::CCPoint(&v99, v96.width * 0.5, (float)((float)(v96.height * 0.5) - 130.0) + 23.0);
v60 = ButtonSprite::create((ButtonSprite *)"Back", (const char *)&dword_50, 0, 1.0, COERCE_FLOAT(1), v77);
v114 = 0;
v113 = VideoOptionsLayer::onClose;
v61 = CCMenuItemSpriteExtra::create(
v60,
nullptr,
(cocos2d::SEL_MenuHandler)__PAIR64__(VideoOptionsLayer::onClose, (unsigned int)a1));
a1->m_buttonMenu->addChild(a1->m_buttonMenu, v61);
v62 = ButtonSprite::create((ButtonSprite *)"Apply", (const char *)&dword_50, 0, 1.0, COERCE_FLOAT(1), v78);
v115.y = 0.0;
LODWORD(v115.x) = VideoOptionsLayer::onApply;
v63 = CCMenuItemSpriteExtra::create(
v62,
nullptr,
(cocos2d::SEL_MenuHandler)__PAIR64__(VideoOptionsLayer::onApply, (unsigned int)a1));
a1->m_buttonMenu->addChild(a1->m_buttonMenu, v63);
v95 = (cocos2d::CCPoint *)v61->setPosition;
v91 = a1->m_buttonMenu;
cocos2d::CCPoint::CCPoint(&v101, -55.0, 0.0);
cocos2d::CCPoint::operator+(&v116, &v99, &v101);
cocos2d::CCNode::convertToNodeSpace(&v117.origin, v91, &v116);
((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCRect *))v95)(v61, &v117);
v64 = v63->setPosition;
v92 = a1->m_buttonMenu;
cocos2d::CCPoint::CCPoint(&v101, 55.0, 0.0);
cocos2d::CCPoint::operator+(&v116, &v99, &v101);
cocos2d::CCNode::convertToNodeSpace(&v117.origin, v92, &v116);
v64(v63, &v117.origin);
v65 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_closeBtn_001.png");
LODWORD(v116.x) = VideoOptionsLayer::onClose;
v116.y = 0.0;
v66 = CCMenuItemSpriteExtra::create(
v65,
nullptr,
(cocos2d::SEL_MenuHandler)__PAIR64__(VideoOptionsLayer::onClose, (unsigned int)a1));
CCMenuItemSpriteExtra::setSizeMult(v66, 1.5);
a1->m_buttonMenu->addChild(a1->m_buttonMenu, v66);
v67 = a1->m_buttonMenu;
v68 = v66->setPosition;
cocos2d::CCPoint::CCPoint(
&v101,
(float)((float)(v96.width * 0.5) - 180.0) + 5.0,
(float)((float)(v96.height * 0.5) + 130.0) - 5.0);
cocos2d::CCNode::convertToNodeSpace(&v117.origin, v67, &v101);
v68(v66, &v117.origin);
v69 = GameManager::sharedState();
VideoOptionsLayer::updateTextureQuality(a1, v69->m_texQuality);
VideoOptionsLayer::updateResolution(a1, a1->m_currentResolution);
v70 = ButtonSprite::create(
(ButtonSprite *)"Advanced",
(const char *)off_3C,
0,
0.6,
0,
"goldFont.fnt",
"GJ_button_04.png",
(const char *)0x41C80000,
v79);
v117.origin.y = 0.0;
LODWORD(v117.origin.x) = VideoOptionsLayer::onAdvanced;
v71 = CCMenuItemSpriteExtra::create(
v70,
nullptr,
(cocos2d::SEL_MenuHandler)__PAIR64__(VideoOptionsLayer::onAdvanced, (unsigned int)a1));
a1->m_buttonMenu->addChild(a1->m_buttonMenu, v71);
v72 = a1->m_buttonMenu;
v73 = v71->setPosition;
cocos2d::CCPoint::CCPoint(
&v100,
(float)((float)(v96.width * 0.5) + 180.0) - 48.0,
(float)((float)(v96.height * 0.5) + 130.0) - 20.0);
cocos2d::CCNode::convertToNodeSpace(&v101, v72, &v100);
v73(v71, &v101);
}
return v86;
}