//
// SetupCameraRotatePopup::textChanged from 0x9ad9f8 to 0x9adc04 (524 bytes)
//
// 3 xrefs:
// > `non-virtual thunk to'SetupCameraRotatePopup::textChanged @ 0x9adc0c
// > ??> @ 0xc1e90
// > ??> @ 0x11c6d58
//
// 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 SetupCameraRotatePopup::textChanged(SetupCameraRotatePopup *a1, CCTextInputNode *a2)
{
int v3; // w0
float v4; // s0
char *v5; // x0
const char *v6; // x1
cocos2d::CCString *v7; // x0
Slider *m_moveTimeSlider; // x0
float v9; // s1
float v10; // s0
bool v11; // nf
float v12; // s0
char *v13; // x0
const char *v14; // x1
cocos2d::CCString *v15; // x0
unsigned int *v16; // x2
unsigned int *v17; // x2
float v19; // [xsp+20h] [xbp+20h]
float v20; // [xsp+20h] [xbp+20h]
char *v21; // [xsp+40h] [xbp+40h] BYREF
if ( !a1->m_disableTextDelegate )
{
v3 = a2->getTag(a2);
if ( v3 )
{
if ( v3 != 2 )
return;
CCTextInputNode::getString(a2, (__int64)&v21);
v4 = atof(v21);
v5 = v21 - 24;
v6 = (const char *)&qword_124B6B0;
if ( v21 - 24 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v16 = (unsigned int *)(v21 - 8);
do
v6 = (const char *)__ldaxr(v16);
while ( __stlxr((_DWORD)v6 - 1, v16) );
}
else
{
v6 = (const char *)*((unsigned int *)v21 - 2);
*((_DWORD *)v21 - 2) = (_DWORD)v6 - 1;
}
if ( (int)v6 <= 0 )
{
v19 = v4;
operator delete(v5);
v4 = v19;
}
}
v7 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%.02f", v6, v4);
a1->m_moveTime = cocos2d::CCString::floatValue(v7);
SetupCameraRotatePopup::updateDuration(a1);
m_moveTimeSlider = a1->m_moveTimeSlider;
v9 = 1.0;
v10 = a1->m_moveTime / 10.0;
v11 = v10 < 1.0;
if ( v10 >= 1.0 )
goto LABEL_7;
}
else
{
CCTextInputNode::getString(a2, (__int64)&v21);
v12 = atof(v21);
v13 = v21 - 24;
v14 = (const char *)&qword_124B6B0;
if ( v21 - 24 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v17 = (unsigned int *)(v21 - 8);
do
v14 = (const char *)__ldaxr(v17);
while ( __stlxr((_DWORD)v14 - 1, v17) );
}
else
{
v14 = (const char *)*((unsigned int *)v21 - 2);
*((_DWORD *)v21 - 2) = (_DWORD)v14 - 1;
}
if ( (int)v14 <= 0 )
{
v20 = v12;
operator delete(v13);
v12 = v20;
}
}
v15 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%.02f", v14, v12);
a1->m_degrees = cocos2d::CCString::floatValue(v15);
SetupCameraRotatePopup::updateCommandDegrees(a1);
m_moveTimeSlider = a1->m_degreesSlider;
v9 = 1.0;
v10 = (float)(a1->m_degrees / 720.0) + 0.5;
v11 = v10 < 1.0;
if ( v10 >= 1.0 )
{
LABEL_7:
if ( !v11 )
v10 = v9;
goto LABEL_9;
}
}
if ( v10 <= 0.0 )
{
Slider::setValue(m_moveTimeSlider, 0.0);
return;
}
LABEL_9:
Slider::setValue(m_moveTimeSlider, v10);
}
}