//
// PlayerObject::rotateGameplay from 0x1404f7fa0 to 0x1404f8432 (1170 bytes)
//
// 4 xrefs:
// > GJBaseGameLayer::rotateGameplay @ 0x14031fa44
// > GJBaseGameLayer::rotateGameplay @ 0x14031faa0
// > PlayerObject::resetObject @ 0x1404f5293
// > ??> @ 0x14092a23c
//
// This function is hookable on this platform (idp: pc, 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 11:33:21 +0000
//
void __fastcall PlayerObject::rotateGameplay(
__int64 a1,
__int64 a2,
int a3,
char a4,
float a5,
float a6,
char a7,
char a8)
{
double v11; // xmm7_8
double v12; // xmm6_8
char v13; // r15
char v14; // r12
__int64 v15; // rdx
__int64 v16; // r8
_BYTE *v17; // rbx
unsigned __int8 v18; // r14
char v19; // bp
cocos2d::CCArray **v20; // rbx
const struct cocos2d::CCPoint *v21; // rax
__int64 v22; // rax
float v23; // xmm0_4
float v24; // xmm1_4
float *v25; // rax
bool v26; // zf
double v27; // xmm0_8
const struct cocos2d::CCPoint *v28; // rax
__int64 v29; // rax
float v30; // xmm0_4
_BYTE *v31; // rax
double v32; // xmm1_8
double v33; // xmm0_8
double v34; // xmm0_8
double v35; // xmm0_8
_BYTE v36[16]; // [rsp+20h] [rbp-68h] BYREF
float v37; // [rsp+90h] [rbp+8h] BYREF
float v38; // [rsp+94h] [rbp+Ch]
char v39; // [rsp+98h] [rbp+10h]
v11 = *(double *)(a1 + 2472);
if ( *(_BYTE *)(a1 + 2936) )
v12 = *(double *)(a1 + 2816);
else
v12 = *(float *)(a1 + 2556) * *(double *)(a1 + 1984);
v13 = *(_BYTE *)(a1 + 2503);
v39 = *(_BYTE *)(a1 + 2507);
v14 = (unsigned int)(a2 - 3) <= 1;
*(_BYTE *)(a1 + 2507) = v14;
if ( (_DWORD)a2 == 1 || (_DWORD)a2 == 4 )
LOBYTE(a2) = 1;
else
a2 = 0;
PlayerObject::flipGravity(a1, a2);
v17 = (_BYTE *)(a1 + 2506);
v18 = *(_BYTE *)(a1 + 2506);
if ( *(_BYTE *)(a1 + 2936) )
v15 = v18;
else
LOBYTE(v15) = a3 == 3 || (v17 = (_BYTE *)(a1 + 2506), a3 == 2);
PlayerObject::doReversePlayer(a1, v15, v16);
PlayerObject::updatePlayerArt(a1);
v19 = v39;
if ( v14 != v39 )
{
if ( v18 == *(_BYTE *)(a1 + 2506) )
{
if ( *(_BYTE *)(a1 + 2500) )
{
PlayerObject::createFadeOutDartStreak(a1);
if ( *(_BYTE *)(a1 + 2432) )
{
v20 = *(cocos2d::CCArray ***)(a1 + 1976);
cocos2d::CCDrawNode::clear((cocos2d::CCDrawNode *)v20);
cocos2d::CCArray::removeAllObjects(v20[52]);
v21 = (const struct cocos2d::CCPoint *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 200LL))(a1);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v37, v21);
PlayerObject::placeStreakPoint(a1, v22);
}
}
}
if ( (*(unsigned __int8 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 2264) + 1256LL))(*(_QWORD *)(a1 + 2264)) )
cocos2d::CCParticleSystem::resetSystem(*(cocos2d::CCParticleSystem **)(a1 + 2264));
cocos2d::CCDictionary::removeAllObjects(*(cocos2d::CCDictionary **)(a1 + 1456));
cocos2d::CCDictionary::removeAllObjects(*(cocos2d::CCDictionary **)(a1 + 1464));
cocos2d::CCDictionary::removeAllObjects(*(cocos2d::CCDictionary **)(a1 + 1472));
cocos2d::CCDictionary::removeAllObjects(*(cocos2d::CCDictionary **)(a1 + 1480));
*(_QWORD *)(a1 + 1504) = -1;
*(_QWORD *)(a1 + 1488) = -1;
*(_QWORD *)(a1 + 1496) = -1;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v37, v12, v11);
v23 = v37;
v24 = v38;
v37 = v38;
v38 = v23;
if ( a4 )
{
if ( a7 )
{
v37 = a5;
v38 = a6;
}
else
{
v37 = v24 * a5;
v38 = v23 * a6;
}
}
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v36, (const struct cocos2d::CCPoint *)&v37);
v26 = *(_BYTE *)(a1 + 2936) == 0;
*(_BYTE *)(a1 + 2394) = 1;
*(double *)(a1 + 2472) = v25[1];
if ( !v26 )
{
v27 = *v25;
*(_BYTE *)(a1 + 2972) = 1;
*(double *)(a1 + 2816) = v27;
}
*(_BYTE *)(a1 + 2596) = 1;
*(_BYTE *)(a1 + 2580) = 0;
cocos2d::CCPoint::operator=(a1 + 2612, &unk_14090B428);
v28 = (const struct cocos2d::CCPoint *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 200LL))(a1);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v36, v28);
PlayerObject::placeStreakPoint(a1, v29);
if ( a8 )
{
*(_BYTE *)(a1 + 2394) = 0;
*(_BYTE *)(a1 + 2972) = 0;
}
if ( !*(_BYTE *)(a1 + 2497)
&& !*(_BYTE *)(a1 + 2498)
&& !*(_BYTE *)(a1 + 2500)
&& !*(_BYTE *)(a1 + 2508)
&& !*(_BYTE *)(a1 + 2499)
&& !*(_BYTE *)(a1 + 2501)
&& !*(_BYTE *)(a1 + 2502)
&& !*(_BYTE *)(a1 + 1840)
&& !*(_BYTE *)(a1 + 2610) )
{
if ( *(_BYTE *)(a1 + 2540) )
goto LABEL_41;
*(_WORD *)(a1 + 1840) = 0;
*(_BYTE *)(a1 + 1648) = 0;
*(_DWORD *)(a1 + 1832) = 0;
PlayerObject::runNormalRotation(a1, 0, 1.0);
}
if ( !*(_BYTE *)(a1 + 2540) )
{
LABEL_42:
v31 = (_BYTE *)(a1 + 2506);
goto LABEL_45;
}
LABEL_41:
v30 = *(double *)(a1 + 1392);
*(_QWORD *)(a1 + 1392) = *(_QWORD *)(a1 + 1400);
*(double *)(a1 + 1400) = v30;
goto LABEL_42;
}
v31 = v17;
if ( v13 != *(_BYTE *)(a1 + 2503) || v18 != *v17 )
{
LABEL_45:
if ( !*(_BYTE *)(a1 + 2540) )
return;
if ( v18 != *v31 )
{
if ( v14 != v19 )
*(double *)(a1 + 1408) = *(double *)(a1 + 1408) + 180.0;
v32 = *(double *)(a1 + 1408);
if ( v32 <= 0.0 )
v33 = -180.0;
else
v33 = 180.0;
*(double *)(a1 + 1408) = v33 - v32;
}
v34 = *(double *)(a1 + 1408);
if ( v34 <= 180.0 )
{
if ( v34 >= -180.0 )
{
LABEL_58:
PlayerObject::updateDashArt(a1);
return;
}
v35 = v34 + 360.0;
}
else
{
v35 = v34 - 360.0;
}
*(double *)(a1 + 1408) = v35;
goto LABEL_58;
}
}