//
// ColorSelectPopup::updateCopyColor from 0x4df1d0 to 0x4df240 (112 bytes)
//
// 4 xrefs:
// > ColorSelectPopup::colorSelectClosed @ 0x4df91a
// > ColorSelectPopup::onUpdateCopyColor @ 0x4dfa68
// > ColorSelectPopup::onToggleHSVMode @ 0x4dfa92
// > ColorSelectPopup::textChanged @ 0x4e21fa
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:50:59 +0000
//
EffectGameObject *__fastcall ColorSelectPopup::updateCopyColor(ColorSelectPopup *this)
{
EffectGameObject *result; // r0
EffectGameObject *v3; // r5
unsigned int v4; // r5
EffectGameObject *v5; // r0
int v6; // r6
EffectGameObject *v7; // r7
int v8; // r2
int v9; // r3
result = *((EffectGameObject **)this + 132);
if ( result )
{
v3 = *((EffectGameObject **)this + 202);
result = (EffectGameObject *)EffectGameObject::getTargetColorIndex(result);
if ( result == v3 )
v3 = nullptr;
*(_DWORD *)(*((_DWORD *)this + 132) + 1448) = v3;
}
else if ( *((_DWORD *)this + 133) )
{
v4 = 0;
while ( 1 )
{
result = (EffectGameObject *)cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 133));
if ( v4 >= (unsigned int)result )
break;
v5 = (EffectGameObject *)cocos2d::CCArray::objectAtIndex(*((cocos2d::CCArray **)this + 133), v4);
v6 = *((_DWORD *)this + 202);
++v4;
v7 = v5;
if ( EffectGameObject::getTargetColorIndex(v5) == v6 )
v6 = 0;
*((_DWORD *)v7 + 362) = v6;
}
}
else
{
v8 = *((_DWORD *)this + 196);
if ( v8 )
{
v9 = *((_DWORD *)this + 202);
if ( *(_DWORD *)(v8 + 88) == v9 )
v9 = 0;
*(_DWORD *)(v8 + 116) = v9;
}
}
return result;
}