//
// GJMGLayer::updateGroundOpacity from 0x1006bf570 to 0x1006bf5e5 (117 bytes)
//
// 2 xrefs:
// > GJBaseGameLayer::updateLevelColors @ 0x1000f0ac7
// > GJBaseGameLayer::updateLevelColors @ 0x1000f0af8
//
// 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:31 +0000
//
__int64 __fastcall GJMGLayer::updateGroundOpacity(__int64 a1, unsigned __int8 a2, unsigned __int8 a3)
{
__int64 result; // rax
__int64 v4; // rdi
__int64 v5; // rbx
unsigned int v6; // r15d
__int64 v7; // rax
result = a3 ^ 1u;
v4 = *(_QWORD *)(a1 + 8 * result + 408);
if ( v4 )
{
v5 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v4 + 488LL))(v4);
result = sub_1007FEF90(v5);
if ( (_DWORD)result )
{
v6 = 0;
do
{
v7 = sub_1007FEFE0(v5, v6);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v7 + 912LL))(v7, a2);
++v6;
result = sub_1007FEF90(v5);
}
while ( v6 < (unsigned int)result );
}
}
return result;
}