//
// PlayerObject::redirectPlayerForce from 0x6291d4 to 0x6293cc (504 bytes)
//
// 2 xrefs:
// > GJBaseGameLayer::teleportPlayer @ 0x889fec
// > ??> @ 0x462c0
//
// 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 PlayerObject::redirectPlayerForce(PlayerObject *a1, float a2, float a3, float a4, float a5)
{
float v7; // s8
float m_platformerXVelocity; // s0
float m_yVelocity; // s1
float v12; // s0
float v13; // s0
float v14; // s11
float v15; // s0
float v16; // s1
float v17; // s0
float v18; // s9
float v19; // s0
float v20; // s0
float v21; // s1
float v22; // w1
float v23; // s0
float v24; // s0
float v25; // s1
float v26; // s13
float v27; // s0
float v28; // s0
float v29; // s1
cocos2d::CCPoint x; // [xsp+68h] [xbp+68h] BYREF
cocos2d::CCPoint v31; // [xsp+70h] [xbp+70h] BYREF
cocos2d::CCPoint v32; // 0:s0.4,4:s1.4
v7 = a2 * 0.017453;
m_platformerXVelocity = a1->m_platformerXVelocity;
m_yVelocity = a1->m_yVelocity;
cocos2d::CCPoint::CCPoint(&x, m_platformerXVelocity, m_yVelocity);
v12 = atan2f(x.y, x.x);
v13 = GJBaseGameLayer::convertToClosestDirection(v7 - v12, 3.1416);
v14 = v13;
if ( v13 != 0.0 )
{
v26 = cosf(v13);
v27 = sinf(v14);
cocos2d::CCPoint::CCPoint(
&v31,
-(float)((float)(v27 * x.y) - (float)(v26 * x.x)),
(float)(v27 * x.x) + (float)(v26 * x.y));
cocos2d::CCPoint::operator=(&x, v28, v29);
}
cocos2d::CCPoint::operator*(&x, a3);
cocos2d::CCPoint::operator=(&x, v15, v16);
v17 = sqrtf((float)(x.y * x.y) + (float)(x.x * x.x));
if ( a5 < v17 && a5 > 0.0 )
{
v23 = a5 / v17;
LABEL_13:
cocos2d::CCPoint::operator*(&x, v23);
cocos2d::CCPoint::operator=(&x, v24, v25);
goto LABEL_9;
}
if ( a4 > v17 && a4 > 0.0 )
{
if ( v17 == 0.0 )
{
v18 = cosf(v7);
v19 = sinf(v7);
cocos2d::CCPoint::CCPoint(&v31, a4 * v18, a4 * v19);
cocos2d::CCPoint::operator=(&x, v20, v21);
goto LABEL_9;
}
v23 = a4 / v17;
goto LABEL_13;
}
LABEL_9:
if ( a1->m_isSideways )
{
v22 = x.x;
x.x = x.y;
x.y = v22;
}
cocos2d::CCPoint::CCPoint(&v31, &x);
PlayerObject::updatePlayerForce(a1, v32, (bool)&v31);
}