//
// ColorSelectPopup::onPlayerColor2 from 0x3d9dea to 0x3d9e60 (118 bytes)
//
// 0 xrefs:
//
// 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 ColorSelectPopup::onPlayerColor2(ColorSelectPopup *a1, cocos2d::CCObject *a2)
{
EffectGameObject *m_gameObject; // r4
int v4; // r3
int v5; // r0
bool v6; // r3
ColorAction *m_colorAction; // r2
CCMenuItemToggler::toggle(a1->m_playerColor1Toggle, 0);
m_gameObject = a1->m_gameObject;
if ( a1->m_playerColor == 2 )
v4 = 0;
else
v4 = 2;
a1->m_playerColor = v4;
if ( m_gameObject )
{
m_gameObject->m_usesPlayerColor2 = v4 != 0;
m_gameObject->m_usesPlayerColor1 = 0;
}
else if ( a1->m_gameObjects )
{
while ( (unsigned int)m_gameObject < cocos2d::CCArray::count(a1->m_gameObjects) )
{
v5 = cocos2d::CCArray::objectAtIndex(a1->m_gameObjects, (unsigned int)m_gameObject);
m_gameObject = (EffectGameObject *)((char *)m_gameObject + 1);
v6 = a1->m_playerColor == 2;
*(_BYTE *)(v5 + 1297) = 0;
*(_BYTE *)(v5 + 1298) = v6;
}
}
else
{
m_colorAction = a1->m_colorAction;
if ( m_colorAction )
m_colorAction->m_playerColor = v4;
}
}