//
// GJFollowCommandLayer::updateTargetGroupID from 0x100137b0c to 0x100137b8c (128 bytes)
//
// 2 xrefs:
// > GJFollowCommandLayer::onUpdateGroupID @ 0x1001373f8
// > GJFollowCommandLayer::textChanged @ 0x100137e18
//
// 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::updateTargetGroupID(GJFollowCommandLayer *a1)
{
int v2; // w1
EffectGameObject *m_gameObject; // x0
__int64 v4; // x20
EffectGameObject *v5; // x0
if ( (a1->m_targetGroupID & ~(a1->m_targetGroupID >> 31)) >= 9999 )
v2 = 9999;
else
v2 = a1->m_targetGroupID & ~(a1->m_targetGroupID >> 31);
a1->m_targetGroupID = v2;
m_gameObject = a1->m_gameObject;
if ( m_gameObject )
{
EffectGameObject::setTargetID(m_gameObject, v2);
}
else if ( (unsigned int)sub_10024A36C(a1->m_gameObjects) )
{
v4 = 0;
do
{
v5 = (EffectGameObject *)sub_10024A388(a1->m_gameObjects, v4);
EffectGameObject::setTargetID(v5, a1->m_targetGroupID);
v4 = (unsigned int)(v4 + 1);
}
while ( (unsigned int)v4 < (unsigned int)sub_10024A36C(a1->m_gameObjects) );
}
}