//
// PlayerObject::reversePlayer from 0x100228e7c to 0x100228f54 (216 bytes)
//
// 5 xrefs:
// > GJBaseGameLayer::bumpPlayer @ 0x1001e9044
// > GJBaseGameLayer::gravBumpPlayer @ 0x1001e9140
// > GJBaseGameLayer::reverseDirection @ 0x1001ea8d0
// > GJBaseGameLayer::reverseDirection @ 0x1001ea8f0
// > PlayerObject::ringJump @ 0x100228210
//
// 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)
{
float32x2_t *v3; // x20
__n128 v4; // q0
__n128 v5; // q1
float32x2_t *v6; // x8
float32x2_t v7; // [xsp+0h] [xbp-30h] BYREF
float32x2_t v8; // [xsp+8h] [xbp-28h] BYREF
float32x2_t v9; // [xsp+10h] [xbp-20h] BYREF
float32x2_t v10; // [xsp+18h] [xbp-18h] BYREF
if ( !a1->m_isPlatformer )
{
if ( a2 && a1->m_reverseSync )
{
((void (__fastcall *)(float32x2_t *__return_ptr, EffectGameObject *))a2->getRealPosition)(&v9, a2);
v3 = (float32x2_t *)((__int64 (__fastcall *)(PlayerObject *))a1->getPosition)(a1);
v4.n128_u64[0] = *(_QWORD *)&a1->m_maybeReverseSpeed;
v4.n128_f32[0] = v4.n128_f64[0];
v5.n128_u32[0] = v4.n128_u32[0];
sub_100022980(v4, v5, &v7);
sub_1000229DC(v3, &v7, &v8);
sub_1000229F0(&v9, &v8, &v10);
if ( a1->m_isSideways )
v6 = (float32x2_t *)((char *)&v10 + 4);
else
v6 = &v10;
a1->m_maybeReverseSpeed = a1->m_maybeReverseSpeed + (float)(v6->f32[0] + v6->f32[0]);
}
PlayerObject::doReversePlayer(a1, !a1->m_isGoingLeft);
}
}