//
// GJBaseGameLayer::processAdvancedFollowActions from 0x1001f87b8 to 0x1001f895c (420 bytes)
//
// 1 xrefs:
// > GJBaseGameLayer::processMoveActionsStep @ 0x1001f7114
//
// 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 GJBaseGameLayer::processAdvancedFollowActions(GJBaseGameLayer *a1, float a2)
{
std::__vector_base
::pointer begin; // x20
std::__vector_base::pointer end; // x21
float v6; // s8
_BOOL4 m_doStart; // w8
std::__vector_base::pointer v8; // x8
std::__vector_base::pointer v10; // x20
__int128 v11; // q1
__int64 i; // x1
if ( a1->m_gameState.m_unkBool27 )
{
sub_100210984();
a1->m_gameState.m_unkBool27 = 0;
}
begin = a1->m_gameState.m_advanceFollowInstances.__begin_;
end = a1->m_gameState.m_advanceFollowInstances.__end_;
if ( begin != end )
{
v6 = a2 * 240.0;
while ( begin->m_finished )
{
m_doStart = begin->m_doStart;
if ( m_doStart )
{
begin->m_doStart = 0;
LABEL_9:
GJBaseGameLayer::processAdvancedFollowAction(a1, begin, m_doStart, v6);
}
if ( ++begin == end )
{
begin = a1->m_gameState.m_advanceFollowInstances.__begin_;
end = a1->m_gameState.m_advanceFollowInstances.__end_;
goto LABEL_12;
}
}
LOBYTE(m_doStart) = begin->m_started;
goto LABEL_9;
}
LABEL_12:
if ( begin != end )
{
v8 = begin + 1;
while ( !v8[-1].m_started )
{
if ( v8++ == end )
goto LABEL_26;
}
v10 = v8 - 1;
if ( &v8[-1] != end && v8 != end )
{
do
{
if ( !v8->m_started )
{
v11 = *(_OWORD *)&v8->m_controlId;
*(_OWORD *)&v10->m_gameObject = *(_OWORD *)&v8->m_gameObject;
*(_OWORD *)&v10->m_controlId = v11;
++v10;
}
++v8;
}
while ( v8 != end );
end = a1->m_gameState.m_advanceFollowInstances.__end_;
}
if ( v10 != end )
a1->m_gameState.m_advanceFollowInstances.__end_ = v10;
}
LABEL_26:
for ( i = (__int64)a1->m_gameState.m_gameObjectPhysics.__table_.__p1_.__value_.__next_; i; i = *(_QWORD *)i )
{
while ( *(_DWORD *)(i + 60) < (signed int)a1->m_gameState.m_commandIndex )
{
i = sub_100018AE0(&a1->m_gameState.m_gameObjectPhysics.__table_.__bucket_list_.__ptr_.__value_, (__int64 *)i);
if ( !i )
return;
}
}
}