//
// GJBaseGameLayer::rotateGameplay from 0x877a60 to 0x877bbc (348 bytes)
//
// 4 xrefs:
// > ??> @ 0x365e8
// > ??> @ 0x1148a98
// > ??> @ 0x1155308
// > ??> @ 0x1190788
//
// 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)
{
char v4; // w22
const cocos2d::CCPoint *v5; // x0
cocos2d::CCPoint v6; // [xsp+50h] [xbp+50h] BYREF
__int64 v7; // [xsp+58h] [xbp+58h] BYREF
__int64 v8; // [xsp+60h] [xbp+60h] BYREF
if ( a2->m_changeChannel )
{
a1->m_gameState.m_currentChannel = a2->m_targetChannelID;
v4 = (unsigned int)(a2->m_groundDirection - 2) <= 1;
*std::__detail::_Map_base,std::allocator>,std::__detail::_Select1st,std::equal_to,std::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits,true>::operator[](
(__int64)&a1->m_gameState.m_spawnChannelRelated1,
&a1->m_gameState.m_currentChannel) = 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 = a1->m_player1->getPosition(a1->m_player1);
cocos2d::CCPoint::CCPoint(&v6, v5);
((void (__fastcall *)(__int64 *__return_ptr, RotateGameplayGameObject *))a2->getRealPosition)(&v7, a2);
cocos2d::CCPoint::operator-(&v8, &v6, &v7);
a1->didRotateGameplay(a1);
}
if ( a2->m_instantOffset )
{
a1->m_gameState.m_unkPoint30.x = 1.0;
a1->m_gameState.m_unkPoint30.y = 1.0;
}
}