//
// ConfigureHSVWidget::textChanged from 0x1401307e0 to 0x140130ade (766 bytes)
//
// 2 xrefs:
// > ??> @ 0x1407354a8
// > ??> @ 0x140916e50
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:27:03 +0000
//
// Hidden C++ exception states: #wind=1
void __fastcall ConfigureHSVWidget::textChanged(__int64 a1, _QWORD *a2)
{
int v4; // eax
int v5; // eax
_BYTE *v6; // rax
size_t v7; // r8
const char *v8; // rcx
double v9; // xmm0_8
cocos2d::CCString *v10; // rax
float v11; // xmm0_4
char *v12; // rcx
_BYTE *v13; // rax
size_t v14; // r8
const char *v15; // rcx
double v16; // xmm0_8
cocos2d::CCString *v17; // rax
float v18; // xmm0_4
char *v19; // rcx
_BYTE *v20; // rax
size_t v21; // r8
const char *v22; // rcx
int v23; // ebx
char *v24; // r8
int v25; // eax
char *String[2]; // [rsp+38h] [rbp-38h] BYREF
__int128 v27; // [rsp+48h] [rbp-28h]
if ( !*(_BYTE *)(a1 + 89) )
{
v4 = (*(__int64 (__fastcall **)(_QWORD *))(*a2 + 56LL))(a2) - 1;
if ( v4 )
{
v5 = v4 - 1;
if ( v5 )
{
if ( v5 == 1 )
{
v6 = (_BYTE *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)(a2[74] + 600LL) + 8LL))(a2[74] + 600LL);
*(_OWORD *)String = 0;
v27 = 0;
v7 = -1;
do
++v7;
while ( v6[v7] );
sub_14003D230(String, v6, v7);
v8 = (const char *)String;
if ( *((_QWORD *)&v27 + 1) > 0xFu )
v8 = String[0];
v9 = atof(v8);
v10 = cocos2d::CCString::createWithFormat("%.2f", v9);
v11 = cocos2d::CCString::floatValue(v10);
if ( *((_QWORD *)&v27 + 1) > 0xFu )
{
v12 = String[0];
if ( (unsigned __int64)(*((_QWORD *)&v27 + 1) + 1LL) >= 0x1000 )
{
v12 = *((char **)String[0] - 1);
if ( (unsigned __int64)(String[0] - v12 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v12);
}
*(float *)(a1 + 64) = v11;
}
}
else
{
v13 = (_BYTE *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)(a2[74] + 600LL) + 8LL))(a2[74] + 600LL);
*(_OWORD *)String = 0;
v27 = 0;
v14 = -1;
do
++v14;
while ( v13[v14] );
sub_14003D230(String, v13, v14);
v15 = (const char *)String;
if ( *((_QWORD *)&v27 + 1) > 0xFu )
v15 = String[0];
v16 = atof(v15);
v17 = cocos2d::CCString::createWithFormat("%.2f", v16);
v18 = cocos2d::CCString::floatValue(v17);
if ( *((_QWORD *)&v27 + 1) > 0xFu )
{
v19 = String[0];
if ( (unsigned __int64)(*((_QWORD *)&v27 + 1) + 1LL) >= 0x1000 )
{
v19 = *((char **)String[0] - 1);
if ( (unsigned __int64)(String[0] - v19 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v19);
}
*(float *)(a1 + 60) = v18;
}
}
else
{
v20 = (_BYTE *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)(a2[74] + 600LL) + 8LL))(a2[74] + 600LL);
*(_OWORD *)String = 0;
v27 = 0;
v21 = -1;
do
++v21;
while ( v20[v21] );
sub_14003D230(String, v20, v21);
v22 = (const char *)String;
if ( *((_QWORD *)&v27 + 1) > 0xFu )
v22 = String[0];
v23 = atoi(v22);
if ( *((_QWORD *)&v27 + 1) > 0xFu )
{
v24 = String[0];
if ( (unsigned __int64)(*((_QWORD *)&v27 + 1) + 1LL) >= 0x1000 )
{
v24 = *((char **)String[0] - 1);
if ( (unsigned __int64)(String[0] - v24 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v24);
}
v25 = 360;
if ( v23 <= 360 )
{
v25 = v23;
if ( v23 < -360 )
v25 = -360;
}
*(float *)(a1 + 56) = (float)v25;
}
ConfigureHSVWidget::updateSliders(a1 - 320);
}
}