//
// MoreVideoOptionsLayer::init from 0x52ed5c to 0x52f0b4 (856 bytes)
//
// 1 xrefs:
// > MoreVideoOptionsLayer::create @ 0x52d4f0
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:52:02 +0000
//
GameManager *__fastcall MoreVideoOptionsLayer::init(MoreVideoOptionsLayer *this)
{
GameManager *v2; // r0
GameManager *v3; // r9
GameManager *v4; // r0
cocos2d::CCDirector *v5; // r0
cocos2d::CCLayer *WinSize; // r0
int v7; // r0
int v8; // r3
int v9; // r6
void (__fastcall *v10)(int, _BYTE *); // r8
void (__fastcall *v11)(int, _BYTE *); // r8
const char *v12; // r2
int v13; // r6
void (__fastcall *v14)(int, _BYTE *); // r8
cocos2d::CCDictionary *v15; // r0
cocos2d::CCObject *v16; // r0
cocos2d::CCDictionary *v17; // r0
cocos2d::CCObject *v18; // r0
cocos2d::CCMenu *v19; // r0
int v20; // r0
const char *v21; // r1
int v22; // r0
int v23; // r10
void (__fastcall *v24)(int, _BYTE *); // r11
float v25; // s16
const char *v26; // r1
int v27; // r0
int v28; // r0
cocos2d::CCDirector *v29; // r0
void (__fastcall *v30)(int, _BYTE *); // r11
cocos2d::CCDirector *v31; // r0
float v32; // r0
const char *v33; // r1
cocos2d::CCSprite *v34; // r10
int v35; // r0
cocos2d::CCDirector *v36; // r0
int v37; // r10
void (__fastcall *v38)(int, _BYTE *); // r11
cocos2d::CCDirector *v39; // r0
float v40; // r0
cocos2d::CCPoint *v42; // [sp+8h] [bp-4Ch]
cocos2d::CCPoint *v43; // [sp+8h] [bp-4Ch]
cocos2d::CCPoint *v44; // [sp+8h] [bp-4Ch]
int v45; // [sp+Ch] [bp-48h]
float v46; // [sp+14h] [bp-40h] BYREF
float v47; // [sp+18h] [bp-3Ch]
int (__fastcall *v48)(MoreVideoOptionsLayer *, cocos2d::CCObject *); // [sp+1Ch] [bp-38h]
int v49; // [sp+20h] [bp-34h]
_DWORD (*v50)(MoreVideoOptionsLayer *__hidden, cocos2d::CCObject *); // [sp+24h] [bp-30h]
int v51; // [sp+28h] [bp-2Ch]
_DWORD (*v52)(MoreVideoOptionsLayer *__hidden, cocos2d::CCObject *); // [sp+2Ch] [bp-28h]
int v53; // [sp+30h] [bp-24h]
_BYTE v54[8]; // [sp+34h] [bp-20h] BYREF
_BYTE v55[16]; // [sp+3Ch] [bp-18h] BYREF
v55[0] = 0;
v55[1] = 0;
v55[2] = 0;
v55[3] = 75;
v2 = (GameManager *)cocos2d::CCLayerColor::initWithColor(this, v55);
v3 = v2;
if ( v2 )
{
v4 = (GameManager *)GameManager::sharedState(v2);
if ( GameManager::getGameVariable(v4, "0168") )
*((_BYTE *)this + 468) = 1;
FLAlertLayer::incrementForcePrio(this);
(*(void (__fastcall **)(MoreVideoOptionsLayer *, int))(*(_DWORD *)this + 500))(this, 1);
v5 = (cocos2d::CCDirector *)(*(int (__fastcall **)(MoreVideoOptionsLayer *, int))(*(_DWORD *)this + 536))(this, 1);
cocos2d::CCDirector::sharedDirector(v5);
WinSize = (cocos2d::CCLayer *)cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v46);
v7 = cocos2d::CCLayer::create(WinSize);
v8 = *(_DWORD *)this;
*((_DWORD *)this + 115) = v7;
(*(void (__fastcall **)(MoreVideoOptionsLayer *, int))(v8 + 228))(this, v7);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v55, 0.0, 0.0, 80.0, 80.0);
v9 = cocos2d::extension::CCScale9Sprite::create("GJ_square01.png", v55);
v10 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v9 + 160);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v55, 360.0, 260.0);
v10(v9, v55);
(*(void (__fastcall **)(_DWORD, int, int))(**((_DWORD **)this + 115) + 232))(*((_DWORD *)this + 115), v9, -1);
v11 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v9 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v55, v46 * 0.5, v47 * 0.5);
v11(v9, v55);
v13 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)"Advanced Video Options", "bigFont.fnt", v12);
v14 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v13 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v55, v46 * 0.5, (float)((float)(v47 * 0.5) + 130.0) - 16.0);
v14(v13, v55);
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 115) + 228))(*((_DWORD *)this + 115), v13);
v15 = (cocos2d::CCDictionary *)(*(int (__fastcall **)(int, int))(*(_DWORD *)v13 + 80))(v13, 1058642330);
*((_DWORD *)this + 125) = -1;
v16 = (cocos2d::CCObject *)cocos2d::CCDictionary::create(v15);
*((_DWORD *)this + 134) = v16;
v17 = (cocos2d::CCDictionary *)cocos2d::CCObject::retain(v16);
v18 = (cocos2d::CCObject *)cocos2d::CCDictionary::create(v17);
*((_DWORD *)this + 133) = v18;
v19 = (cocos2d::CCMenu *)cocos2d::CCObject::retain(v18);
v20 = cocos2d::CCMenu::create(v19);
*((_DWORD *)this + 111) = v20;
(*(void (__fastcall **)(_DWORD, int, int))(**((_DWORD **)this + 115) + 232))(*((_DWORD *)this + 115), v20, 10);
MoreVideoOptionsLayer::addToggle(
this,
"Smooth Fix",
"0023",
"Makes some optimizations that can reduce lag. Disable if game speed becomes inconsistent.");
MoreVideoOptionsLayer::addToggle(this, "Show FPS", "0115", "Shows frames per second while playing.");
v22 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_closeBtn_001.png", v21);
v48 = MoreVideoOptionsLayer::onClose;
v49 = 0;
v23 = CCMenuItemSpriteExtra::create(v22, 0, (int)this, (int)MoreVideoOptionsLayer::onClose, 0);
CCMenuItemSpriteExtra::setSizeMult(v23, 1.5);
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 111) + 228))(*((_DWORD *)this + 111), v23);
v24 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v23 + 92);
v42 = *((cocos2d::CCPoint **)this + 111);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v55,
(float)((float)(v46 * 0.5) - 180.0) + 5.0,
(float)((float)(v47 * 0.5) + 130.0) - 5.0);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v54, v42);
v24(v23, v54);
v25 = v47 * 0.5;
v27 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_arrow_01_001.png", v26);
v51 = 0;
v50 = MoreVideoOptionsLayer::onPrevPage;
v28 = CCMenuItemSpriteExtra::create(v27, 0, (int)this, (int)MoreVideoOptionsLayer::onPrevPage, 0);
*((_DWORD *)this + 135) = v28;
v29 = (cocos2d::CCDirector *)(*(int (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 111) + 228))(
*((_DWORD *)this + 111),
v28);
v45 = *((_DWORD *)this + 135);
v30 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v45 + 92);
v43 = *((cocos2d::CCPoint **)this + 111);
v31 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v29);
v32 = COERCE_FLOAT(cocos2d::CCDirector::getScreenLeft(v31));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v55, v32 + 24.0, v25);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v54, v43);
v30(v45, v54);
v34 = (cocos2d::CCSprite *)cocos2d::CCSprite::createWithSpriteFrameName(
(cocos2d::CCSprite *)"GJ_arrow_01_001.png",
v33);
cocos2d::CCSprite::setFlipX(v34, 1);
v52 = MoreVideoOptionsLayer::onNextPage;
v53 = 0;
v35 = CCMenuItemSpriteExtra::create((int)v34, 0, (int)this, (int)MoreVideoOptionsLayer::onNextPage, 0);
*((_DWORD *)this + 136) = v35;
v36 = (cocos2d::CCDirector *)(*(int (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 111) + 228))(
*((_DWORD *)this + 111),
v35);
v37 = *((_DWORD *)this + 136);
v38 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v37 + 92);
v44 = *((cocos2d::CCPoint **)this + 111);
v39 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v36);
v40 = COERCE_FLOAT(cocos2d::CCDirector::getScreenRight(v39));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v55, v40 - 24.0, v25);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v54, v44);
v38(v37, v54);
MoreVideoOptionsLayer::goToPage((const char **)this, 0);
}
return v3;
}