//
// GJRotateCommandLayer::onFollowRotation from 0x1000037d0 to 0x1000038bf (239 bytes)
//
// 2 xrefs:
// > GJRotateCommandLayer::init @ 0x100002847
// > GJRotateCommandLayer::init @ 0x100002967
//
// 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 GJRotateCommandLayer::onFollowRotation(GJRotateCommandLayer *a1, cocos2d::CCObject *a2)
{
bool m_followP1; // al
bool v4; // al
EffectGameObject *m_gameObject; // rax
cocos2d::CCArray *m_gameObjects; // rdi
unsigned int v7; // r14d
__int64 v8; // rax
if ( ((unsigned int (__fastcall *)(cocos2d::CCObject *))a2->getTag)(a2) == 1 )
{
m_followP1 = a1->m_followP1;
a1->m_followP1 = !m_followP1;
a1->m_followP2 = 0;
v4 = !m_followP1;
}
else
{
a1->m_followP2 ^= 1u;
a1->m_followP1 = 0;
v4 = 0;
}
CCMenuItemToggler::toggle(a1->m_followP1Toggler, v4);
CCMenuItemToggler::toggle(a1->m_followP2Toggler, a1->m_followP2);
m_gameObject = a1->m_gameObject;
if ( m_gameObject )
{
m_gameObject->m_targetPlayer1 = a1->m_followP1;
m_gameObject->m_targetPlayer2 = a1->m_followP2;
}
else
{
m_gameObjects = a1->m_gameObjects;
if ( m_gameObjects && (unsigned int)sub_100720070(m_gameObjects) )
{
v7 = 0;
do
{
v8 = sub_1007200C0(a1->m_gameObjects, v7);
*(_BYTE *)(v8 + 1684) = a1->m_followP1;
*(_BYTE *)(v8 + 1685) = a1->m_followP2;
++v7;
}
while ( v7 < (unsigned int)sub_100720070(a1->m_gameObjects) );
}
}
}