//
// PlayerObject::doReversePlayer from 0x10021d290 to 0x10021d3a0 (272 bytes)
//
// 11 xrefs:
// > GJBaseGameLayer::setupLevelStart @ 0x1001e5f58
// > GJBaseGameLayer::setupLevelStart @ 0x1001e5fe0
// > GJBaseGameLayer::loadStartPosObject @ 0x1001fcb08
// > PlayerObject::updateMove @ 0x10021c1d8
// > PlayerObject::redirectDash @ 0x100225c9c
// > PlayerObject::startDashing @ 0x100226568
// > PlayerObject::resetObject @ 0x100226994
// > PlayerObject::rotateGameplay @ 0x100226ce8
// > PlayerObject::reversePlayer @ 0x100228f40
// > PlayerObject::copyAttributes @ 0x10022d2dc
// > PlayerObject::loadFromCheckpoint @ 0x10022e308
//
// 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::doReversePlayer(PlayerObject *a1, bool a2)
{
__n128 v2; // q0
int v3; // w20
int m_isGoingLeft; // w21
float v6; // s8
bool m_isSideways; // w22
int v8; // w2
v3 = a2;
m_isGoingLeft = a1->m_isGoingLeft;
a1->m_isGoingLeft = a2;
if ( m_isGoingLeft == a2 )
{
if ( a2 )
v6 = -1.0;
else
v6 = 1.0;
m_isSideways = a1->m_isSideways;
}
else
{
a1->m_reverseRelated = 2;
if ( a2 )
v6 = -1.0;
else
v6 = 1.0;
m_isSideways = a1->m_isSideways;
if ( a1->m_isDart )
PlayerObject::createFadeOutDartStreak(a1);
}
a1->m_waveTrail->m_isFlipped = v3;
v2.n128_f32[0] = -v6;
if ( !m_isSideways )
v2.n128_f32[0] = v6;
((void (__fastcall *)(cocos2d::CCParticleSystemQuad *, __n128))a1->m_vehicleGroundParticles->setScaleX)(
a1->m_vehicleGroundParticles,
v2);
PlayerObject::updatePlayerGlow(a1);
PlayerObject::updatePlayerArt(a1);
if ( a1->m_fadeOutStreak && m_isGoingLeft != v3 && a1->m_isDart )
{
HardStreak::reset(a1->m_waveTrail);
PlayerObject::placeStreakPoint(a1);
}
if ( a1->m_isBall )
PlayerObject::runRotateAction(a1, 0, v8);
}