//
// GameOptionsLayer::didToggle from 0x10029f180 to 0x10029f33f (447 bytes)
//
// 1 xrefs:
// > ??> @ 0x100b09688
//
// 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:54 +0000
//
void __fastcall GameOptionsLayer::didToggle(__int64 a1, int a2, __int64 a3)
{
__int64 v3; // rsi
__int64 v5; // rax
const char *v6; // rsi
__int64 v7; // rax
__int64 v8; // rdi
__int64 v9; // rbx
__int64 v10; // rdx
double v11; // xmm0_8
__int64 v12; // rax
unsigned __int8 GameVariable; // al
__int64 v14; // rax
__int64 v15; // rdi
unsigned __int8 v16; // bl
__int64 v17; // rdx
__int64 v18; // rdx
__int64 v19; // rax
double v20; // xmm0_8
__int64 v21; // rax
__int64 v22; // rax
__int64 v23; // r14
__int64 v24; // rdx
unsigned __int64 v25; // xmm0_8
__int64 v26; // rax
__int64 v27; // rax
const char *v28; // rsi
double v29; // xmm0_8
__int64 v30; // rax
double v31; // xmm0_8
__int64 v32; // rax
__int64 v33; // rax
const char *v34; // rsi
__int64 v35; // rdi
__int64 v36; // rdx
__int64 v37; // rdx
__int64 v38; // rax
__int64 v39; // rax
__int64 v40; // rdx
v3 = (unsigned int)(a2 - 1);
switch ( (int)v3 )
{
case 0:
GameManager::sharedState(a1, v3, a3);
v6 = "0026";
goto LABEL_10;
case 1:
GameManager::sharedState(a1, v3, a3);
v6 = "0027";
LABEL_10:
GameManager::toggleGameVariable(v5, v6);
return;
case 2:
GameManager::sharedState(a1, v3, a3);
v23 = v22;
v25 = GameManager::sharedState(a1, v3, v24).u64[0];
*(_BYTE *)(v23 + 924) = *(_BYTE *)(v26 + 924) ^ 1;
goto LABEL_14;
case 3:
v25 = GameManager::sharedState(a1, v3, a3).u64[0];
v28 = "0040";
goto LABEL_13;
case 4:
GameManager::sharedState(a1, v3, a3);
v8 = v7;
GameManager::toggleGameVariable(v7, "0144");
v9 = *(_QWORD *)(a1 + 1120);
*(_QWORD *)&v11 = GameManager::sharedState(v8, "0144", v10).u64[0];
GameVariable = GameManager::getGameVariable(v12, "0144");
GJBaseGameLayer::toggleAudioVisualizer(v9, GameVariable, v11);
return;
case 5:
*(_QWORD *)&v31 = GameManager::sharedState(a1, v3, a3).u64[0];
GameManager::toggleGameVariable(v32, "0109");
(*(void (__fastcall **)(_QWORD, double))(**(_QWORD **)(a1 + 1120) + 1576LL))(*(_QWORD *)(a1 + 1120), v31);
return;
case 6:
v25 = GameManager::sharedState(a1, v3, a3).u64[0];
v28 = "0145";
LABEL_13:
GameManager::toggleGameVariable(v27, v28);
LABEL_14:
(*(void (__fastcall **)(_QWORD, double))(**(_QWORD **)(a1 + 1120) + 1568LL))(
*(_QWORD *)(a1 + 1120),
*(double *)&v25);
return;
case 7:
*(_QWORD *)&v29 = GameManager::sharedState(a1, v3, a3).u64[0];
GameManager::toggleGameVariable(v30, "0146");
(*(void (__fastcall **)(_QWORD, double))(**(_QWORD **)(a1 + 1120) + 1584LL))(*(_QWORD *)(a1 + 1120), v29);
return;
case 8:
GameManager::sharedState(a1, v3, a3);
v34 = "0166";
goto LABEL_17;
case 9:
GameManager::sharedState(a1, v3, a3);
v15 = v14;
v16 = GameManager::toggleGameVariable(v14, "0173");
GameManager::sharedState(v15, "0173", v17);
if ( *(_QWORD *)(v19 + 544) )
{
*(_QWORD *)&v20 = GameManager::sharedState(v15, "0173", v18).u64[0];
sub_10007A340(*(_QWORD *)(v21 + 544), v16, v20);
}
return;
case 10:
GameManager::sharedState(a1, v3, a3);
v34 = "0179";
LABEL_17:
v35 = v33;
GameManager::toggleGameVariable(v33, v34);
GameManager::sharedState(v35, v34, v36);
if ( *(_QWORD *)(v38 + 544) )
{
GameManager::sharedState(v35, v34, v37);
PlayLayer::updateDebugDrawSettings(*(_BYTE **)(v39 + 544), (__int64)v34, v40);
}
break;
default:
return;
}
}