//
// ColorSelectPopup::onCopyOpacity from 0x862894 to 0x86291c (136 bytes)
//
// 3 xrefs:
// > ??> @ 0xd6060
// > ColorSelectPopup::init @ 0x865c8c
// > ??> @ 0x15465d8
//
// 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::onCopyOpacity(ColorSelectPopup *this, cocos2d::CCObject *a2)
{
char v3; // w1
__int64 result; // x0
char v5; // w1
cocos2d::CCArray *v6; // x0
unsigned int v7; // w20
bool v8; // cf
unsigned int v9; // w1
v3 = *((_BYTE *)this + 1180);
result = *((_QWORD *)this + 85);
v5 = v3 ^ 1;
*((_BYTE *)this + 1180) = v5;
if ( result )
{
*(_BYTE *)(result + 1632) = v5;
}
else
{
v6 = *((cocos2d::CCArray **)this + 86);
if ( v6 )
{
v7 = 0;
while ( 1 )
{
result = cocos2d::CCArray::count(v6);
v8 = v7 >= (unsigned int)result;
v9 = v7++;
if ( v8 )
break;
*(_BYTE *)(cocos2d::CCArray::objectAtIndex(*((cocos2d::CCArray **)this + 86), v9) + 1632) = *((_BYTE *)this + 1180);
v6 = *((cocos2d::CCArray **)this + 86);
}
}
else
{
result = *((_QWORD *)this + 143);
if ( result )
*(_BYTE *)(result + 125) = v5;
}
}
return result;
}