//
// GJGroundLayer::updateGround02Color from 0x1006be560 to 0x1006be5e5 (133 bytes)
//
// 11 xrefs:
// > LevelEditorLayer::updateEditorMode @ 0x1000ada2d
// > LevelEditorLayer::updateEditorMode @ 0x1000adaa7
// > GJBaseGameLayer::updateLevelColors @ 0x1000f093c
// > GJBaseGameLayer::updateLevelColors @ 0x1000f094b
// > GJBaseGameLayer::visitWithColorFlash @ 0x1001445f8
// > GJBaseGameLayer::visitWithColorFlash @ 0x100144607
// > GJBaseGameLayer::visitWithColorFlash @ 0x10014466e
// > GJBaseGameLayer::visitWithColorFlash @ 0x100144687
// > LevelSelectLayer::scrollLayerMoved @ 0x100421db1
// > MenuGameLayer::updateColors @ 0x1004f9a54
// > MenuGameLayer::update @ 0x1004f9b06
//
// 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:30 +0000
//
__int64 __fastcall GJGroundLayer::updateGround02Color(__int64 a1, int a2)
{
__int64 result; // rax
__int64 v3; // rdi
__int64 v4; // rbx
unsigned int v5; // r14d
__int64 v6; // rax
__int16 v7; // [rsp+0h] [rbp-1Ch] BYREF
char v8; // [rsp+2h] [rbp-1Ah]
char v9; // [rsp+3h] [rbp-19h]
v9 = HIBYTE(result);
v7 = a2;
v8 = BYTE2(a2);
v3 = *(_QWORD *)(a1 + 416);
if ( v3 )
{
result = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v3 + 488LL))(v3);
if ( result )
{
v4 = result;
result = sub_1007FEF90(result);
if ( (_DWORD)result )
{
v5 = 0;
do
{
v6 = sub_1007FEFE0(v4, v5);
(*(void (__fastcall **)(__int64, __int16 *))(*(_QWORD *)v6 + 960LL))(v6, &v7);
++v5;
result = sub_1007FEF90(v4);
}
while ( v5 < (unsigned int)result );
}
}
}
return result;
}