//
// GJOptionsLayer::init from 0xa2384c to 0xa23b54 (776 bytes)
//
// 8 xrefs:
// > EditorOptionsLayer::init @ 0xa23b74
// > GameOptionsLayer::init @ 0xa23e70
// > GJOptionsLayer::create @ 0xa243c0
// > GameLevelOptionsLayer::init @ 0xa25714
// > LevelOptionsLayer::init @ 0xb63864
// > SFXSettingsPopup::init @ 0xb8e488
// > FindObjectOptionsLayer::init @ 0xcbca6c
// > ??> @ 0xd5838
//
// This function is hookable on this platform (idp: arm, 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 12:59:41 +0000
//
__int64 __fastcall GJOptionsLayer::init(GJOptionsLayer *this, int a2, float a3)
{
cocos2d::CCDirector *v4; // x0
unsigned int v5; // w23
cocos2d::CCDirector *v6; // x0
cocos2d::CCDictionary *WinSize; // x0
cocos2d::CCObject *v8; // x0
cocos2d::CCDictionary *v9; // x0
cocos2d::CCObject *v10; // x0
cocos2d::CCMenu *v11; // x0
__int64 v12; // x0
const char *v13; // x1
__int64 v14; // x21
__int64 v15; // x24
cocos2d::CCNode *v16; // x27
void (__fastcall *v17)(__int64, __int64 *); // x26
float v18; // s8
const char *v19; // x1
__int64 v20; // x0
__int64 v21; // x0
cocos2d::CCDirector **v22; // x26
cocos2d::CCNode *v23; // x28
void (__fastcall *v24)(cocos2d::CCDirector **, __int64 *); // x27
cocos2d::CCDirector *v25; // x0
float v26; // s0
const char *v27; // x1
cocos2d::CCSprite *v28; // x24
__int64 v29; // x0
cocos2d::CCDirector **v30; // x24
cocos2d::CCNode *v31; // x26
void (__fastcall *v32)(cocos2d::CCDirector **, __int64 *); // x25
cocos2d::CCDirector *v33; // x0
float v34; // s0
__int64 v36; // [xsp+70h] [xbp+70h] BYREF
__int64 v37; // [xsp+78h] [xbp+78h] BYREF
_BYTE v38[8]; // [xsp+80h] [xbp+80h] BYREF
v4 = (cocos2d::CCDirector *)(unsigned __int8)SetupTriggerPopup::init(this, nullptr, nullptr, 400.0, a3, a2, 0.0);
v5 = (unsigned __int8)v4;
if ( (_BYTE)v4 )
{
*((_BYTE *)this + 596) = 1;
v6 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v4);
WinSize = (cocos2d::CCDictionary *)cocos2d::CCDirector::getWinSize(&v36, v6);
v8 = (cocos2d::CCObject *)cocos2d::CCDictionary::create(WinSize);
*((_QWORD *)this + 131) = v8;
v9 = (cocos2d::CCDictionary *)cocos2d::CCObject::retain(v8);
v10 = (cocos2d::CCObject *)cocos2d::CCDictionary::create(v9);
*((_QWORD *)this + 130) = v10;
v11 = (cocos2d::CCMenu *)cocos2d::CCObject::retain(v10);
v12 = cocos2d::CCMenu::create(v11);
*((_QWORD *)this + 69) = v12;
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**((_QWORD **)this + 73) + 464LL))(
*((_QWORD *)this + 73),
v12,
10);
(*(void (__fastcall **)(GJOptionsLayer *))(*(_QWORD *)this + 1504LL))(this);
v14 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_closeBtn_001.png", v13);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v14 + 160LL))(v14, 0.8);
v15 = CCMenuItemSpriteExtra::create(v14, 0, (__int64)this, 1368, 1);
CCMenuItemSpriteExtra::setSizeMult(v15, 1.5);
(*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 69) + 456LL))(*((_QWORD *)this + 69), v15);
v16 = *((cocos2d::CCNode **)this + 69);
v17 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v15 + 184LL);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v38,
3.0 - (float)((float)(*((float *)this + 183) * 0.5) - (float)(*(float *)&v36 * 0.5)),
(float)((float)(*((float *)this + 184) * 0.5) + (float)(*((float *)&v36 + 1) * 0.5)) - 3.0);
cocos2d::CCNode::convertToNodeSpace(&v37, v16, (const cocos2d::CCPoint *)v38);
v17(v15, &v37);
v18 = *((float *)&v36 + 1) * 0.5;
v20 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_arrow_01_001.png", v19);
v21 = CCMenuItemSpriteExtra::create(v20, 0, (__int64)this, (__int64)GJOptionsLayer::onPrevPage, 0);
*((_QWORD *)this + 132) = v21;
(*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 69) + 456LL))(*((_QWORD *)this + 69), v21);
v22 = *((cocos2d::CCDirector ***)this + 132);
v23 = *((cocos2d::CCNode **)this + 69);
v24 = *((void (__fastcall **)(cocos2d::CCDirector **, __int64 *))*v22 + 23);
v25 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(*v22);
cocos2d::CCDirector::getScreenLeft(v25);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v38, v26 + 20.0, v18);
cocos2d::CCNode::convertToNodeSpace(&v37, v23, (const cocos2d::CCPoint *)v38);
v24(v22, &v37);
CCMenuItemSpriteExtra::setSizeMult(*((_QWORD *)this + 132), 1.5);
v28 = (cocos2d::CCSprite *)cocos2d::CCSprite::createWithSpriteFrameName(
(cocos2d::CCSprite *)"GJ_arrow_01_001.png",
v27);
cocos2d::CCSprite::setFlipX(v28, 1);
v29 = CCMenuItemSpriteExtra::create((__int64)v28, 0, (__int64)this, (__int64)GJOptionsLayer::onNextPage, 0);
*((_QWORD *)this + 133) = v29;
(*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 69) + 456LL))(*((_QWORD *)this + 69), v29);
v30 = *((cocos2d::CCDirector ***)this + 133);
v31 = *((cocos2d::CCNode **)this + 69);
v32 = *((void (__fastcall **)(cocos2d::CCDirector **, __int64 *))*v30 + 23);
v33 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(*v30);
cocos2d::CCDirector::getScreenRight(v33);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v38, v34 - 20.0, v18);
cocos2d::CCNode::convertToNodeSpace(&v37, v31, (const cocos2d::CCPoint *)v38);
v32(v30, &v37);
CCMenuItemSpriteExtra::setSizeMult(*((_QWORD *)this + 133), 1.5);
GJOptionsLayer::goToPage(this, 0);
}
return v5;
}