//
// CustomizeObjectLayer::hsvPopupClosed from 0x840958 to 0x840a2c (212 bytes)
//
// 3 xrefs:
// > `non-virtual thunk to'CustomizeObjectLayer::hsvPopupClosed @ 0x840a30
// > ??> @ 0x851e8
// > ??> @ 0x118c938
//
// 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 CustomizeObjectLayer::hsvPopupClosed(CustomizeObjectLayer *a1, HSVWidgetPopup *a2, cocos2d::ccHSVValue a3)
{
__int64 v4; // x22
__int64 v5; // x23
int v6; // w21
GJSpriteColor *RelativeSpriteColor; // x0
unsigned int v8; // w19
bool v9; // cf
unsigned int v10; // w1
GameObject *v11; // x0
GJSpriteColor *v12; // x0
v4 = *(_QWORD *)&a3.h;
v5 = *(_QWORD *)&a3.v;
if ( a2->getTag(a2) == 1 )
v6 = 1;
else
v6 = 2;
if ( a1->m_targetObject )
{
RelativeSpriteColor = GameObject::getRelativeSpriteColor(a1->m_targetObject, v6);
if ( RelativeSpriteColor )
{
*(_QWORD *)&RelativeSpriteColor->m_hsv.h = v4;
*(_QWORD *)&RelativeSpriteColor->m_hsv.v = v5;
}
}
else
{
v8 = 0;
while ( 1 )
{
v9 = v8 >= (unsigned int)cocos2d::CCArray::count(a1->m_targetObjects);
v10 = v8++;
if ( v9 )
break;
while ( 1 )
{
v11 = (GameObject *)cocos2d::CCArray::objectAtIndex(a1->m_targetObjects, v10);
v12 = GameObject::getRelativeSpriteColor(v11, v6);
if ( !v12 )
break;
*(_QWORD *)&v12->m_hsv.h = v4;
*(_QWORD *)&v12->m_hsv.v = v5;
v9 = v8 >= (unsigned int)cocos2d::CCArray::count(a1->m_targetObjects);
v10 = v8++;
if ( v9 )
goto LABEL_7;
}
}
}
LABEL_7:
CustomizeObjectLayer::updateHSVButtons(a1);
}