//
// GJBaseGameLayer::controlAdvancedFollowCommand from 0x4703b0 to 0x4703f4 (68 bytes)
//
// 2 xrefs:
// > GJBaseGameLayer::controlTriggersWithControlID @ 0x495c8c
// > GJBaseGameLayer::controlTriggersInGroup @ 0x495f96
//
// 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 GJBaseGameLayer::controlAdvancedFollowCommand(
GJBaseGameLayer *a1,
AdvancedFollowTriggerObject *a2,
int a3,
GJActionCommand a4)
{
AdvancedFollowInstance *m_finish; // r5
AdvancedFollowInstance *i; // r0
bool v6; // zf
m_finish = a1->m_gameState.m_advanceFollowInstances.m_finish;
for ( i = a1->m_gameState.m_advanceFollowInstances.m_start; i != m_finish; ++i )
{
if ( a3 == -1 )
v6 = i->m_gameObject == a2;
else
v6 = i->m_controlId == a3;
if ( v6 )
{
if ( a4 )
{
if ( a4 == Pause )
{
i->m_finished = 1;
i->m_doStart = 1;
}
else if ( a4 == Resume )
{
i->m_finished = 0;
i->m_doStart = 0;
}
}
else
{
i->m_finished = 0;
i->m_doStart = 0;
i->m_started = 1;
}
}
}
}