//
// HSVLiveOverlay::hsvChanged from 0x10026b1c0 to 0x10026b31d (349 bytes)
//
// 2 xrefs:
// > sub_10026B320 @ 0x10026b32c
// > ??> @ 0x1008ec240
//
// 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)
{
int v3; // r15d
int v4; // ebx
__int64 v5; // r12
GameObject *m_object; // rdi
cocos2d::CCArray *m_objects; // r14
int v8; // ebx
unsigned int v9; // r15d
_QWORD *p_v; // rax
__int64 v11; // rax
int v12; // ecx
GJSpriteColor *RelativeSpriteColor; // rax
unsigned int v14; // r15d
GameObject *v15; // rax
int m_objectID; // ecx
GJSpriteColor *v17; // rax
__m128 v18; // [rsp+0h] [rbp-40h]
v3 = ((__int64 (__fastcall *)(ConfigureHSVWidget *))a2->getTag)(a2);
v4 = 0;
v18 = (__m128)*(unsigned __int64 *)&a2->m_hsv.h;
v5 = *(_QWORD *)&a2->m_hsv.v;
m_object = a1->m_object;
if ( m_object )
{
m_objects = (cocos2d::CCArray *)sub_10071FA80(m_object);
if ( !m_objects )
return;
}
else
{
m_objects = a1->m_objects;
if ( !m_objects )
return;
}
if ( !(unsigned int)sub_100720070(m_objects) )
return;
LOBYTE(v4) = v3 != 1;
v8 = v4 + 1;
if ( v3 == 1 )
{
v9 = 0;
while ( 1 )
{
v11 = sub_1007200C0(m_objects, v9);
v12 = *(_DWORD *)(v11 + 1028);
if ( v12 == 1006 || v12 == 899 )
{
_mm_storel_ps((double *)(v11 + 1612), v18);
p_v = (_QWORD *)(v11 + 1620);
}
else
{
RelativeSpriteColor = GameObject::getRelativeSpriteColor((GameObject *)v11, v8);
if ( !RelativeSpriteColor )
goto LABEL_10;
_mm_storel_ps((double *)&RelativeSpriteColor->m_hsv.h, v18);
p_v = (_QWORD *)&RelativeSpriteColor->m_hsv.v;
}
*p_v = v5;
LABEL_10:
if ( ++v9 >= (unsigned int)sub_100720070(m_objects) )
return;
}
}
v14 = 0;
do
{
v15 = (GameObject *)sub_1007200C0(m_objects, v14);
m_objectID = v15->m_objectID;
if ( m_objectID != 899 && m_objectID != 1006 )
{
v17 = GameObject::getRelativeSpriteColor(v15, v8);
if ( v17 )
{
_mm_storel_ps((double *)&v17->m_hsv.h, v18);
*(_QWORD *)&v17->m_hsv.v = v5;
}
}
++v14;
}
while ( v14 < (unsigned int)sub_100720070(m_objects) );
}