//
// EditorOptionsLayer::setupOptions from 0x1002884f0 to 0x100288dd7 (2279 bytes)
//
// 1 xrefs:
// > ??> @ 0x100b06228
//
// This function is hookable on this platform (idp: pc, 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:27:46 +0000
//
__int64 __fastcall EditorOptionsLayer::setupOptions(__int64 a1)
{
__int64 v2; // rdx
__int64 v3; // rax
__int64 v4; // rdi
int v5; // eax
__int64 v6; // rdx
__int64 v7; // rax
__int64 v8; // rdi
int v9; // eax
__int64 v10; // rax
__int64 v11; // r15
__int64 v12; // r14
__int64 v13; // rax
__int64 CString; // rax
__int64 v15; // rax
unsigned __int8 *v16; // r13
void *v17; // r13
__int64 v18; // r12
char *v19; // r14
void *v20; // r15
__int64 v21; // r14
__int64 v22; // r15
__int64 v23; // r14
__int64 v24; // rax
__int64 v25; // rax
__int64 v26; // rax
unsigned __int8 *v27; // r14
void *v28; // r13
__int64 v29; // r14
char *v30; // r14
void *v31; // r15
__int64 v32; // rbx
unsigned __int64 v34; // [rsp+0h] [rbp-60h] BYREF
float v35[2]; // [rsp+8h] [rbp-58h] BYREF
unsigned __int64 v36; // [rsp+10h] [rbp-50h] BYREF
unsigned __int64 v37; // [rsp+18h] [rbp-48h] BYREF
unsigned __int64 v38; // [rsp+20h] [rbp-40h] BYREF
unsigned __int64 v39; // [rsp+28h] [rbp-38h] BYREF
__int64 v40; // [rsp+30h] [rbp-30h]
*(_DWORD *)(a1 + 1072) = 1097859072;
*(_DWORD *)(a1 + 1020) = 12;
GJOptionsLayer::addGVToggle(a1, "Draw Trigger Boxes", "0044");
GJOptionsLayer::addGVToggle(a1, "Playtest No UI", "0046");
GJOptionsLayer::addGVToggle(a1, "Playtest Music", "0002");
GJOptionsLayer::addGVToggle(a1, "Effect Lines", "0043");
GJOptionsLayer::addGVToggle(a1, "Duration Lines", "0058");
GJOptionsLayer::addGVToggle(a1, "Grid On Top", "0039");
GJOptionsLayer::addGVToggle(a1, "Playtest No Grid", "0079");
GJOptionsLayer::addGVToggle(a1, "Hide Background", "0078");
GJOptionsLayer::addGVToggle(a1, "Enable Link Controls", "0097");
GJOptionsLayer::addGVToggle(a1, "Hold To Swipe", "0057");
*(_DWORD *)(a1 + 1024) = *(_DWORD *)(a1 + 1020)
+ *(_DWORD *)(a1 + 1024)
- *(_DWORD *)(a1 + 1024) % *(_DWORD *)(a1 + 1020);
GJOptionsLayer::addGVToggle(a1, "Swipe Cycle Mode", "0059");
GJOptionsLayer::addGVToggle(a1, "Layer Locking", "0103");
GJOptionsLayer::addGVToggle(a1, "Show Clicks", "0149");
GJOptionsLayer::addGVToggle(a1, "Auto-Pause", "0150");
GJOptionsLayer::addGVToggle(a1, "Hide Path", "0152");
GJOptionsLayer::addGVToggle(a1, "Start Optimization", "0151");
GJOptionsLayer::addGVToggle(a1, "Hide Particle Icons", "0137");
GJOptionsLayer::addGVToggle(a1, "Increase Undo/Redo", "0013");
GJOptionsLayer::addGVToggle(a1, "Playtest Smooth Fix", "0102");
GJOptionsLayer::addGVToggle(a1, "Increase Scale", "0112");
GJOptionsLayer::addGVToggle(a1, "Disable Paste State Groups", "0156");
GJOptionsLayer::addGVToggle(a1, "Small Warp Buttons", "0169");
GJOptionsLayer::addGVToggle(a1, "Static Trace Arrows", "0181");
GJOptionsLayer::addGVToggle(a1, "Hide Custom SFX Names", "0233");
v40 = sub_100287DA0(a1);
GameManager::sharedState(a1, 0, v2);
v4 = v3;
GameManager::getIntGameVariable(v3, "0049");
*(_DWORD *)(a1 + 1120) = v5;
GameManager::sharedState(v4, "0049", v6);
v8 = v7;
GameManager::getIntGameVariable(v7, "0050");
*(_DWORD *)(a1 + 1124) = v9;
v10 = cocos2d::CCDirector::sharedDirector(v8, "0050");
cocos2d::CCDirector::getWinSize(v35, v10);
sub_100278250((float *)&v36, (float)(v35[0] * 0.5) + -100.0, (float)(v35[1] * 0.5) + -115.0);
v11 = cocos2d::CCLabelBMFont::create_3("Buttons Per Row", "goldFont.fnt");
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v11 + 160LL))(v11, 0.5);
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**(_QWORD **)(a1 + 584) + 464LL))(*(_QWORD *)(a1 + 584), v11, 2);
sub_100278250((float *)&v38, 0.0, 30.0);
sub_100278350((double *)&v39, &v36, &v38);
(*(void (__fastcall **)(__int64, unsigned __int64 *))(*(_QWORD *)v11 + 184LL))(v11, &v39);
v12 = v40;
sub_1007FEBF0(v40, v11);
v13 = sub_10088E820("%i", v34);
CString = cocos2d::CCString::getCString(v13);
v15 = cocos2d::CCLabelBMFont::create_3(CString, "goldFont.fnt");
*(_QWORD *)(a1 + 1128) = v15;
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**(_QWORD **)(a1 + 584) + 464LL))(*(_QWORD *)(a1 + 584), v15, 2);
(*(void (__fastcall **)(_QWORD, unsigned __int64 *))(**(_QWORD **)(a1 + 1128) + 184LL))(*(_QWORD *)(a1 + 1128), &v36);
sub_1007FEBF0(v12, *(_QWORD *)(a1 + 1128));
v16 = (unsigned __int8 *)cocos2d::CCSprite::createWithSpriteFrameName((__int64)"GJ_arrow_03_001.png", 0.0);
cocos2d::CCSprite::setFlipX(v16, 1u);
(*(void (__fastcall **)(unsigned __int8 *, float))(*(_QWORD *)v16 + 160LL))(v16, 0.80000001);
v17 = CCMenuItemSpriteExtra::create((__int64)v16, 0, a1, (__int64)&EditorOptionsLayer::onButtonsPerRow, 0);
(*(void (__fastcall **)(_QWORD, void *))(**(_QWORD **)(a1 + 552) + 456LL))(*(_QWORD *)(a1 + 552), v17);
v18 = *(_QWORD *)(a1 + 552);
sub_100278250((float *)&v37, 40.0, 0.0);
sub_100278350((double *)&v38, &v36, &v37);
cocos2d::CCNode::convertToNodeSpace((double *)&v39, v18, (unsigned int *)&v38);
(*(void (__fastcall **)(void *, unsigned __int64 *))(*(_QWORD *)v17 + 184LL))(v17, &v39);
CCMenuItemSpriteExtra::setSizeMult((__int64)v17, 2.0);
(*(void (__fastcall **)(void *, __int64))(*(_QWORD *)v17 + 72LL))(v17, 1);
sub_1007FEBF0(v40, v17);
v19 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"GJ_arrow_03_001.png", COERCE_DOUBLE(0x40000000));
(*(void (__fastcall **)(char *, float))(*(_QWORD *)v19 + 160LL))(v19, 0.80000001);
v20 = CCMenuItemSpriteExtra::create((__int64)v19, 0, a1, (__int64)&EditorOptionsLayer::onButtonsPerRow, 0);
(*(void (__fastcall **)(_QWORD, void *))(**(_QWORD **)(a1 + 552) + 456LL))(*(_QWORD *)(a1 + 552), v20);
v21 = *(_QWORD *)(a1 + 552);
sub_100278250((float *)&v37, -40.0, 0.0);
sub_100278350((double *)&v38, &v36, &v37);
cocos2d::CCNode::convertToNodeSpace((double *)&v39, v21, (unsigned int *)&v38);
(*(void (__fastcall **)(void *, unsigned __int64 *))(*(_QWORD *)v20 + 184LL))(v20, &v39);
CCMenuItemSpriteExtra::setSizeMult((__int64)v20, 2.0);
(*(void (__fastcall **)(void *, _QWORD))(*(_QWORD *)v20 + 72LL))(v20, 0);
sub_1007FEBF0(v40, v20);
sub_100278250((float *)&v39, (float)(v35[0] * 0.5) + 100.0, *((float *)&v36 + 1));
v22 = cocos2d::CCLabelBMFont::create_3("Button Rows", "goldFont.fnt");
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v22 + 160LL))(v22, 0.5);
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**(_QWORD **)(a1 + 584) + 464LL))(*(_QWORD *)(a1 + 584), v22, 2);
sub_100278250((float *)&v37, 0.0, 30.0);
sub_100278350((double *)&v38, &v39, &v37);
(*(void (__fastcall **)(__int64, unsigned __int64 *))(*(_QWORD *)v22 + 184LL))(v22, &v38);
v23 = v40;
sub_1007FEBF0(v40, v22);
v24 = sub_10088E820("%i", v34);
v25 = cocos2d::CCString::getCString(v24);
v26 = cocos2d::CCLabelBMFont::create_3(v25, "goldFont.fnt");
*(_QWORD *)(a1 + 1136) = v26;
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**(_QWORD **)(a1 + 584) + 464LL))(*(_QWORD *)(a1 + 584), v26, 2);
(*(void (__fastcall **)(_QWORD, unsigned __int64 *))(**(_QWORD **)(a1 + 1136) + 184LL))(*(_QWORD *)(a1 + 1136), &v39);
sub_1007FEBF0(v23, *(_QWORD *)(a1 + 1136));
v27 = (unsigned __int8 *)cocos2d::CCSprite::createWithSpriteFrameName((__int64)"GJ_arrow_02_001.png", 0.0);
cocos2d::CCSprite::setFlipX(v27, 1u);
(*(void (__fastcall **)(unsigned __int8 *, float))(*(_QWORD *)v27 + 160LL))(v27, 0.80000001);
v28 = CCMenuItemSpriteExtra::create((__int64)v27, 0, a1, (__int64)&EditorOptionsLayer::onButtonRows, 0);
(*(void (__fastcall **)(_QWORD, void *))(**(_QWORD **)(a1 + 552) + 456LL))(*(_QWORD *)(a1 + 552), v28);
v29 = *(_QWORD *)(a1 + 552);
sub_100278250((float *)&v34, 40.0, 0.0);
sub_100278350((double *)&v37, &v39, &v34);
cocos2d::CCNode::convertToNodeSpace((double *)&v38, v29, (unsigned int *)&v37);
(*(void (__fastcall **)(void *, unsigned __int64 *))(*(_QWORD *)v28 + 184LL))(v28, &v38);
CCMenuItemSpriteExtra::setSizeMult((__int64)v28, 2.0);
(*(void (__fastcall **)(void *, __int64))(*(_QWORD *)v28 + 72LL))(v28, 1);
sub_1007FEBF0(v40, v28);
v30 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"GJ_arrow_02_001.png", COERCE_DOUBLE(0x40000000));
(*(void (__fastcall **)(char *, float))(*(_QWORD *)v30 + 160LL))(v30, 0.80000001);
v31 = CCMenuItemSpriteExtra::create((__int64)v30, 0, a1, (__int64)&EditorOptionsLayer::onButtonRows, 0);
(*(void (__fastcall **)(_QWORD, void *))(**(_QWORD **)(a1 + 552) + 456LL))(*(_QWORD *)(a1 + 552), v31);
v32 = *(_QWORD *)(a1 + 552);
sub_100278250((float *)&v34, -40.0, 0.0);
sub_100278350((double *)&v37, &v39, &v34);
cocos2d::CCNode::convertToNodeSpace((double *)&v38, v32, (unsigned int *)&v37);
(*(void (__fastcall **)(void *, unsigned __int64 *))(*(_QWORD *)v31 + 184LL))(v31, &v38);
CCMenuItemSpriteExtra::setSizeMult((__int64)v31, 2.0);
(*(void (__fastcall **)(void *, _QWORD))(*(_QWORD *)v31 + 72LL))(v31, 0);
return sub_1007FEBF0(v40, v31);
}