//
// PlayerObject::redirectDash from 0x43a048 to 0x43a1a6 (350 bytes)
//
// 1 xrefs:
// > GJBaseGameLayer::teleportPlayer @ 0x5b86dc
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:48:21 +0000
//
int __fastcall PlayerObject::redirectDash(int this, float a2)
{
int v2; // r4
double *v4; // r8
double *v5; // r7
float v6; // s13
float v7; // s15
float v8; // r0
float v9; // r2
float v10; // r0
float v11; // s17
float v12; // s16
float v13; // r0
float v14; // r0
int v15; // r6
int v16; // r0
float v17; // r2
double v18; // d7
double v19; // d6
PlayerObject *v20; // r0
int v21; // r1
float x; // [sp+4h] [bp-18h] BYREF
float y; // [sp+8h] [bp-14h]
_BYTE v24[8]; // [sp+Ch] [bp-10h] BYREF
v2 = this;
if ( *(_BYTE *)(this + 1996) )
{
v4 = (double *)(this + 1192);
v5 = (double *)(this + 1200);
v6 = *(double *)(this + 1192);
v7 = *(double *)(this + 1200);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&x, v6, v7);
v8 = atan2f(y, x);
v10 = COERCE_FLOAT(GJBaseGameLayer::convertToClosestDirection(COERCE_GJBASEGAMELAYER_((float)(a2 * 0.017453) - v8), 3.1416, v9));
v11 = v10;
if ( v10 != 0.0 )
{
v12 = cosf(v10);
v13 = sinf(v11);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v24,
(float)(x * v12) - (float)(y * v13),
(float)(x * v13) + (float)(y * v12));
cocos2d::CCPoint::operator=(&x, v24);
}
v14 = atan2f(y, x);
v15 = *(unsigned __int8 *)(v2 + 1963);
v16 = (int)(float)-(float)(57.296 * v14);
if ( *(_BYTE *)(v2 + 1963) )
v16 -= 90;
*(double *)(v2 + 1208) = (double)-(v16 % 360 + (v16 % 360 < 0 ? 0x168 : 0));
if ( v15 )
{
v17 = y;
y = x;
x = v17;
}
v18 = x;
v19 = y;
*v4 = x;
*v5 = v19;
if ( v18 >= 0.0 )
{
if ( v18 <= 0.0 )
return PlayerObject::updateDashArt(v2);
v20 = (PlayerObject *)v2;
v21 = v15;
}
else
{
v20 = (PlayerObject *)v2;
v21 = v15 ^ 1;
}
PlayerObject::doReversePlayer(v20, v21);
return PlayerObject::updateDashArt(v2);
}
return this;
}