//
// PlayerObject::redirectDash from 0x755680 to 0x75586c (492 bytes)
//
// 2 xrefs:
// > GJBaseGameLayer::teleportPlayer @ 0x9e5cb4
// > ??> @ 0x102ca0
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 12:52:57 +0000
//
__int64 __fastcall PlayerObject::redirectDash(PlayerObject *this, float a2)
{
float v5; // s0
float v6; // s1
float v7; // s0
GJBaseGameLayer *v8; // x0
float v9; // s0
float v10; // s8
float v11; // s0
int v12; // w1
float v13; // s0
int v14; // w0
int v15; // w2
float v16; // s1
float v17; // s2
int v18; // w2
float v19; // s0
float v20; // s9
float v21; // s0
float x; // [xsp+58h] [xbp+58h] BYREF
float y; // [xsp+5Ch] [xbp+5Ch]
_BYTE v24[8]; // [xsp+60h] [xbp+60h] BYREF
if ( *((_BYTE *)this + 2460) )
{
v5 = *((double *)this + 173);
v6 = *((double *)this + 174);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&x, v5, v6);
v7 = atan2f(y, x);
GJBaseGameLayer::convertToClosestDirection(v8, -(float)(v7 - (float)(a2 * 0.017453)), 3.1416);
v10 = v9;
if ( v9 != 0.0 )
{
v20 = cosf(v9);
v21 = sinf(v10);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v24,
-(float)((float)(v21 * y) - (float)(v20 * x)),
(float)(v21 * x) + (float)(v20 * y));
cocos2d::CCPoint::operator=(&x, v24);
}
v11 = atan2f(y, x);
v12 = *((unsigned __int8 *)this + 2427);
v13 = -(float)(v11 * 57.296);
v14 = (int)v13;
*((double *)this + 175) = v13;
if ( v12 )
{
v18 = (v14 - 90) % 360;
if ( v18 < 0 )
v18 += 360;
v16 = y;
*((double *)this + 175) = (double)-v18;
v19 = x;
x = v16;
v17 = v19;
y = v19;
}
else
{
v15 = v14 % 360;
if ( v14 % 360 < 0 )
v15 += 360;
v16 = x;
v17 = y;
*((double *)this + 175) = (double)-v15;
}
*((double *)this + 173) = v16;
*((double *)this + 174) = v17;
if ( v16 < 0.0 )
{
PlayerObject::doReversePlayer(this, v12 ^ 1);
}
else if ( v16 > 0.0 )
{
PlayerObject::doReversePlayer(this, v12);
}
PlayerObject::updateDashArt(this);
}
return _stack_chk_guard;
}