//
// GameSettingsLayer::init from 0x1005fe4c0 to 0x1005fe5b3 (243 bytes)
//
// 1 xrefs:
// > GameSettingsLayer::create @ 0x1005fe477
//
// 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:34:29 +0000
//
__int64 __fastcall GameSettingsLayer::init(__int64 a1, __int64 a2, unsigned int a3)
{
__int64 result; // rax
unsigned int v5; // r12d
int v6; // eax
__int64 v7; // rcx
_WORD v8[18]; // [rsp+Ch] [rbp-24h] BYREF
result = SetupTriggerPopup::init(a1, 0, 0, 7, 400.0, 280.0, 0.0);
if ( (_BYTE)result )
{
v5 = result;
*(_QWORD *)(a1 + 1096) = a2;
SetupTriggerPopup::preSetup((_BYTE *)a1);
qmemcpy(v8, "PWi", 3);
SetupTriggerPopup::setCustomBGColor(a1, (__int64)v8);
*(_BYTE *)(a1 + 596) = 1;
TabbedPopupLayer::addCloseButton(a1);
GameSettingsLayer::setupTabs(a1);
GameSettingsLayer::buildTabContent(a1);
GameSettingsLayer::addSpecialContent(a1);
SetupTriggerPopup::postSetup((_BYTE *)a1);
v6 = dword_100BE072C;
if ( dword_100BE072C >= 0LL )
{
v7 = *(_QWORD *)(a1 + 1016);
if ( dword_100BE072C < (int)(954437177 * ((unsigned __int64)(*(_QWORD *)(a1 + 1024) - v7) >> 3)) )
{
*(_DWORD *)(v7 + 72LL * dword_100BE072C + 52) = dword_100BE5990;
a3 = v6;
}
}
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a1 + 1504LL))(a1, a3);
return v5;
}
return result;
}