//
// SetGroupIDLayer::onZLayerShift from 0x10003d8e4 to 0x10003d9a0 (188 bytes)
//
// 1 xrefs:
// > SetGroupIDLayer::init @ 0x10003bdb0
//
// 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
//
void __fastcall SetGroupIDLayer::onZLayerShift(SetGroupIDLayer *a1, cocos2d::CCObject *a2)
{
int v3; // w21
cocos2d::CCArray *m_targetObjects; // x0
__int64 v5; // x20
int v6; // w22
GameObject *v7; // x21
int v8; // w8
int v9; // w1
v3 = ((__int64 (__fastcall *)(cocos2d::CCObject *))a2->getTag)(a2);
m_targetObjects = a1->m_targetObjects;
if ( m_targetObjects && (unsigned int)sub_10024A36C(m_targetObjects) )
{
v5 = 0;
if ( v3 == 1 )
v6 = 2;
else
v6 = -2;
do
{
v7 = (GameObject *)sub_10024A388(a1->m_targetObjects, v5);
v8 = GameObject::getObjectZLayer(v7) + v6;
if ( v8 >= 11 )
v8 = 11;
if ( v8 <= -5 )
v9 = -5;
else
v9 = v8;
GameObject::setCustomZLayer(v7, v9);
v7->m_updateParents = 1;
v5 = (unsigned int)(v5 + 1);
}
while ( (unsigned int)v5 < (unsigned int)sub_10024A36C(a1->m_targetObjects) );
}
}