//
// ConfigureHSVWidget::textChanged from 0x140097620 to 0x1400978da (698 bytes)
//
// 2 xrefs:
// > ??> @ 0x140541038
// > ??> @ 0x1406c72e4
//
// 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=1
void ConfigureHSVWidget::textChanged(ConfigureHSVWidget *a1, CCTextInputNode *a2)
{
int v4; // eax
int v5; // eax
const char *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
const char *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
const char *v20; // rax
size_t v21; // r8
const char *v22; // rcx
int v23; // edi
char *v24; // rcx
int v25; // eax
char *String[2]; // [rsp+28h] [rbp-38h] BYREF
__int128 v27; // [rsp+38h] [rbp-28h]
if ( !BYTE1(a1->m_fSkewY) )
{
v4 = ((__int64 (__fastcall *)(CCTextInputNode *))a2->getTag)(a2) - 1;
if ( v4 )
{
v5 = v4 - 1;
if ( v5 )
{
if ( v5 == 1 )
{
v6 = a2->m_textField->getString(&a2->m_textField->cocos2d::CCLabelProtocol);
*(_OWORD *)String = 0;
v27 = 0;
v7 = -1;
do
++v7;
while ( v6[v7] );
sub_14003A930(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 )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v12);
}
a1->m_fScaleX = v11;
}
}
else
{
v13 = a2->m_textField->getString(&a2->m_textField->cocos2d::CCLabelProtocol);
*(_OWORD *)String = 0;
v27 = 0;
v14 = -1;
do
++v14;
while ( v13[v14] );
sub_14003A930(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 )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v19);
}
a1->m_fRotationY = v18;
}
}
else
{
v20 = a2->m_textField->getString(&a2->m_textField->cocos2d::CCLabelProtocol);
*(_OWORD *)String = 0;
v27 = 0;
v21 = -1;
do
++v21;
while ( v20[v21] );
sub_14003A930(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 )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v24);
}
v25 = 360;
if ( v23 <= 360 )
{
v25 = v23;
if ( v23 < -360 )
v25 = -360;
}
a1->m_fRotationX = (float)v25;
}
ConfigureHSVWidget::updateSliders((ConfigureHSVWidget *)((char *)a1 - 320));
}
}