//
// GJFollowCommandLayer::updateTargetGroupID2 from 0x100137b8c to 0x100137c0c (128 bytes)
//
// 2 xrefs:
// > GJFollowCommandLayer::onUpdateGroupID2 @ 0x10013745c
// > GJFollowCommandLayer::textChanged @ 0x100137d48
//
// 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 GJFollowCommandLayer::updateTargetGroupID2(GJFollowCommandLayer *a1)
{
int v2; // w1
EffectGameObject *m_gameObject; // x0
__int64 v4; // x20
EffectGameObject *v5; // x0
if ( (a1->m_followGroupID & ~(a1->m_followGroupID >> 31)) >= 9999 )
v2 = 9999;
else
v2 = a1->m_followGroupID & ~(a1->m_followGroupID >> 31);
a1->m_followGroupID = v2;
m_gameObject = a1->m_gameObject;
if ( m_gameObject )
{
EffectGameObject::setTargetID2(m_gameObject, v2);
}
else if ( (unsigned int)sub_10024A36C(a1->m_gameObjects) )
{
v4 = 0;
do
{
v5 = (EffectGameObject *)sub_10024A388(a1->m_gameObjects, v4);
EffectGameObject::setTargetID2(v5, a1->m_followGroupID);
v4 = (unsigned int)(v4 + 1);
}
while ( (unsigned int)v4 < (unsigned int)sub_10024A36C(a1->m_gameObjects) );
}
}