//
// ShaderLayer::updateZLayer from 0x1003cb020 to 0x1003cb0a0 (128 bytes)
//
// 1 xrefs:
// > GJBaseGameLayer::triggerShaderCommand @ 0x10013aa43
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
bool __fastcall ShaderLayer::updateZLayer(ShaderLayer *a1, int a2, int a3, bool a4)
{
int v4; // r8d
int v5; // eax
v4 = 1;
if ( a2 >= 2 )
v4 = a2;
v5 = 15;
if ( a3 > 0 )
v5 = a3;
if ( a1->m_state.m_minBlendingLayer == v4 )
{
if ( a1->m_state.m_maxBlendingLayer == v5 )
goto LABEL_7;
}
else
{
a1->m_state.m_minBlendingLayer = v4;
a1->m_state.m_zLayerDirty = 1;
if ( a1->m_state.m_maxBlendingLayer == v5 )
{
LABEL_7:
if ( a1->m_state.m_noPlayerParticles == a4 )
return v5;
goto LABEL_11;
}
}
a1->m_state.m_maxBlendingLayer = v5;
a1->m_state.m_zLayerDirty = 1;
if ( a1->m_state.m_noPlayerParticles == a4 )
return v5;
LABEL_11:
a1->m_state.m_noPlayerParticles = a4;
LOBYTE(v5) = v5 != 8;
if ( ((unsigned __int8)v5 & (a2 != 8)) == 0 )
a1->m_state.m_zLayerDirty = 1;
return v5;
}