//
// ConfigureHSVWidget::updateLabels from 0x140097c50 to 0x140098156 (1286 bytes)
//
// 6 xrefs:
// > ConfigureHSVWidget::init @ 0x1400972fd
// > ConfigureHSVWidget::sliderChanged @ 0x140097a98
// > ConfigureHSVWidget::onToggleSConst @ 0x140097b1e
// > ConfigureHSVWidget::onToggleVConst @ 0x140097b9e
// > ConfigureHSVWidget::onResetHSV @ 0x140097c26
// > ??> @ 0x1406c732c
//
// 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
//
// Hidden C++ exception states: #wind=3
void ConfigureHSVWidget::updateLabels(ConfigureHSVWidget *a1)
{
struct cocos2d::CCObject *v2; // r14
cocos2d::CCString *v3; // rax
const char *CString; // rax
size_t v5; // rbx
size_t v6; // r8
struct cocos2d::CCObject *v7; // r14
cocos2d::CCString *v8; // rax
const char *v9; // rax
size_t v10; // r8
struct cocos2d::CCObject *v11; // r14
cocos2d::CCString *v12; // rax
const char *v13; // rax
cocos2d::CCString *v14; // rax
char *v15; // rax
size_t v16; // rbx
size_t v17; // r8
void **v18; // rdx
char *v19; // rdx
cocos2d::CCString *v20; // rax
char *v21; // rax
size_t v22; // r8
void **v23; // rdx
char *v24; // rdx
cocos2d::CCString *v25; // rax
char *v26; // rax
void **v27; // rdx
void *v28; // rcx
void *v29; // rcx
void *v30; // rcx
void *Src[2]; // [rsp+30h] [rbp-31h] BYREF
__int64 v32; // [rsp+40h] [rbp-21h]
unsigned __int64 v33; // [rsp+48h] [rbp-19h]
void *Block[2]; // [rsp+50h] [rbp-11h] BYREF
__int64 v35; // [rsp+60h] [rbp-1h]
unsigned __int64 v36; // [rsp+68h] [rbp+7h]
void *v37[2]; // [rsp+70h] [rbp+Fh] BYREF
__int64 v38; // [rsp+80h] [rbp+1Fh]
unsigned __int64 v39; // [rsp+88h] [rbp+27h]
if ( a1->m_addInputs )
{
a1->m_updating = 1;
v2 = cocos2d::CCDictionary::objectForKey(a1->m_inputs, 1);
v3 = cocos2d::CCString::createWithFormat("%.0f", a1->m_hsv.h);
CString = cocos2d::CCString::getCString(v3);
*(_OWORD *)Src = 0;
v32 = 0;
v33 = 0;
v5 = -1;
v6 = -1;
do
++v6;
while ( CString[v6] );
sub_14003A930(Src, CString, v6);
CCTextInputNode::setString((__int64)v2, Src);
v7 = cocos2d::CCDictionary::objectForKey(a1->m_inputs, 2);
v8 = cocos2d::CCString::createWithFormat("%.2f", a1->m_hsv.s);
v9 = cocos2d::CCString::getCString(v8);
*(_OWORD *)Src = 0;
v32 = 0;
v33 = 0;
v10 = -1;
do
++v10;
while ( v9[v10] );
sub_14003A930(Src, v9, v10);
CCTextInputNode::setString((__int64)v7, Src);
v11 = cocos2d::CCDictionary::objectForKey(a1->m_inputs, 3);
v12 = cocos2d::CCString::createWithFormat("%.2f", a1->m_hsv.v);
v13 = cocos2d::CCString::getCString(v12);
*(_OWORD *)Src = 0;
v32 = 0;
v33 = 0;
do
++v5;
while ( v13[v5] );
sub_14003A930(Src, v13, v5);
CCTextInputNode::setString((__int64)v11, Src);
a1->m_updating = 0;
goto LABEL_48;
}
*(_OWORD *)Src = 0;
v32 = 5;
v33 = 15;
strcpy((char *)Src, "Hue: ");
if ( a1->m_hsv.h > 0.0 )
sub_140041270(Src, &unk_140540CB0, 1u);
v14 = cocos2d::CCString::createWithFormat("%i", (int)a1->m_hsv.h);
v15 = (char *)cocos2d::CCString::getCString(v14);
v16 = -1;
v17 = -1;
do
++v17;
while ( v15[v17] );
sub_140041270(Src, v15, v17);
v18 = Src;
if ( v33 > 0xF )
v18 = (void **)Src[0];
a1->m_hueLabel->setString(&a1->m_hueLabel->cocos2d::CCLabelProtocol, (const char *)v18);
v38 = 12;
v39 = 15;
strcpy((char *)v37, "Saturation: ");
BYTE5(v37[1]) = 0;
HIWORD(v37[1]) = 0;
if ( !a1->m_hsv.absoluteSaturation )
{
v19 = "x";
goto LABEL_19;
}
if ( a1->m_hsv.s > 0.0 )
{
v19 = (char *)&unk_140540CB0;
LABEL_19:
sub_140041270(v37, v19, 1u);
}
v20 = cocos2d::CCString::createWithFormat("%.02f", a1->m_hsv.s);
v21 = (char *)cocos2d::CCString::getCString(v20);
v22 = -1;
do
++v22;
while ( v21[v22] );
sub_140041270(v37, v21, v22);
v23 = v37;
if ( v39 > 0xF )
v23 = (void **)v37[0];
a1->m_saturationLabel->setString(&a1->m_saturationLabel->cocos2d::CCLabelProtocol, (const char *)v23);
v35 = 12;
v36 = 15;
strcpy((char *)Block, "Brightness: ");
BYTE5(Block[1]) = 0;
HIWORD(Block[1]) = 0;
if ( a1->m_hsv.absoluteBrightness )
{
if ( a1->m_hsv.v <= 0.0 )
goto LABEL_29;
v24 = (char *)&unk_140540CB0;
}
else
{
v24 = "x";
}
sub_140041270(Block, v24, 1u);
LABEL_29:
v25 = cocos2d::CCString::createWithFormat("%.02f", a1->m_hsv.v);
v26 = (char *)cocos2d::CCString::getCString(v25);
do
++v16;
while ( v26[v16] );
sub_140041270(Block, v26, v16);
v27 = Block;
if ( v36 > 0xF )
v27 = (void **)Block[0];
a1->m_brightnessLabel->setString(&a1->m_brightnessLabel->cocos2d::CCLabelProtocol, (const char *)v27);
if ( v36 > 0xF )
{
v28 = Block[0];
if ( v36 + 1 >= 0x1000 )
{
v28 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v28 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v28);
}
v35 = 0;
v36 = 15;
LOBYTE(Block[0]) = 0;
if ( v39 > 0xF )
{
v29 = v37[0];
if ( v39 + 1 >= 0x1000 )
{
v29 = *((void **)v37[0] - 1);
if ( (unsigned __int64)((char *)v37[0] - (char *)v29 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v29);
}
v38 = 0;
v39 = 15;
LOBYTE(v37[0]) = 0;
if ( v33 > 0xF )
{
v30 = Src[0];
if ( v33 + 1 >= 0x1000 )
{
v30 = *((void **)Src[0] - 1);
if ( (unsigned __int64)((char *)Src[0] - (char *)v30 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v30);
}
LABEL_48:
a1->m_mixed = 0;
}