//
// HSVLiveOverlay::hsvChanged from 0xb505a8 to 0xb506c4 (284 bytes)
//
// 3 xrefs:
// > `non-virtual thunk to'HSVLiveOverlay::hsvChanged @ 0xb506c8
// > ??> @ 0x57b80
// > ??> @ 0x14c0a10
//
// 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 13:01:58 +0000
//
cocos2d::CCArray *__fastcall HSVLiveOverlay::hsvChanged(cocos2d::CCArray **this, ConfigureHSVWidget *a2)
{
cocos2d::CCArray *result; // x0
int v4; // w21
char v5; // w24
int v6; // w26
char v7; // w23
int v8; // w25
int v9; // w22
cocos2d::CCArray *v10; // x20
unsigned int v11; // w19
__int64 v12; // x0
int v13; // w2
__int64 RelativeSpriteColor; // x0
result = (cocos2d::CCArray *)(*(__int64 (__fastcall **)(ConfigureHSVWidget *))(*(_QWORD *)a2 + 64LL))(a2);
if ( (_DWORD)result == 1 )
v4 = 1;
else
v4 = 2;
v5 = *((_BYTE *)a2 + 388);
v6 = *((_DWORD *)a2 + 94);
v7 = *((_BYTE *)a2 + 389);
v8 = *((_DWORD *)a2 + 95);
v9 = *((_DWORD *)a2 + 96);
if ( *(this + 84) )
{
result = (cocos2d::CCArray *)cocos2d::CCArray::createWithObject(*(this + 84), a2);
v10 = result;
}
else
{
v10 = *(this + 85);
}
v11 = 0;
if ( v10 )
{
result = (cocos2d::CCArray *)cocos2d::CCArray::count(v10);
if ( (_DWORD)result )
{
do
{
v12 = cocos2d::CCArray::objectAtIndex(v10, v11);
v13 = *(_DWORD *)(v12 + 1028);
if ( v13 == 1006 || v13 == 899 )
{
if ( v4 == 1 )
{
*(_DWORD *)(v12 + 1612) = v6;
*(_BYTE *)(v12 + 1624) = v5;
*(_DWORD *)(v12 + 1616) = v8;
*(_BYTE *)(v12 + 1625) = v7;
*(_DWORD *)(v12 + 1620) = v9;
++v11;
goto LABEL_13;
}
}
else
{
RelativeSpriteColor = GameObject::getRelativeSpriteColor((GameObject *)v12, v4);
if ( RelativeSpriteColor )
{
*(_BYTE *)(RelativeSpriteColor + 28) = v5;
*(_BYTE *)(RelativeSpriteColor + 29) = v7;
*(_DWORD *)(RelativeSpriteColor + 16) = v6;
*(_DWORD *)(RelativeSpriteColor + 20) = v8;
*(_DWORD *)(RelativeSpriteColor + 24) = v9;
}
}
++v11;
LABEL_13:
result = (cocos2d::CCArray *)cocos2d::CCArray::count(v10);
}
while ( v11 < (unsigned int)result );
}
}
return result;
}