//
// sub_1002CA150 from 0x1002ca150 to 0x1002ca278 (296 bytes)
//
// 1 xrefs:
// > GJBaseGameLayer::spawnPlayer2 @ 0x1002857dc
//
// 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 11:02:34 +0000
//
void __fastcall sub_1002CA150(double *a1, __int64 a2, int a3)
{
int v6; // w1
double v7; // d0
double v8; // d1
double *v9; // x0
__int64 v10; // [xsp+8h] [xbp-28h] BYREF
(*(void (__fastcall **)(double *, __int64))(*(_QWORD *)a1 + 344LL))(a1, 1);
(*(void (__fastcall **)(double *, __int64))(*(_QWORD *)a1 + 912LL))(a1, 255);
PlayerObject::copyAttributes((__int64)a1, a2);
v6 = *(unsigned __int8 *)(a2 + 2423);
if ( a3 )
{
PlayerObject::flipGravity((__int64)a1, v6 ^ 1, 1);
v7 = -*(double *)(a2 + 2392);
v8 = (double)(int)v7;
if ( v8 == v7 )
goto LABEL_6;
}
else
{
PlayerObject::flipGravity((__int64)a1, v6, 1);
v7 = *(double *)(a2 + 2392);
v8 = (double)(int)v7;
if ( v7 == v8 )
goto LABEL_6;
}
v7 = round((v7 - v8) * 1000.0) / 1000.0 + v8;
LABEL_6:
a1[299] = v7;
*((_BYTE *)a1 + 2425) = 0;
*((_BYTE *)a1 + 2500) = 0;
PlayerObject::toggleVisibility(a1, (*(_BYTE *)(a2 + 1787) & 1) == 0);
if ( *((_BYTE *)a1 + 2420) == 1 )
{
v9 = (double *)(*(__int64 (__fastcall **)(double *))(*(_QWORD *)a1 + 192LL))(a1);
sub_1000262F4(&v10, v9);
PlayerObject::placeStreakPoint((__int64)a1, (double *)&v10);
}
}