//
// SetGroupIDLayer::onZLayerShift from 0x50875c to 0x5087cc (112 bytes)
//
// 0 xrefs:
//
// 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 SetGroupIDLayer::onZLayerShift(SetGroupIDLayer *a1, cocos2d::CCObject *a2)
{
int v3; // r6
unsigned int v4; // r9
GameObject *v5; // r0
GameObject *v6; // r5
ZLayer ObjectZLayer; // r0
int v8; // r1
int v9; // r1
v3 = a2->getTag(a2);
if ( a1->m_targetObjects )
{
v4 = 0;
while ( v4 < cocos2d::CCArray::count(a1->m_targetObjects) )
{
v5 = (GameObject *)cocos2d::CCArray::objectAtIndex(a1->m_targetObjects, v4++);
v6 = v5;
ObjectZLayer = GameObject::getObjectZLayer(v5);
if ( v3 == 1 )
v8 = 2;
else
v8 = -2;
v9 = ObjectZLayer + v8;
if ( v9 >= 11 )
v9 = 11;
if ( v9 < -5 )
v9 = -5;
GameObject::setCustomZLayer(v6, v9);
v6->m_updateParents = 1;
}
}
}