//
// LevelOptionsLayer::setupOptions from 0x140324070 to 0x14032452e (1214 bytes)
//
// 2 xrefs:
// > ??> @ 0x14058e2e8
// > ??> @ 0x1406d4d84
//
// 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
//
// Hidden C++ exception states: #wind=1
void LevelOptionsLayer::setupOptions(LevelOptionsLayer *a1)
{
cocos2d::CCDirector *v2; // rax
LevelSettingsObject *m_settingsObject; // r9
LevelSettingsObject *v4; // r9
int v5; // eax
char *v6; // rdi
float v7; // xmm0_4
__int64 v8; // rbx
struct cocos2d::CCPoint v9; // rax
struct cocos2d::CCSprite *v10; // rbx
CCMenuItemSpriteExtra *v11; // rdi
CCMenuItemSpriteExtra_vtbl *v12; // rbx
struct cocos2d::CCPoint v13; // rax
__int128 v14; // [rsp+80h] [rbp-9h] BYREF
__int64 v15; // [rsp+90h] [rbp+7h]
__int64 v16; // [rsp+98h] [rbp+Fh]
__int128 v17; // [rsp+A0h] [rbp+17h] BYREF
__int64 v18; // [rsp+B0h] [rbp+27h]
__int64 v19; // [rsp+B8h] [rbp+2Fh]
float v20; // [rsp+F0h] [rbp+67h]
struct cocos2d::CCPoint v21; // [rsp+100h] [rbp+77h] BYREF
v2 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(a1);
cocos2d::CCDirector::getWinSize(v2);
GJOptionsLayer::addToggleInternal(a1, "Mini Mode", 0, a1->m_settingsObject->m_startMini, byte_140518980);
GJOptionsLayer::addToggleInternal(a1, "Dual Mode", 1, a1->m_settingsObject->m_startDual, byte_140518980);
m_settingsObject = a1->m_settingsObject;
if ( !m_settingsObject->m_startsWithStartPos )
GJOptionsLayer::addToggleInternal(
a1,
"2-Player Mode",
2,
m_settingsObject->m_twoPlayerMode,
"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::addToggleInternal(a1, "Mirror Mode", 4, a1->m_settingsObject->m_mirrorMode, byte_140518980);
GJOptionsLayer::addToggleInternal(a1, "Flip\nGravity", 5, a1->m_settingsObject->m_isFlipped, byte_140518980);
GJOptionsLayer::addToggleInternal(a1, "Rotate\nGameplay", 6, a1->m_settingsObject->m_rotateGameplay, byte_140518980);
GJOptionsLayer::addToggleInternal(a1, "Reverse\nGameplay", 7, a1->m_settingsObject->m_reverseGameplay, byte_140518980);
v4 = a1->m_settingsObject;
if ( !v4->m_startsWithStartPos )
{
GJOptionsLayer::addToggleInternal(
a1,
"No Time\nPenalty",
20,
v4->m_noTimePenalty,
"In platformer mode you automatically lose 1000 points per second. Toggle to disable this penalty.");
v15 = 12;
v16 = 15;
strcpy((char *)&v14, "Spawn Group:");
BYTE13(v14) = 0;
HIWORD(v14) = 0;
cocos2d::CCPoint::CCPoint(4.5724414e33, (float)(v20 * 0.5) + 50.0);
SetupTriggerPopup::createValueControlAdvanced(
(_DWORD)a1,
13,
(unsigned int)&v14,
v5,
1060320051,
1,
3,
6,
1,
0,
1176255488,
0,
0,
0,
2,
0);
v17 = 0;
v18 = 0;
v19 = 15;
*(_QWORD *)&v17 = sub_14003AA10(0x80u);
v18 = 121;
v19 = 127;
strcpy(
(char *)v17,
"Lets you set a target position for player spawn.\n"
"If the group contains multiple objects a random target will be selected.");
v15 = 11;
v16 = 15;
*(_QWORD *)&v14 = 0x7247206E77617053LL;
*((_QWORD *)&v14 + 1) = 7370095;
v6 = InfoAlertButton::create((__int64)&v14, (__int64)&v17);
v7 = ((float (__fastcall *)(cocos2d::CCMenu *, char *))a1->m_buttonMenu->addChild_1)(a1->m_buttonMenu, v6);
v8 = *(_QWORD *)v6;
cocos2d::CCPoint::CCPoint(v7, (float)((float)(v20 * 0.5) + 50.0) - 55.0);
v9 = cocos2d::CCNode::convertToNodeSpace(a1->m_buttonMenu, &v21);
(*(void (__fastcall **)(char *, struct cocos2d::CCPoint))(v8 + 184))(v6, v9);
v10 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_optionsBtn_001.png");
((void (__fastcall *)(struct cocos2d::CCSprite *))v10->setScale_0)(v10);
v11 = CCMenuItemSpriteExtra::create(v10, nullptr, a1, (cocos2d::SEL_MenuHandler *)LevelOptionsLayer::onSettings);
a1->m_buttonMenu->addChild_1(a1->m_buttonMenu, v11);
v12 = v11->cocos2d::CCMenuItemSprite::cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
cocos2d::CCPoint::CCPoint(v20 * 0.5, (float)((float)(a1->m_width * 0.5) + (float)(v20 * 0.5)) - 25.0);
v13 = cocos2d::CCNode::convertToNodeSpace(a1->m_buttonMenu, &v21);
((void (__fastcall *)(CCMenuItemSpriteExtra *, struct cocos2d::CCPoint))v12->setPosition_0)(v11, v13);
}
}