//
// GJBaseGameLayer::rotateGameplay from 0x1001ea900 to 0x1001eaa3c (316 bytes)
//
// 3 xrefs:
// > ??> @ 0x10078fe00
// > ??> @ 0x1007c0c18
// > ??> @ 0x1007f4378
//
// 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 __fastcall GJBaseGameLayer::rotateGameplay(GJBaseGameLayer *a1, RotateGameplayGameObject *a2)
{
bool v4; // w21
__int64 *v5; // x0
float v6; // s0
double v7; // d0
float32x2_t v8; // [xsp+8h] [xbp-38h] BYREF
float32x2_t v9; // [xsp+10h] [xbp-30h] BYREF
int *p_m_currentChannel; // [xsp+18h] [xbp-28h] BYREF
if ( a2->m_changeChannel )
{
a1->m_gameState.m_currentChannel = a2->m_targetChannelID;
v4 = (a2->m_groundDirection & 0xFFFFFFFE) == 2;
p_m_currentChannel = &a1->m_gameState.m_currentChannel;
*((_BYTE *)sub_100018B20(
(float *)&a1->m_gameState.m_spawnChannelRelated1,
&a1->m_gameState.m_currentChannel,
(__int64)&unk_10063A31C,
&p_m_currentChannel)
+ 20) = v4;
}
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);
v5 = (__int64 *)((__int64 (__fastcall *)(PlayerObject *))a1->m_player1->getPosition)(a1->m_player1);
v6 = sub_1000229B8((__int64 *)&p_m_currentChannel, v5);
((void (__fastcall *)(float32x2_t *__return_ptr, RotateGameplayGameObject *, float))a2->getRealPosition)(
&v9,
a2,
v6);
*(float32x2_t *)&v7 = sub_1000229F0((float32x2_t *)&p_m_currentChannel, &v9, &v8);
((void (__fastcall *)(GJBaseGameLayer *, double))a1->didRotateGameplay)(a1, v7);
}
if ( a2->m_instantOffset )
a1->m_gameState.m_unkPoint30 = (cocos2d::CCPoint)0x3F8000003F800000LL;
}