//
// SetGroupIDLayer::onZLayer from 0x100315380 to 0x10031549e (286 bytes)
//
// 1 xrefs:
// > SetGroupIDLayer::init @ 0x100313414
//
// 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::onZLayer(SetGroupIDLayer *a1, cocos2d::CCObject *a2)
{
__int32 v3; // eax
GameObject *m_targetObject; // rdi
unsigned int v5; // r14d
GameObject *v6; // r15
unsigned int v7; // r14d
ButtonSprite *v8; // r15
ZLayer m_zLayerValue; // r12d
const char *v10; // rsi
v3 = ((__int64 (__fastcall *)(cocos2d::CCObject *))a2->getTag)(a2);
a1->m_zLayerValue = v3;
m_targetObject = a1->m_targetObject;
if ( m_targetObject )
{
GameObject::setCustomZLayer(m_targetObject, v3);
a1->m_targetObject->m_updateParents = 1;
}
else if ( (unsigned int)sub_100720070(a1->m_targetObjects) )
{
v5 = 0;
do
{
v6 = (GameObject *)sub_1007200C0(a1->m_targetObjects, v5);
GameObject::setCustomZLayer(v6, a1->m_zLayerValue);
v6->m_updateParents = 1;
++v5;
}
while ( v5 < (unsigned int)sub_100720070(a1->m_targetObjects) );
}
if ( (unsigned int)sub_100720070(a1->m_zLayerButtons) )
{
v7 = 0;
do
{
v8 = (ButtonSprite *)sub_1007200C0(a1->m_zLayerButtons, v7);
m_zLayerValue = a1->m_zLayerValue;
v10 = "GJ_button_04.png";
if ( m_zLayerValue == ((unsigned int (__fastcall *)(ButtonSprite *))v8->getTag)(v8) )
v10 = "GJ_button_02.png";
ButtonSprite::updateBGImage(v8, v10);
++v7;
}
while ( v7 < (unsigned int)sub_100720070(a1->m_zLayerButtons) );
}
}