//
// GJBaseGameLayer::getFollowSpeedVal from 0x140337480 to 0x1403375eb (363 bytes)
//
// 3 xrefs:
// > GJBaseGameLayer::modifyGroupPhysics @ 0x140337b91
// > GJBaseGameLayer::processAdvancedFollowAction @ 0x1403383d2
// > ??> @ 0x14091f9c4
//
// This function is hookable on this platform (idp: pc, 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 11:30:35 +0000
//
__int64 __fastcall GJBaseGameLayer::getFollowSpeedVal(__int64 a1, __int64 a2, __int64 a3, int a4, int a5)
{
struct cocos2d::CCObject *Object; // rax
struct cocos2d::CCObject *v10; // rbx
__int64 v11; // rax
__int64 v12; // rcx
__int64 v13; // r8
struct cocos2d::CCObject *v14; // rax
__int64 v15; // rbx
__int64 v16; // rax
__int64 v17; // rax
_BYTE v19[8]; // [rsp+20h] [rbp-38h] BYREF
_BYTE v20[8]; // [rsp+28h] [rbp-30h] BYREF
_BYTE v21[16]; // [rsp+30h] [rbp-28h] BYREF
float X; // [rsp+68h] [rbp+10h] BYREF
float Y; // [rsp+6Ch] [rbp+14h]
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&X, (const struct cocos2d::CCPoint *)&dword_14090AA70);
if ( a4 > 0 )
{
Object = GJBaseGameLayer::tryGetObject(a1, a4);
v10 = Object;
if ( Object )
{
v11 = (*(__int64 (__fastcall **)(struct cocos2d::CCObject *, _BYTE *))(*(_QWORD *)Object + 1208LL))(Object, v20);
v12 = (__int64)v10 + 1232;
v13 = v11;
LABEL_7:
cocos2d::CCPoint::operator-(v12, v19, v13);
cocos2d::CCPoint::operator=(&X, v19);
goto LABEL_8;
}
}
if ( a5 > 0 )
{
v14 = GJBaseGameLayer::tryGetObject(a1, a5);
if ( v14 )
{
v15 = (*(__int64 (__fastcall **)(struct cocos2d::CCObject *, _BYTE *))(*(_QWORD *)v14 + 1208LL))(v14, v20);
v16 = (*(__int64 (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)a3 + 1208LL))(a3, v21);
v13 = v15;
v12 = v16;
goto LABEL_7;
}
}
LABEL_8:
if ( X != 0.0 || Y != 0.0 )
atan2f(Y, X);
v17 = cocos2d::ccpForAngle(v21);
cocos2d::CCPoint::operator*(v17, a2);
return a2;
}