//
// GJBaseGameLayer::processPlayerFollowActions from 0x9a677c to 0x9a69b8 (572 bytes)
//
// 2 xrefs:
// > GJBaseGameLayer::processMoveActionsStep @ 0x9ebb74
// > ??> @ 0x73ee8
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 12:58:10 +0000
//
__int64 __fastcall GJBaseGameLayer::processPlayerFollowActions(GJBaseGameLayer *this, float a2)
{
__int64 v3; // x19
_QWORD *v4; // x21
_QWORD *v5; // x24
float v6; // s0
double v7; // d11
__int64 v8; // x27
int v9; // w0
cocos2d::CCObject *Group; // x0
cocos2d::CCObject *v11; // x23
double v12; // d9
float v13; // s9
unsigned int *v14; // x0
__int64 *v15; // x28
__int64 *v16; // x22
__int64 v17; // x19
float v18; // s10
float v19; // s1
float v20; // s0
float v21; // s0
float OldPosition; // s0
float v24; // s8
float v25; // s0
__int64 v26; // [xsp+90h] [xbp+90h] BYREF
v3 = *((_QWORD *)this + 269);
v4 = *(_QWORD **)(v3 + 1552);
v5 = *(_QWORD **)(v3 + 1560);
v6 = a2 * 60.0;
if ( v4 != v5 )
{
v7 = v6;
do
{
v8 = *v4;
v9 = (*(__int64 (__fastcall **)(_QWORD))(*(_QWORD *)*v4 + 64LL))(*v4);
Group = GJBaseGameLayer::getGroup(this, v9);
v11 = Group;
v12 = v7 * *(double *)(v8 + 168);
if ( v12 < 1.0 )
{
if ( v12 > 0.0 )
v13 = v12;
else
v13 = 0.0;
}
else
{
v13 = 1.0;
}
if ( Group )
{
v14 = *((unsigned int **)Group + 7);
if ( *v14 )
{
v15 = *((__int64 **)v14 + 2);
v16 = &v15[*v14 - 1];
if ( v15 <= v16 )
{
v17 = *v15;
if ( *v15 )
{
v18 = v7 * *(double *)(v8 + 192);
do
{
if ( !*(_BYTE *)(v17 + 1290) && *(_DWORD *)(v17 + 1236) != *((_DWORD *)this + 236) )
{
v19 = *(double *)(v17 + 944);
v20 = *(double *)(v17 + 952);
*(float *)(v17 + 1224) = v19;
*(float *)(v17 + 1228) = v20;
*(_DWORD *)(v17 + 1236) = *((_DWORD *)this + 236);
GameObject::dirtifyObjectRect(v17);
}
v21 = *(double *)(v8 + 176);
OldPosition = PlayerObject::getOldPosition(*((PlayerObject **)this + 407), v21);
if ( OldPosition != 0.0 )
{
v24 = OldPosition + (float)*(int *)(v8 + 184);
(*(void (__fastcall **)(__int64 *__return_ptr, __int64))(*(_QWORD *)v17 + 1360LL))(&v26, v17);
v25 = v13 * (float)(v24 - *((float *)&v26 + 1));
if ( v25 != 0.0 )
{
if ( v18 > 0.0 )
{
if ( v18 < v25 )
{
v25 = v18;
}
else if ( v25 < (float)-v18 )
{
v25 = -v18;
}
}
*(double *)(v17 + 952) = *(double *)(v17 + 952) + v25;
GameObject::dirtifyObjectPos(v17);
}
}
if ( v16 < ++v15 )
break;
v17 = *v15;
}
while ( *v15 );
}
}
}
}
++v4;
(*(void (__fastcall **)(GJBaseGameLayer *, cocos2d::CCObject *))(*(_QWORD *)this + 1376LL))(this, v11);
}
while ( v5 != v4 );
}
return _stack_chk_guard;
}