//
// GJBaseGameLayer::createGroundLayer from 0x1000f0bb0 to 0x1000f0c94 (228 bytes)
//
// 5 xrefs:
// > PlayLayer::setupHasCompleted @ 0x10007b501
// > LevelEditorLayer::init @ 0x1000aad24
// > GJBaseGameLayer::asyncGLoaded @ 0x1000f0b9b
// > GJBaseGameLayer::syncBGTextures @ 0x100138433
// > LevelSettingsLayer::selectArtClosed @ 0x100259511
//
// 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:21:11 +0000
//
__int64 __fastcall GJBaseGameLayer::createGroundLayer(__int64 a1, int a2, unsigned int a3)
{
__int64 v5; // rdi
unsigned int v6; // r12d
__int64 v7; // rax
__int64 v8; // rax
v5 = *(_QWORD *)(a1 + 3960);
if ( v5 )
{
(*(void (__fastcall **)(__int64))(*(_QWORD *)v5 + 520LL))(v5);
*(_QWORD *)(a1 + 3960) = 0;
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 3968) + 520LL))(*(_QWORD *)(a1 + 3968));
*(_QWORD *)(a1 + 3968) = 0;
}
v6 = 22;
if ( a2 < 22 )
v6 = a2;
v7 = GJGroundLayer::create(v6, a3);
*(_QWORD *)(a1 + 3960) = v7;
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v7 + 72LL))(v7, v6);
(*(void (__fastcall **)(_QWORD, _QWORD, __int64))(**(_QWORD **)(a1 + 3896) + 464LL))(
*(_QWORD *)(a1 + 3896),
*(_QWORD *)(a1 + 3960),
40);
v8 = GJGroundLayer::create(v6, a3);
*(_QWORD *)(a1 + 3968) = v8;
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**(_QWORD **)(a1 + 3896) + 464LL))(*(_QWORD *)(a1 + 3896), v8, 40);
return (*(__int64 (__fastcall **)(_QWORD, float))(**(_QWORD **)(a1 + 3968) + 144LL))(*(_QWORD *)(a1 + 3968), -1.0);
}