//
// GJBaseGameLayer::rotateGameplay from 0x1402181c0 to 0x140218361 (417 bytes)
//
// 6 xrefs:
// > ??> @ 0x140567088
// > ??> @ 0x1405863e0
// > ??> @ 0x1405c9c70
// > ??> @ 0x14067f614
// > ??> @ 0x14067f648
// > ??> @ 0x1406cd218
//
// 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 GJBaseGameLayer::rotateGameplay(GJBaseGameLayer *a1, RotateGameplayGameObject *a2)
{
int m_groundDirection; // eax
_BYTE v5[16]; // [rsp+40h] [rbp-28h] BYREF
char v6; // [rsp+78h] [rbp+10h] BYREF
cocos2d::CCPoint v7; // [rsp+80h] [rbp+18h] BYREF
char v8; // [rsp+88h] [rbp+20h] BYREF
if ( a2->m_changeChannel )
{
a1->m_gameState.m_currentChannel = a2->m_targetChannelID;
m_groundDirection = a2->m_groundDirection;
*(_BYTE *)(*(_QWORD *)sub_140250920(&a1->m_gameState.m_spawnChannelRelated1, v5) + 20LL) = (unsigned int)(m_groundDirection - 2) <= 1;
}
if ( !a2->m_channelOnly )
{
PlayerObject::rotateGameplay(
a1->m_player1,
a2->m_moveDirection,
a2->m_groundDirection,
a2->m_editVelocity,
a2->m_velocityModX,
a2->m_velocityModY,
a2->m_overrideVelocity,
a2->m_dontSlide);
if ( a1->m_gameState.m_isDualMode )
PlayerObject::rotateGameplay(
a1->m_player2,
a2->m_moveDirection,
a2->m_groundDirection,
a2->m_editVelocity,
a2->m_velocityModX,
a2->m_velocityModY,
a2->m_overrideVelocity,
a2->m_dontSlide);
a1->m_player1->getPosition_0(a1->m_player1);
cocos2d::CCPoint::CCPoint(&v7);
((void (__fastcall *)(RotateGameplayGameObject *, char *))a2->getRealPosition)(a2, &v6);
cocos2d::CCPoint::operator-(&v7, &v8, &v6);
a1->didRotateGameplay(a1);
}
if ( a2->m_instantOffset )
{
a1->m_gameState.m_unkPoint30.x = 1.0;
a1->m_gameState.m_unkPoint30.y = 1.0;
}
}