//
// ConfigureHSVWidget::updateLabels from 0x8e0fbc to 0x8e15b0 (1524 bytes)
//
// 6 xrefs:
// > ConfigureHSVWidget::sliderChanged @ 0x8e1604
// > ConfigureHSVWidget::onToggleSConst @ 0x8e1708
// > ConfigureHSVWidget::onToggleVConst @ 0x8e1770
// > ConfigureHSVWidget::onResetHSV @ 0x8e17e4
// > ConfigureHSVWidget::init @ 0x8e1e30
// > ??> @ 0x41ef8
//
// 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 ConfigureHSVWidget::updateLabels(ConfigureHSVWidget *a1)
{
cocos2d::CCDictionary *m_inputs; // x0
CCTextInputNode *v3; // x21
const char *v4; // x1
cocos2d::CCString *v5; // x0
char *CString; // x0
unsigned __int8 *v7; // x0
CCTextInputNode *v8; // x25
const char *v9; // x1
cocos2d::CCString *v10; // x0
char *v11; // x0
unsigned __int8 *v12; // x0
CCTextInputNode *v13; // x25
const char *v14; // x1
cocos2d::CCString *v15; // x0
char *v16; // x0
unsigned __int8 *v17; // x0
float h; // s0
cocos2d::CCString *v19; // x0
size_t v20; // x0
const char *v21; // x1
float s; // s0
cocos2d::CCString *v23; // x0
size_t v24; // x0
const char *v25; // x1
float v; // s0
cocos2d::CCString *v27; // x0
size_t v28; // x0
unsigned __int8 *v29; // x0
unsigned __int8 *v30; // x0
unsigned __int8 *v31; // x0
unsigned int *v32; // x1
int v33; // w2
unsigned int *v34; // x20
int v35; // w1
unsigned int *v36; // x1
int v37; // w2
unsigned int *v38; // x1
int v39; // w2
unsigned int *v40; // x1
int v41; // w2
unsigned int *v42; // x1
int v43; // w2
const char *v44; // [xsp+58h] [xbp+58h]
const char *v45; // [xsp+58h] [xbp+58h]
const char *v46; // [xsp+58h] [xbp+58h]
const unsigned __int8 *v47; // [xsp+70h] [xbp+70h] BYREF
const unsigned __int8 *v48; // [xsp+78h] [xbp+78h] BYREF
const unsigned __int8 *v49; // [xsp+80h] [xbp+80h] BYREF
if ( a1->m_addInputs )
{
m_inputs = a1->m_inputs;
a1->m_updating = 1;
v3 = (CCTextInputNode *)cocos2d::CCDictionary::objectForKey(m_inputs, 1);
v5 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%.0f", v4, a1->m_hsv.h);
CString = (char *)cocos2d::CCString::getCString(v5);
sub_D153B8((int)&v49, CString);
CCTextInputNode::setString(v3, &v49);
v7 = (unsigned __int8 *)(v49 - 24);
if ( v49 - 24 != (const unsigned __int8 *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v36 = (unsigned int *)(v49 - 8);
do
v37 = __ldaxr(v36);
while ( __stlxr(v37 - 1, v36) );
}
else
{
v37 = *((_DWORD *)v49 - 2);
*((_DWORD *)v49 - 2) = v37 - 1;
}
if ( v37 <= 0 )
operator delete(v7);
}
v8 = (CCTextInputNode *)cocos2d::CCDictionary::objectForKey(a1->m_inputs, 2);
v10 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%.2f", v9, a1->m_hsv.s);
v11 = (char *)cocos2d::CCString::getCString(v10);
sub_D153B8((int)&v49, v11);
CCTextInputNode::setString(v8, &v49);
v12 = (unsigned __int8 *)(v49 - 24);
if ( v49 - 24 != (const unsigned __int8 *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v38 = (unsigned int *)(v49 - 8);
do
v39 = __ldaxr(v38);
while ( __stlxr(v39 - 1, v38) );
}
else
{
v39 = *((_DWORD *)v49 - 2);
*((_DWORD *)v49 - 2) = v39 - 1;
}
if ( v39 <= 0 )
operator delete(v12);
}
v13 = (CCTextInputNode *)cocos2d::CCDictionary::objectForKey(a1->m_inputs, 3);
v15 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%.2f", v14, a1->m_hsv.v);
v16 = (char *)cocos2d::CCString::getCString(v15);
sub_D153B8((int)&v49, v16);
CCTextInputNode::setString(v13, &v49);
v17 = (unsigned __int8 *)(v49 - 24);
if ( v49 - 24 != (const unsigned __int8 *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v34 = (unsigned int *)(v49 - 8);
do
v35 = __ldaxr(v34);
while ( __stlxr(v35 - 1, v34) );
}
else
{
v35 = *((_DWORD *)v49 - 2);
*((_DWORD *)v49 - 2) = v35 - 1;
}
if ( v35 <= 0 )
operator delete(v17);
}
a1->m_updating = 0;
}
else
{
sub_D153B8((int)&v47, "Hue: ");
h = a1->m_hsv.h;
if ( h > 0.0 )
{
sub_D15FD4(&v47, "+", 1);
h = a1->m_hsv.h;
}
v19 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%i",
(const char *)(unsigned int)(int)h);
v44 = cocos2d::CCString::getCString(v19);
v20 = strlen(v44);
sub_D15FD4(&v47, v44, v20);
a1->m_hueLabel->setString(a1->m_hueLabel, v47);
sub_D153B8((int)&v48, "Saturation: ");
if ( a1->m_hsv.absoluteSaturation )
{
s = a1->m_hsv.s;
if ( s > 0.0 )
{
sub_D15FD4(&v48, "+", 1);
s = a1->m_hsv.s;
}
}
else
{
sub_D15FD4(&v48, "x", 1);
s = a1->m_hsv.s;
}
v23 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%.02f", v21, s);
v45 = cocos2d::CCString::getCString(v23);
v24 = strlen(v45);
sub_D15FD4(&v48, v45, v24);
a1->m_saturationLabel->setString(a1->m_saturationLabel, v48);
sub_D153B8((int)&v49, "Brightness: ");
if ( a1->m_hsv.absoluteBrightness )
{
v = a1->m_hsv.v;
if ( v > 0.0 )
{
sub_D15FD4(&v49, "+", 1);
v = a1->m_hsv.v;
}
}
else
{
sub_D15FD4(&v49, "x", 1);
v = a1->m_hsv.v;
}
v27 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%.02f", v25, v);
v46 = cocos2d::CCString::getCString(v27);
v28 = strlen(v46);
sub_D15FD4(&v49, v46, v28);
a1->m_brightnessLabel->setString(a1->m_brightnessLabel, v49);
v29 = (unsigned __int8 *)(v49 - 24);
if ( v49 - 24 != (const unsigned __int8 *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v42 = (unsigned int *)(v49 - 8);
do
v43 = __ldaxr(v42);
while ( __stlxr(v43 - 1, v42) );
}
else
{
v43 = *((_DWORD *)v49 - 2);
*((_DWORD *)v49 - 2) = v43 - 1;
}
if ( v43 <= 0 )
operator delete(v29);
}
v30 = (unsigned __int8 *)(v48 - 24);
if ( v48 - 24 != (const unsigned __int8 *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v40 = (unsigned int *)(v48 - 8);
do
v41 = __ldaxr(v40);
while ( __stlxr(v41 - 1, v40) );
}
else
{
v41 = *((_DWORD *)v48 - 2);
*((_DWORD *)v48 - 2) = v41 - 1;
}
if ( v41 <= 0 )
operator delete(v30);
}
v31 = (unsigned __int8 *)(v47 - 24);
if ( v47 - 24 != (const unsigned __int8 *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v32 = (unsigned int *)(v47 - 8);
do
v33 = __ldaxr(v32);
while ( __stlxr(v33 - 1, v32) );
}
else
{
v33 = *((_DWORD *)v47 - 2);
*((_DWORD *)v47 - 2) = v33 - 1;
}
if ( v33 <= 0 )
operator delete(v31);
}
}
a1->m_mixed = 0;
}