//
// HSVLiveOverlay::hsvChanged from 0x1001a010c to 0x1001a01f0 (228 bytes)
//
// 2 xrefs:
// > sub_1001A01F0 @ 0x1001a01f4
// > ??> @ 0x1007ab5a8
//
// 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 __fastcall HSVLiveOverlay::hsvChanged(HSVLiveOverlay *a1, ConfigureHSVWidget *a2)
{
__int64 v4; // x1
int v5; // w19
int v6; // w20
__int64 v7; // x23
__int64 v8; // x24
GameObject *m_object; // x0
cocos2d::CCArray *m_objects; // x21
__int64 v11; // x22
__int64 v12; // x0
int v13; // w8
_QWORD *p_v; // x8
GJSpriteColor *RelativeSpriteColor; // x0
v5 = ((__int64 (__fastcall *)(ConfigureHSVWidget *))a2->getTag)(a2);
if ( v5 == 1 )
v6 = 1;
else
v6 = 2;
v7 = *(_QWORD *)&a2->m_hsv.h;
v8 = *(_QWORD *)&a2->m_hsv.v;
m_object = a1->m_object;
if ( !m_object )
{
m_objects = a1->m_objects;
if ( !m_objects )
return;
goto LABEL_8;
}
m_objects = (cocos2d::CCArray *)sub_10024A1B8(m_object, v4);
if ( m_objects )
{
LABEL_8:
if ( !(unsigned int)sub_10024A36C(m_objects) )
return;
v11 = 0;
do
{
v12 = sub_10024A388(m_objects, v11);
v13 = *(_DWORD *)(v12 + 1028);
if ( v13 == 1006 || v13 == 899 )
{
if ( v5 == 1 )
{
*(_QWORD *)(v12 + 1612) = v7;
p_v = (_QWORD *)(v12 + 1620);
LABEL_16:
*p_v = v8;
}
}
else
{
RelativeSpriteColor = GameObject::getRelativeSpriteColor((GameObject *)v12, v6);
if ( RelativeSpriteColor )
{
*(_QWORD *)&RelativeSpriteColor->m_hsv.h = v7;
p_v = (_QWORD *)&RelativeSpriteColor->m_hsv.v;
goto LABEL_16;
}
}
v11 = (unsigned int)(v11 + 1);
}
while ( (unsigned int)v11 < (unsigned int)sub_10024A36C(m_objects) );
}
}