//
// SetupShaderEffectPopup::updateZLayerButtons from 0x1405e0880 to 0x1405e092e (174 bytes)
//
// 6 xrefs:
// > SetupShaderEffectPopup::setupShaderTrigger @ 0x1405e047d
// > SetupShaderEffectPopup::onZLayer @ 0x1405e087b
// > ??> @ 0x1408e2074
// > ??> @ 0x1408e2084
// > ??> @ 0x14092ede4
// > ??> @ 0x14092edf0
//
// 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:35:00 +0000
//
unsigned int __fastcall SetupShaderEffectPopup::updateZLayerButtons(__int64 a1)
{
unsigned int v2; // edi
unsigned int result; // eax
struct cocos2d::CCObject *v4; // rsi
int v5; // eax
int v6; // edx
int v7; // ecx
const char *v8; // rdx
v2 = 0;
result = cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 1000));
if ( result )
{
do
{
v4 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 1000), v2);
v5 = (*(__int64 (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v4 + 56LL))(v4);
v6 = *(_DWORD *)(a1 + 1008);
if ( v5 == v6 || (v7 = *(_DWORD *)(a1 + 1012), v5 == v7) )
{
v8 = "GJ_button_02.png";
}
else if ( v5 <= v6 || v5 >= v7 )
{
v8 = "GJ_button_04.png";
}
else
{
v8 = "GJ_button_01.png";
}
ButtonSprite::updateBGImage((__int64)v4, v8);
++v2;
result = cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 1000));
}
while ( v2 < result );
}
return result;
}