//
// PlayerObject::boostPlayer from 0x10021ff64 to 0x1002200c4 (352 bytes)
//
// 2 xrefs:
// > PlayerObject::postCollision @ 0x10021ed2c
// > PlayerObject::postCollision @ 0x10021f8b8
//
// 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 PlayerObject::boostPlayer(PlayerObject *a1, float a2)
{
double v3; // d1
double v4; // d0
GJSpiderSprite *m_spiderSprite; // x20
double *v6; // x0
float v7; // s0
float v8; // s1
void *__p[2]; // [xsp+8h] [xbp-28h] BYREF
char v10; // [xsp+1Fh] [xbp-11h]
a1->m_maybeIsBoosted = 1;
a1->m_isOnGround2 = 0;
a1->m_isOnGround = 0;
a1->m_shouldTryPlacingCheckpoint = 1;
a1->m_isAccelerating = 1;
v3 = a2;
v4 = (double)(int)a2;
if ( v4 != v3 )
v3 = round((v3 - v4) * 1000.0) / 1000.0 + v4;
a1->m_yVelocity = v3;
if ( !a1->m_isDashing )
{
if ( a1->m_isShip
|| a1->m_isBird
|| a1->m_isDart
|| a1->m_isSwing
|| a1->m_isBall
|| a1->m_isRobot
|| a1->m_isSpider )
{
if ( a1->m_isSpider )
{
m_spiderSprite = a1->m_spiderSprite;
sub_100009900(__p, "fall_loop");
CCAnimatedSprite::tweenToAnimation(m_spiderSprite, __p, 0.1);
if ( v10 < 0 )
operator delete(__p[0]);
}
}
else
{
v7 = flt_10063A8C8[a1->m_vehicleSize == 1.0];
a1->m_isBallRotating = 0;
v8 = -180.0;
if ( a1->m_isUpsideDown )
v8 = 180.0;
a1->m_rotationSpeed = v8 / v7;
*(_WORD *)&a1->m_isRotating = 1;
}
}
v6 = (double *)((__int64 (__fastcall *)(PlayerObject *))a1->getPosition)(a1);
sub_1000229D0(&a1->m_lastGroundedPos, v6);
}