//
// GJMGLayer::updateGroundOpacity from 0x546c88 to 0x546ccc (68 bytes)
//
// 2 xrefs:
// > GJBaseGameLayer::updateLevelColors @ 0x58c706
// > GJBaseGameLayer::updateLevelColors @ 0x58c732
//
// 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::updateGroundOpacity(unsigned int this, int a2, int a3)
{
int v4; // r3
unsigned int v5; // r4
cocos2d::CCArray *v6; // r5
int v7; // r0
v4 = *(_DWORD *)(this + 316);
if ( !a3 )
v4 = *(_DWORD *)(this + 320);
if ( v4 )
{
v5 = 0;
v6 = (cocos2d::CCArray *)(*(int (__fastcall **)(int, _DWORD))(*(_DWORD *)v4 + 244))(v4, *(_DWORD *)(this + 320));
while ( 1 )
{
this = cocos2d::CCArray::count(v6);
if ( v5 >= this )
break;
v7 = cocos2d::CCArray::objectAtIndex(v6, v5++);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v7 + 456))(v7, a2);
}
}
return this;
}