//
// LevelOptionsLayer::setupOptions from 0x6aae70 to 0x6ab13a (714 bytes)
//
// 0 xrefs:
//
// 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:56:34 +0000
//
cocos2d::CCNodeRGBA *__fastcall LevelOptionsLayer::setupOptions(const cocos2d::CCPoint **this)
{
int v2; // r3
cocos2d::CCNodeRGBA *result; // r0
int v4; // r3
int v5; // r5
int v6; // r10
const cocos2d::CCPoint *v7; // r8
void (__fastcall *v8)(int, _DWORD *); // r6
const char *v9; // r1
int v10; // r6
int v11; // r6
const cocos2d::CCPoint *v12; // r9
int (__fastcall *v13)(int, _BYTE *); // r8
float v14; // [sp+34h] [bp-3Ch] BYREF
float v15; // [sp+38h] [bp-38h]
_BYTE v16[8]; // [sp+3Ch] [bp-34h] BYREF
_BYTE v17[8]; // [sp+44h] [bp-2Ch] BYREF
_DWORD v18[2]; // [sp+4Ch] [bp-24h] BYREF
int v19[3]; // [sp+54h] [bp-1Ch] BYREF
int v20; // [sp+60h] [bp-10h] BYREF
int v21; // [sp+64h] [bp-Ch]
int v22; // [sp+68h] [bp-8h]
cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)this);
cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v14);
GJOptionsLayer::addToggle(
(GJOptionsLayer *)this,
"Mini Mode",
0,
*((unsigned __int8 *)*(this + 195) + 276),
(const char *)&unk_B6B226);
GJOptionsLayer::addToggle(
(GJOptionsLayer *)this,
"Dual Mode",
1,
*((unsigned __int8 *)*(this + 195) + 277),
(const char *)&unk_B6B226);
v2 = (int)*(this + 195);
if ( !*(_BYTE *)(v2 + 308) )
GJOptionsLayer::addToggle(
(GJOptionsLayer *)this,
"2-Player Mode",
2,
*(unsigned __int8 *)(v2 + 280),
"Players are controlled separately.\n"
"Player 1: Left side\n"
"Player 2: Right side\n"
"(You can change the controls in the options menu)");
GJOptionsLayer::addToggle(
(GJOptionsLayer *)this,
"Mirror Mode",
4,
*((unsigned __int8 *)*(this + 195) + 278),
(const char *)&unk_B6B226);
GJOptionsLayer::addToggle(
(GJOptionsLayer *)this,
"Flip\nGravity",
5,
*((unsigned __int8 *)*(this + 195) + 309),
(const char *)&unk_B6B226);
GJOptionsLayer::addToggle(
(GJOptionsLayer *)this,
"Rotate\nGameplay",
6,
*((unsigned __int8 *)*(this + 195) + 279),
(const char *)&unk_B6B226);
result = GJOptionsLayer::addToggle(
(GJOptionsLayer *)this,
"Reverse\nGameplay",
7,
*((unsigned __int8 *)*(this + 195) + 310),
(const char *)&unk_B6B226);
v4 = (int)*(this + 195);
v5 = *(unsigned __int8 *)(v4 + 308);
if ( !*(_BYTE *)(v4 + 308) )
{
GJOptionsLayer::addToggle(
(GJOptionsLayer *)this,
"No Time\nPenalty",
20,
*(unsigned __int8 *)(v4 + 350),
"In platformer mode you automatically lose 1000 points per second. Toggle to disable this penalty.");
v20 = v5;
v21 = v5;
v22 = v5;
std::string::__init(&v20, "Spawn Group:", 0xCu);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v18, (float)(v14 * 0.5) + 50.0, (float)(v15 * 0.5) - 100.0);
SetupTriggerPopup::createValueControlAdvanced(
this,
13,
(unsigned __int8 *)&v20,
(int)v18,
1060320051,
1,
3,
6,
1,
0,
1176255488,
v5,
v5,
v5,
2,
v5);
std::string::~string((int)&v20);
v19[0] = v5;
v19[1] = v5;
v19[2] = v5;
std::string::__init(v19, "Spawn Group", 0xBu);
v20 = v5;
v21 = v5;
v22 = v5;
std::string::__init(
&v20,
"Lets you set a target position for player spawn.\n"
"If the group contains multiple objects a random target will be selected.",
0x79u);
v6 = InfoAlertButton::create((char *)v19, (int)&v20, COERCE_INT(0.5));
std::string::~string((int)&v20);
std::string::~string((int)v19);
(*(void (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 111) + 228))(*(this + 111), v6);
v7 = *(this + 111);
v8 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v6 + 92);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v17,
(float)((float)(v14 * 0.5) + 50.0) - 55.0,
(float)((float)(v15 * 0.5) - 100.0) + 24.0);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v18, v7);
v8(v6, v18);
v10 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_optionsBtn_001.png", v9);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v10 + 80))(v10, 1058642330);
v18[0] = LevelOptionsLayer::onSettings;
v18[1] = 0;
v11 = CCMenuItemSpriteExtra::create(v10, 0, (int)this, (int)LevelOptionsLayer::onSettings, 0);
(*(void (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 111) + 228))(*(this + 111), v11);
v12 = *(this + 111);
v13 = *(int (__fastcall **)(int, _BYTE *))(*(_DWORD *)v11 + 92);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v16,
(float)((float)(*((float *)this + 139) * 0.5) + (float)(v14 * 0.5)) - 25.0,
(float)((float)(*((float *)this + 140) * 0.5) + (float)(v15 * 0.5)) - 25.0);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v17, v12);
return (cocos2d::CCNodeRGBA *)v13(v11, v17);
}
return result;
}