//
// ColorSelectPopup::updateCopyColor from 0x73cc08 to 0x73ccc8 (192 bytes)
//
// 5 xrefs:
// > ColorSelectPopup::colorSelectClosed @ 0x73cdec
// > ColorSelectPopup::onUpdateCopyColor @ 0x73fde8
// > ColorSelectPopup::onToggleHSVMode @ 0x73fe2c
// > ColorSelectPopup::textChanged @ 0x7422bc
// > ??> @ 0x7c128
//
// 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::updateCopyColor(ColorSelectPopup *a1)
{
EffectGameObject *m_gameObject; // x0
int m_copyColorID; // w19
cocos2d::CCArray *m_gameObjects; // x1
unsigned int v5; // w20
EffectGameObject *v6; // x0
int v7; // w19
EffectGameObject *v8; // x22
int TargetColorIndex; // w0
bool v10; // cf
unsigned int v11; // w1
ColorAction *m_colorAction; // x1
int v13; // w0
m_gameObject = a1->m_gameObject;
if ( m_gameObject )
{
m_copyColorID = a1->m_copyColorID;
if ( m_copyColorID == EffectGameObject::getTargetColorIndex(m_gameObject) )
m_copyColorID = 0;
a1->m_gameObject->m_copyColorID = m_copyColorID;
}
else
{
m_gameObjects = a1->m_gameObjects;
if ( m_gameObjects )
{
v5 = 0;
while ( 1 )
{
v10 = v5 >= (unsigned int)cocos2d::CCArray::count(m_gameObjects);
v11 = v5++;
if ( v10 )
break;
v6 = (EffectGameObject *)cocos2d::CCArray::objectAtIndex(a1->m_gameObjects, v11);
v7 = a1->m_copyColorID;
v8 = v6;
TargetColorIndex = EffectGameObject::getTargetColorIndex(v6);
m_gameObjects = a1->m_gameObjects;
if ( v7 == TargetColorIndex )
v7 = 0;
v8->m_copyColorID = v7;
}
}
else
{
m_colorAction = a1->m_colorAction;
if ( m_colorAction )
{
v13 = a1->m_copyColorID;
if ( v13 == m_colorAction->m_colorID )
v13 = 0;
m_colorAction->m_copyID = v13;
}
}
}
}