//
// GJBaseGameLayer::processFollowActions from 0x594ef4 to 0x595118 (548 bytes)
//
// 1 xrefs:
// > GJBaseGameLayer::processMoveActionsStep @ 0x5bc89e
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 11:53:08 +0000
//
int __fastcall GJBaseGameLayer::processFollowActions(int this)
{
int v1; // r3
_DWORD *v2; // r8
GJBaseGameLayer *v3; // r11
int **v4; // r9
int *v5; // r4
int *v6; // t1
int v7; // r0
cocos2d::CCObject *Group; // r7
int v9; // r5
float *v10; // r10
float *v11; // r6
float v12; // s14
float v13; // s14
double v14; // d6
double v15; // d7
GJEffectManager *v16; // r5
int v17; // r0
int v18; // r3
GJEffectManager *v19; // r5
int v20; // r0
char v21; // r3
_DWORD *v22; // r3
int *v23; // r6
int v24; // r5
int v25; // t1
float v26; // s14
float v27; // s14
_BOOL4 v28; // [sp+4h] [bp-10h]
int **v29; // [sp+8h] [bp-Ch]
int *v30; // [sp+Ch] [bp-8h]
v1 = *(_DWORD *)(this + 1524);
v2 = (_DWORD *)(this + 11516);
v3 = (GJBaseGameLayer *)this;
v4 = *(int ***)(v1 + 868);
v29 = *(int ***)(v1 + 872);
while ( v4 != v29 )
{
v6 = *v4++;
v5 = v6;
v7 = (*(int (__fastcall **)(int *))(*v6 + 32))(v6);
Group = GJBaseGameLayer::getGroup(v3, v7);
this = GJBaseGameLayer::tryGetMainObject((cocos2d::CCDictionary **)v3, v6[29]);
v9 = this;
if ( this )
{
v10 = (float *)(this + 1060);
v11 = (float *)(this + 1064);
if ( *(_DWORD *)(this + 1072) != *((_DWORD *)v3 + 202) )
{
v12 = *(double *)(this + 808);
*v10 = v12;
v13 = *(double *)(this + 816);
*v11 = v13;
*(_DWORD *)(this + 1072) = *((_DWORD *)v3 + 202);
this = GameObject::dirtifyObjectRect(this);
}
v14 = (*(double *)(v9 + 808) - *v10) * *((double *)v5 + 16);
*((double *)v5 + 7) = v14;
v15 = (*(double *)(v9 + 816) - *v11) * *((double *)v5 + 17);
*((double *)v5 + 8) = v15;
v28 = v15 != 0.0;
if ( v14 != 0.0
|| v15 != 0.0
|| *((_BYTE *)v5 + 120)
|| *(_BYTE *)(v9 + 1111)
&& (v16 = *((GJEffectManager **)v3 + 381),
v17 = (*(int (__fastcall **)(int *))(*v5 + 32))(v5),
(this = GJEffectManager::wasFollowing(v16, v17, v5[29])) != 0) )
{
v18 = v5[50];
if ( v18 )
{
*(double *)(v18 + 48) = *(double *)(v18 + 48) + *((double *)v5 + 7);
*(double *)(v18 + 56) = *(double *)(v18 + 56) + *((double *)v5 + 8);
}
v19 = *((GJEffectManager **)v3 + 381);
v20 = (*(int (__fastcall **)(int *))(*v5 + 32))(v5);
v21 = v15 != 0.0;
if ( v14 != 0.0 )
v21 = 1;
GJEffectManager::setFollowing(v19, v20, v5[29], v21);
*v2 += cocos2d::CCArray::count(Group);
if ( Group )
{
v22 = *((_DWORD **)Group + 13);
if ( *v22 )
{
v23 = (int *)v22[3];
v30 = &v23[*v22 - 1];
while ( v23 <= v30 )
{
v25 = *v23++;
v24 = v25;
if ( !v25 )
break;
if ( !*(_BYTE *)(v24 + 1110) && *(_DWORD *)(v24 + 1072) != *((_DWORD *)v3 + 202) )
{
v26 = *(double *)(v24 + 808);
*(float *)(v24 + 1060) = v26;
v27 = *(double *)(v24 + 816);
*(float *)(v24 + 1064) = v27;
*(_DWORD *)(v24 + 1072) = *((_DWORD *)v3 + 202);
GameObject::dirtifyObjectRect(v24);
}
if ( v28 )
*(double *)(v24 + 816) = *(double *)(v24 + 816) + *((double *)v5 + 8);
GameObject::dirtifyObjectPos(v24);
if ( v14 != 0.0 && !*(_BYTE *)(v24 + 608) )
*(double *)(v24 + 808) = *(double *)(v24 + 808) + *((double *)v5 + 7);
(*(void (__fastcall **)(GJBaseGameLayer *, int))(*(_DWORD *)v3 + 684))(v3, v24);
}
}
}
this = (*(int (__fastcall **)(GJBaseGameLayer *, cocos2d::CCObject *))(*(_DWORD *)v3 + 688))(v3, Group);
}
}
}
return this;
}