//
// GJMGLayer::updateGroundColor from 0x1006bf420 to 0x1006bf4a5 (133 bytes)
//
// 4 xrefs:
// > LevelEditorLayer::updateEditorMode @ 0x1000adb1b
// > LevelEditorLayer::updateEditorMode @ 0x1000adb2e
// > GJBaseGameLayer::updateLevelColors @ 0x1000f0a6f
// > GJBaseGameLayer::updateLevelColors @ 0x1000f0a93
//
// 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:35:31 +0000
//
__int64 __fastcall GJMGLayer::updateGroundColor(__int64 a1, int a2, unsigned __int8 a3)
{
__int64 v3; // rax
__int64 result; // rax
__int64 v5; // rdi
__int64 v6; // rbx
unsigned int v7; // r14d
__int64 v8; // rax
__int16 v9; // [rsp+0h] [rbp-1Ch] BYREF
char v10; // [rsp+2h] [rbp-1Ah]
char v11; // [rsp+3h] [rbp-19h]
v11 = HIBYTE(v3);
v9 = a2;
v10 = BYTE2(a2);
result = a3 ^ 1u;
v5 = *(_QWORD *)(a1 + 8 * result + 408);
if ( v5 )
{
v6 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v5 + 488LL))(v5);
result = sub_1007FEF90(v6);
if ( (_DWORD)result )
{
v7 = 0;
do
{
v8 = sub_1007FEFE0(v6, v7);
(*(void (__fastcall **)(__int64, __int16 *))(*(_QWORD *)v8 + 960LL))(v8, &v9);
++v7;
result = sub_1007FEF90(v6);
}
while ( v7 < (unsigned int)result );
}
}
return result;
}