//
// GJGroundLayer::updateGround01Color from 0x10002fac0 to 0x10002fb40 (128 bytes)
//
// 11 xrefs:
// > GJGroundLayer::init @ 0x10002f64c
// > GJGroundLayer::init @ 0x10002f724
// > GJBaseGameLayer::updateLevelColors @ 0x1002783dc
// > GJBaseGameLayer::updateLevelColors @ 0x1002783e8
// > GJBaseGameLayer::visitWithColorFlash @ 0x1002a6150
// > GJBaseGameLayer::visitWithColorFlash @ 0x1002a615c
// > GJBaseGameLayer::visitWithColorFlash @ 0x1002a61a4
// > GJBaseGameLayer::visitWithColorFlash @ 0x1002a61b8
// > LevelEditorLayer::updateEditorMode @ 0x1003f8c24
// > MenuGameLayer::updateColors @ 0x100442938
// > LevelSelectLayer::scrollLayerMoved @ 0x100483fb8
//
// This function is hookable on this platform (idp: arm, 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 10:57:30 +0000
//
__int64 __fastcall GJGroundLayer::updateGround01Color(__int64 a1, int a2)
{
__int64 result; // x0
__int64 v3; // x19
__int64 v4; // x20
__int64 v5; // x0
__int16 v6; // [xsp+Ch] [xbp-14h] BYREF
char v7; // [xsp+Eh] [xbp-12h]
v6 = a2;
v7 = BYTE2(a2);
result = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 408) + 488LL))(*(_QWORD *)(a1 + 408));
if ( result )
{
v3 = result;
result = sub_1002E757C(result);
if ( (_DWORD)result )
{
v4 = 0;
do
{
v5 = sub_1002E75A0(v3, v4);
(*(void (__fastcall **)(__int64, __int16 *))(*(_QWORD *)v5 + 960LL))(v5, &v6);
v4 = (unsigned int)(v4 + 1);
result = sub_1002E757C(v3);
}
while ( (unsigned int)v4 < (unsigned int)result );
}
}
return result;
}