//
// ShaderLayer::updateZLayer from 0x68562a to 0x685680 (86 bytes)
//
// 3 xrefs:
// > GJBaseGameLayer::triggerShaderCommand @ 0x58ff40
// > ShaderLayer::resetAllShaders @ 0x6856a4
// > ShaderLayer::init @ 0x686de6
//
// 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:56:04 +0000
//
int __fastcall ShaderLayer::updateZLayer(int this, int a2, int a3, int a4)
{
if ( a2 < 1 )
a2 = 1;
if ( a3 <= 0 )
a3 = 15;
if ( *(_DWORD *)(this + 940) != a2 )
{
*(_DWORD *)(this + 940) = a2;
*(_BYTE *)(this + 948) = 1;
}
if ( *(_DWORD *)(this + 944) != a3 )
{
*(_DWORD *)(this + 944) = a3;
*(_BYTE *)(this + 948) = 1;
}
if ( *(unsigned __int8 *)(this + 949) != a4 )
{
*(_BYTE *)(this + 949) = a4;
if ( *(_DWORD *)(this + 940) == 8 || *(_DWORD *)(this + 944) == 8 )
*(_BYTE *)(this + 948) = 1;
}
return this;
}