//
// TouchControlEditLayer::init from 0x100977d10 to 0x100977e46 (310 bytes)
//
// 1 xrefs:
// > TouchControlEditLayer::create @ 0x1009794bc
//
// 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:38:56 +0000
//
__int64 __fastcall TouchControlEditLayer::init(__int64 a1, char a2, __int64 a3)
{
__int64 result; // rax
unsigned int v5; // r12d
__int64 v6; // rcx
unsigned __int8 v7; // al
__int64 *v8; // rcx
__int16 v9; // [rsp+Ch] [rbp-24h] BYREF
char v10; // [rsp+Eh] [rbp-22h]
result = SetupTriggerPopup::init(a1, 0, 0, 1, 400.0, 280.0, 0.0);
if ( (_BYTE)result )
{
v5 = result;
*(_BYTE *)(a1 + 1012) = a2;
*(_QWORD *)(a1 + 1016) = a3;
SetupTriggerPopup::preSetup((_BYTE *)a1);
SetupTriggerPopup::toggleBG(a1, 0);
v10 = 0;
v9 = 0;
(*(void (__fastcall **)(__int64, __int16 *))(*(_QWORD *)a1 + 1216LL))(a1, &v9);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 1168LL))(a1, 50);
*(_BYTE *)(a1 + 596) = 1;
TouchControlEditLayer::buildNodes(a1);
TouchControlEditLayer::buildHud(a1);
TouchControlEditLayer::updateHandles(a1);
TouchControlEditLayer::updateJumpGuide(a1);
SetupTriggerPopup::postSetup((_BYTE *)a1);
TouchControlEditLayer::refreshHud(a1);
v6 = *(_QWORD *)(a1 + 1248);
if ( v6 || (v8 = *(__int64 **)(a1 + 1224), v7 = 1, v8 != *(__int64 **)(a1 + 1232)) && (v6 = *v8) != 0 )
v7 = *(_BYTE *)(v6 + 381) ^ 1;
(*(void (__fastcall **)(__int64, __int64, _QWORD))(*(_QWORD *)a1 + 1352LL))(a1, 1, v7);
(*(void (__fastcall **)(__int64, __int64, _QWORD))(*(_QWORD *)a1 + 1352LL))(
a1,
2,
*(unsigned __int8 *)(a1 + 1012) ^ 1u);
return v5;
}
return result;
}