//
// HSVLiveOverlay::hsvChanged from 0xa23984 to 0xa23aa0 (284 bytes)
//
// 3 xrefs:
// > `non-virtual thunk to'HSVLiveOverlay::hsvChanged @ 0xa23aa4
// > ??> @ 0x3c930
// > ??> @ 0x11d8af0
//
// 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 HSVLiveOverlay::hsvChanged(HSVLiveOverlay *a1, ConfigureHSVWidget *a2)
{
int v3; // w21
bool absoluteSaturation; // w24
float h; // w26
bool absoluteBrightness; // w23
float s; // w25
float v; // w22
cocos2d::CCArray *m_objects; // x20
unsigned int v10; // w19
__int64 v11; // x0
int v12; // w2
GJSpriteColor *RelativeSpriteColor; // x0
if ( a2->getTag(a2) == 1 )
v3 = 1;
else
v3 = 2;
absoluteSaturation = a2->m_hsv.absoluteSaturation;
h = a2->m_hsv.h;
absoluteBrightness = a2->m_hsv.absoluteBrightness;
s = a2->m_hsv.s;
v = a2->m_hsv.v;
if ( a1->m_object )
m_objects = (cocos2d::CCArray *)cocos2d::CCArray::createWithObject((cocos2d::CCArray *)a1->m_object, a2);
else
m_objects = a1->m_objects;
v10 = 0;
if ( m_objects && (unsigned int)cocos2d::CCArray::count(m_objects) )
{
do
{
v11 = cocos2d::CCArray::objectAtIndex(m_objects, v10);
v12 = *(_DWORD *)(v11 + 1012);
if ( v12 == 1006 || v12 == 899 )
{
if ( v3 == 1 )
{
*(float *)(v11 + 1596) = h;
*(_BYTE *)(v11 + 1608) = absoluteSaturation;
*(float *)(v11 + 1600) = s;
*(_BYTE *)(v11 + 1609) = absoluteBrightness;
*(float *)(v11 + 1604) = v;
++v10;
continue;
}
}
else
{
RelativeSpriteColor = GameObject::getRelativeSpriteColor((GameObject *)v11, v3);
if ( RelativeSpriteColor )
{
RelativeSpriteColor->m_hsv.absoluteSaturation = absoluteSaturation;
RelativeSpriteColor->m_hsv.absoluteBrightness = absoluteBrightness;
RelativeSpriteColor->m_hsv.h = h;
RelativeSpriteColor->m_hsv.s = s;
RelativeSpriteColor->m_hsv.v = v;
}
}
++v10;
}
while ( v10 < (unsigned int)cocos2d::CCArray::count(m_objects) );
}
}