//
// GJMGLayer::updateGroundOpacity from 0x140388270 to 0x1403882ee (126 bytes)
//
// 5 xrefs:
// > GJBaseGameLayer::updateLevelColors @ 0x140312bf7
// > GJBaseGameLayer::updateLevelColors @ 0x140312c32
// > ??> @ 0x1408bdac4
// > ??> @ 0x1408bdad4
// > ??> @ 0x140922c58
//
// 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 11:31:08 +0000
//
int __fastcall GJMGLayer::updateGroundOpacity(__int64 a1, unsigned __int8 a2, unsigned __int8 a3)
{
__int64 v4; // rax
__int64 v5; // rcx
cocos2d::CCArray *v6; // rdi
unsigned int v7; // ebx
struct cocos2d::CCObject *v8; // rax
v4 = a3 ^ 1LL;
v5 = *(_QWORD *)(a1 + 8 * v4 + 408);
if ( v5 )
{
v6 = (cocos2d::CCArray *)(*(__int64 (**)(void))(*(_QWORD *)v5 + 480LL))();
v7 = 0;
for ( LODWORD(v4) = cocos2d::CCArray::count(v6); v7 < (unsigned int)v4; LODWORD(v4) = cocos2d::CCArray::count(v6) )
{
v8 = cocos2d::CCArray::objectAtIndex(v6, v7);
(*(void (__fastcall **)(__int64, _QWORD))(*((_QWORD *)v8 + 40) + 40LL))((__int64)v8 + 320, a2);
++v7;
}
}
return v4;
}