//
// SetupPulsePopup::textChanged from 0x8ed9b0 to 0x8edfb4 (1540 bytes)
//
// 3 xrefs:
// > `non-virtual thunk to'SetupPulsePopup::textChanged @ 0x8edfb8
// > ??> @ 0x34080
// > ??> @ 0x11a4848
//
// 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 SetupPulsePopup::textChanged(SetupPulsePopup *a1, CCTextInputNode *a2)
{
char *v4; // x21
size_t v5; // x24
char *v6; // x0
unsigned __int64 v7; // x0
char *v8; // x23
int v9; // w22
char *v10; // x0
int v11; // w0
float m_fadeOutTime; // s0
char *v13; // x2
char *v14; // x0
float v15; // s0
Slider *m_fadeInSlider; // x0
float v17; // s0
float m_fadeInTime; // s0
char *v19; // x2
char *v20; // x0
char *v21; // x21
int m_copyColorID; // w0
char *v23; // x2
int v24; // w1
char *v25; // x21
int m_targetGroupID; // w0
char *v27; // x2
int v28; // w1
int v29; // w2
float m_holdTime; // s0
char *v31; // x2
char *v32; // x0
unsigned int *v33; // x23
int v34; // w1
unsigned int *v35; // x21
int v36; // w0
unsigned int *v37; // x2
int v38; // w1
unsigned int *v39; // x21
int v40; // w1
unsigned int *v41; // x2
int v42; // w1
unsigned int *v43; // x21
int v44; // w0
unsigned int *v45; // x2
int v46; // w1
char *v47; // [xsp+50h] [xbp+50h] BYREF
if ( !a1->m_disableTextDelegate )
{
switch ( a2->getTag(a2) )
{
case 4:
CCTextInputNode::getString(a2, (__int64)&v47);
v25 = v47;
m_targetGroupID = atoi(v47);
a1->m_targetGroupID = m_targetGroupID;
v27 = v25 - 24;
if ( v25 - 24 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v35 = (unsigned int *)(v25 - 8);
do
v36 = __ldaxr(v35);
while ( __stlxr(v36 - 1, v35) );
}
else
{
v36 = *((_DWORD *)v25 - 2);
*((_DWORD *)v25 - 2) = v36 - 1;
}
if ( v36 <= 0 )
operator delete(v27);
m_targetGroupID = a1->m_targetGroupID;
}
if ( m_targetGroupID <= 0 )
v28 = 1;
else
v28 = m_targetGroupID;
if ( a1->m_pulseTargetType == 1 )
v29 = 9999;
else
v29 = 999;
if ( v29 > v28 )
v29 = v28;
a1->m_targetGroupID = v29;
SetupPulsePopup::updateTargetID(a1);
SetupTriggerPopup::updateEditorLabel(a1);
return;
case 5:
CCTextInputNode::getString(a2, (__int64)&v47);
v21 = v47;
m_copyColorID = atoi(v47);
a1->m_copyColorID = m_copyColorID;
v23 = v21 - 24;
if ( v21 - 24 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v43 = (unsigned int *)(v21 - 8);
do
v44 = __ldaxr(v43);
while ( __stlxr(v44 - 1, v43) );
}
else
{
v44 = *((_DWORD *)v21 - 2);
*((_DWORD *)v21 - 2) = v44 - 1;
}
if ( v44 <= 0 )
operator delete(v23);
m_copyColorID = a1->m_copyColorID;
}
if ( m_copyColorID < 0 )
v24 = 0;
else
v24 = m_copyColorID;
if ( v24 > 999 )
v24 = 999;
a1->m_copyColorID = v24;
SetupPulsePopup::updateCopyColor(a1);
return;
case 8:
CCTextInputNode::getString(a2, (__int64)&v47);
m_fadeInTime = atof(v47);
v19 = v47;
v20 = v47 - 24;
a1->m_fadeInTime = m_fadeInTime;
if ( v20 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v41 = (unsigned int *)(v19 - 8);
do
v42 = __ldaxr(v41);
while ( __stlxr(v42 - 1, v41) );
}
else
{
v42 = *((_DWORD *)v19 - 2);
*((_DWORD *)v19 - 2) = v42 - 1;
}
if ( v42 <= 0 )
operator delete(v20);
m_fadeInTime = a1->m_fadeInTime;
}
if ( m_fadeInTime <= 0.0 )
m_fadeInTime = 0.0;
a1->m_fadeInTime = m_fadeInTime;
SetupPulsePopup::updateFadeInTime(a1);
m_fadeInSlider = a1->m_fadeInSlider;
v15 = a1->m_fadeInTime;
goto LABEL_22;
case 9:
CCTextInputNode::getString(a2, (__int64)&v47);
m_holdTime = atof(v47);
v31 = v47;
v32 = v47 - 24;
a1->m_holdTime = m_holdTime;
if ( v32 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v45 = (unsigned int *)(v31 - 8);
do
v46 = __ldaxr(v45);
while ( __stlxr(v46 - 1, v45) );
}
else
{
v46 = *((_DWORD *)v31 - 2);
*((_DWORD *)v31 - 2) = v46 - 1;
}
if ( v46 <= 0 )
operator delete(v32);
m_holdTime = a1->m_holdTime;
}
if ( m_holdTime <= 0.0 )
m_holdTime = 0.0;
a1->m_holdTime = m_holdTime;
SetupPulsePopup::updateHoldTime(a1);
m_fadeInSlider = a1->m_holdSlider;
v15 = a1->m_holdTime;
goto LABEL_22;
case 0xA:
CCTextInputNode::getString(a2, (__int64)&v47);
m_fadeOutTime = atof(v47);
v13 = v47;
v14 = v47 - 24;
a1->m_fadeOutTime = m_fadeOutTime;
if ( v14 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v37 = (unsigned int *)(v13 - 8);
do
v38 = __ldaxr(v37);
while ( __stlxr(v38 - 1, v37) );
}
else
{
v38 = *((_DWORD *)v13 - 2);
*((_DWORD *)v13 - 2) = v38 - 1;
}
if ( v38 <= 0 )
operator delete(v14);
m_fadeOutTime = a1->m_fadeOutTime;
}
if ( m_fadeOutTime <= 0.0 )
m_fadeOutTime = 0.0;
a1->m_fadeOutTime = m_fadeOutTime;
SetupPulsePopup::updateFadeOutTime(a1);
v15 = a1->m_fadeOutTime;
m_fadeInSlider = a1->m_fadeOutSlider;
LABEL_22:
v17 = v15 / 10.0;
if ( v17 < 1.0 )
{
if ( v17 <= 0.0 )
{
Slider::setValue(m_fadeInSlider, 0.0);
return;
}
}
else
{
v17 = 1.0;
}
Slider::setValue(m_fadeInSlider, v17);
return;
case 0xB:
case 0xC:
case 0xD:
CCTextInputNode::getString(a2, (__int64)&v47);
v8 = v47;
v9 = atoi(v47);
v10 = v8 - 24;
if ( v8 - 24 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v33 = (unsigned int *)(v8 - 8);
do
v34 = __ldaxr(v33);
while ( __stlxr(v34 - 1, v33) );
}
else
{
v34 = *((_DWORD *)v8 - 2);
*((_DWORD *)v8 - 2) = v34 - 1;
}
if ( v34 <= 0 )
operator delete(v10);
}
if ( v9 < 0 )
v9 = 0;
if ( v9 > 255 )
LOBYTE(v9) = -1;
v11 = a2->getTag(a2);
switch ( v11 )
{
case 12:
a1->m_currentColor.g = v9;
break;
case 13:
a1->m_currentColor.b = v9;
break;
case 11:
a1->m_currentColor.r = v9;
break;
}
goto LABEL_8;
case 0xE:
CCTextInputNode::getString(a1->m_hexInput, (__int64)&v47);
v4 = v47;
v5 = strlen(v47);
v6 = v4 - 24;
if ( v4 - 24 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v39 = (unsigned int *)(v4 - 8);
do
v40 = __ldaxr(v39);
while ( __stlxr(v40 - 1, v39) );
}
else
{
v40 = *((_DWORD *)v4 - 2);
*((_DWORD *)v4 - 2) = v40 - 1;
}
if ( v40 <= 0 )
operator delete(v6);
}
if ( v5 != 6 )
return;
CCTextInputNode::getString(a1->m_hexInput, (__int64)&v47);
v7 = ColorSelectPopup::hexToColor((const char **)&v47);
*(_WORD *)&a1->m_currentColor.r = v7;
a1->m_currentColor.b = BYTE2(v7);
if ( v47 - 24 != (char *)&qword_124B6B0 )
sub_8EC3D4(v47 - 24);
LABEL_8:
SetupPulsePopup::selectColor(a1, (cocos2d::ccColor3B)*(_QWORD *)&a1->m_currentColor.r);
return;
default:
return;
}
}
}