//
// ColorSelectPopup::updateCopyColor from 0x863118 to 0x8631d4 (188 bytes)
//
// 5 xrefs:
// > ColorSelectPopup::colorSelectClosed @ 0x863a44
// > ColorSelectPopup::onUpdateCopyColor @ 0x863d98
// > ColorSelectPopup::onToggleHSVMode @ 0x863ddc
// > ColorSelectPopup::textChanged @ 0x867cf8
// > ??> @ 0xa5a18
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 12:55:37 +0000
//
__int64 __fastcall ColorSelectPopup::updateCopyColor(ColorSelectPopup *this)
{
EffectGameObject *v2; // x0
int v3; // w19
__int64 result; // x0
unsigned int v5; // w20
EffectGameObject *v6; // x0
int v7; // w19
EffectGameObject *v8; // x22
bool v9; // cf
unsigned int v10; // w1
__int64 v11; // x1
v2 = *((EffectGameObject **)this + 85);
if ( v2 )
{
v3 = *((_DWORD *)this + 294);
result = EffectGameObject::getTargetColorIndex(v2);
if ( v3 == (_DWORD)result )
v3 = 0;
*(_DWORD *)(*((_QWORD *)this + 85) + 1628LL) = v3;
}
else
{
result = *((_QWORD *)this + 86);
if ( result )
{
v5 = 0;
while ( 1 )
{
result = cocos2d::CCArray::count((cocos2d::CCArray *)result);
v9 = v5 >= (unsigned int)result;
v10 = v5++;
if ( v9 )
break;
v6 = (EffectGameObject *)cocos2d::CCArray::objectAtIndex(*((cocos2d::CCArray **)this + 86), v10);
v7 = *((_DWORD *)this + 294);
v8 = v6;
if ( v7 == (unsigned int)EffectGameObject::getTargetColorIndex(v6) )
v7 = 0;
*((_DWORD *)v8 + 407) = v7;
result = *((_QWORD *)this + 86);
}
}
else
{
v11 = *((_QWORD *)this + 143);
if ( v11 )
{
LODWORD(result) = *((_DWORD *)this + 294);
if ( (_DWORD)result == *(_DWORD *)(v11 + 92) )
result = 0;
else
result = (unsigned int)result;
*(_DWORD *)(v11 + 120) = result;
}
}
}
return result;
}