//
// GJBaseGameLayer::maxZOrderForShaderZ from 0x1001efd04 to 0x1001efd70 (108 bytes)
//
// 2 xrefs:
// > GJBaseGameLayer::triggerGradientCommand @ 0x1001efa88
// > GJBaseGameLayer::updateShaderLayer @ 0x1001f17f8
//
// 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
//
int __fastcall GJBaseGameLayer::maxZOrderForShaderZ(GJBaseGameLayer *a1, int a2)
{
if ( (unsigned int)a2 <= 0xF )
{
if ( ((1 << a2) & 0x7EF8) != 0 )
return GJBaseGameLayer::minZOrderForShaderZ(a1, a2 + 1) - 1;
if ( a2 == 8 )
return 61;
if ( a2 == 15 )
return 1400;
}
if ( (unsigned int)(a2 - 1) >= 2 )
return 0;
else
return -1600;
}