//
// PlayerObject::reversePlayer from 0x100415860 to 0x100415941 (225 bytes)
//
// 5 xrefs:
// > GJBaseGameLayer::bumpPlayer @ 0x10012832c
// > GJBaseGameLayer::gravBumpPlayer @ 0x100128450
// > GJBaseGameLayer::reverseDirection @ 0x10012a882
// > GJBaseGameLayer::reverseDirection @ 0x10012a89f
// > PlayerObject::ringJump @ 0x1004145f4
//
// 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::reversePlayer(PlayerObject *a1, EffectGameObject *a2)
{
unsigned __int64 *v2; // r15
float m_maybeReverseSpeed; // xmm0_4
float *v4; // rax
unsigned __int64 v5; // [rsp-50h] [rbp-50h] BYREF
unsigned __int64 v6; // [rsp-48h] [rbp-48h] BYREF
unsigned __int64 v7; // [rsp-40h] [rbp-40h] BYREF
double v8[7]; // [rsp-38h] [rbp-38h] BYREF
if ( !a1->m_isPlatformer )
{
if ( a2 && a1->m_reverseSync )
{
((void (__fastcall *)(unsigned __int64 *))a2->getRealPosition)(&v5);
v2 = (unsigned __int64 *)((__int64 (__fastcall *)(PlayerObject *))a1->getPosition)(a1);
m_maybeReverseSpeed = a1->m_maybeReverseSpeed;
sub_10028CBE0((float *)&v7, m_maybeReverseSpeed, m_maybeReverseSpeed);
sub_10028CCE0((double *)&v6, v2, &v7);
sub_10028CD00(v8, &v5, &v6);
v4 = (float *)v8 + 1;
if ( !a1->m_isSideways )
v4 = (float *)v8;
a1->m_maybeReverseSpeed = (float)(*v4 + *v4) + a1->m_maybeReverseSpeed;
}
PlayerObject::doReversePlayer(a1, !a1->m_isGoingLeft);
}
}