//
// GJMGLayer::updateGroundColor from 0x546874 to 0x5468bc (72 bytes)
//
// 6 xrefs:
// > LevelEditorLayer::updateEditorMode @ 0x462858
// > LevelEditorLayer::updateEditorMode @ 0x462872
// > GJMGLayer::init @ 0x546a84
// > GJMGLayer::init @ 0x546b6a
// > GJBaseGameLayer::updateLevelColors @ 0x58c6ac
// > GJBaseGameLayer::updateLevelColors @ 0x58c6da
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 11:52:23 +0000
//
unsigned int __fastcall GJMGLayer::updateGroundColor(unsigned int result, int a2, int a3)
{
int v3; // r3
unsigned int v4; // r4
cocos2d::CCArray *v5; // r5
int v6; // r0
int v7; // [sp+4h] [bp-4h] BYREF
v7 = a2;
v3 = *(_DWORD *)(result + 316);
if ( !a3 )
v3 = *(_DWORD *)(result + 320);
if ( v3 )
{
v4 = 0;
v5 = (cocos2d::CCArray *)(*(int (__fastcall **)(int, _DWORD))(*(_DWORD *)v3 + 244))(v3, *(_DWORD *)(result + 320));
while ( 1 )
{
result = cocos2d::CCArray::count(v5);
if ( v4 >= result )
break;
v6 = cocos2d::CCArray::objectAtIndex(v5, v4++);
(*(void (__fastcall **)(int, int *))(*(_DWORD *)v6 + 480))(v6, &v7);
}
}
return result;
}