//
// PlayLayer::toggleGroundVisibility from 0x1405120a0 to 0x14051211d (125 bytes)
//
// 2 xrefs:
// > ??> @ 0x1407d5e88
// > ??> @ 0x14092abcc
//
// 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:33:31 +0000
//
__int64 __fastcall PlayLayer::toggleGroundVisibility(__int64 a1, __int64 a2)
{
char v3; // bl
_BYTE *v4; // rcx
bool v5; // zf
__int64 result; // rax
_BYTE *v7; // rcx
v3 = a2;
v4 = *(_BYTE **)(a1 + 4336);
if ( v4[457] != (_BYTE)a2 )
{
v5 = v4[456] == 0;
v4[457] = a2;
if ( v5 || !(_BYTE)a2 )
a2 = 0;
else
LOBYTE(a2) = 1;
result = (*(__int64 (__fastcall **)(_BYTE *, __int64))(*(_QWORD *)v4 + 336LL))(v4, a2);
}
v7 = *(_BYTE **)(a1 + 4344);
if ( v7[457] != v3 )
{
v5 = v7[456] == 0;
v7[457] = v3;
if ( v5 || !v3 )
a2 = 0;
else
LOBYTE(a2) = 1;
return (*(__int64 (__fastcall **)(_BYTE *, __int64))(*(_QWORD *)v7 + 336LL))(v7, a2);
}
return result;
}