//
// GJRotateCommandLayer::textChanged from 0x928834 to 0x928c28 (1012 bytes)
//
// 3 xrefs:
// > `non-virtual thunk to'GJRotateCommandLayer::textChanged @ 0x928c30
// > ??> @ 0xbc358
// > ??> @ 0x11ae8a8
//
// 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 GJRotateCommandLayer::textChanged(GJRotateCommandLayer *a1, CCTextInputNode *a2)
{
float v3; // s0
char *v4; // x0
const char *v5; // x1
cocos2d::CCString *v6; // x0
Slider *m_degreesSlider; // x0
float v8; // s1
float v9; // s0
bool v10; // nf
char *v11; // x22
int v12; // w21
char *v13; // x0
char *v14; // x21
char *v15; // x0
float v16; // s0
float v17; // s0
char *v18; // x2
char *v19; // x0
char *v20; // x22
int v21; // w21
char *v22; // x0
unsigned int *v23; // x2
unsigned int *v24; // x22
int v25; // w1
unsigned int *v26; // x2
int v27; // w1
unsigned int *v28; // x21
int v29; // w1
unsigned int *v30; // x22
int v31; // w1
float v33; // [xsp+30h] [xbp+30h]
char *v34; // [xsp+50h] [xbp+50h] BYREF
if ( !a1->m_disableTextChanged )
{
switch ( a2->getTag(a2) )
{
case 0:
CCTextInputNode::getString(a2, (__int64)&v34);
v16 = atof(v34);
v17 = truncatedFloat2(v16);
v18 = v34;
a1->m_degrees = v17;
v19 = v18 - 24;
if ( v18 - 24 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v26 = (unsigned int *)(v18 - 8);
do
v27 = __ldaxr(v26);
while ( __stlxr(v27 - 1, v26) );
}
else
{
v27 = *((_DWORD *)v18 - 2);
*((_DWORD *)v18 - 2) = v27 - 1;
}
if ( v27 <= 0 )
operator delete(v19);
}
GJRotateCommandLayer::updateCommandDegrees(a1);
m_degreesSlider = a1->m_degreesSlider;
v8 = 1.0;
v9 = (float)(a1->m_degrees / 720.0) + 0.5;
v10 = v9 < 1.0;
if ( v9 >= 1.0 )
goto LABEL_5;
goto LABEL_14;
case 1:
CCTextInputNode::getString(a2, (__int64)&v34);
v14 = v34;
a1->m_times360 = atoi(v34);
v15 = v14 - 24;
if ( v14 - 24 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v28 = (unsigned int *)(v14 - 8);
do
v29 = __ldaxr(v28);
while ( __stlxr(v29 - 1, v28) );
}
else
{
v29 = *((_DWORD *)v14 - 2);
*((_DWORD *)v14 - 2) = v29 - 1;
}
if ( v29 <= 0 )
operator delete(v15);
}
GJRotateCommandLayer::updateCommandTimes(a1);
m_degreesSlider = a1->m_timesSlider;
v8 = 1.0;
v9 = (float)((float)a1->m_times360 / 20.0) + 0.5;
v10 = v9 < 1.0;
if ( v9 < 1.0 )
goto LABEL_14;
goto LABEL_5;
case 2:
CCTextInputNode::getString(a2, (__int64)&v34);
v11 = v34;
v12 = atoi(v34);
v13 = v11 - 24;
if ( v11 - 24 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v30 = (unsigned int *)(v11 - 8);
do
v31 = __ldaxr(v30);
while ( __stlxr(v31 - 1, v30) );
}
else
{
v31 = *((_DWORD *)v11 - 2);
*((_DWORD *)v11 - 2) = v31 - 1;
}
if ( v31 <= 0 )
operator delete(v13);
}
if ( v12 <= 0 )
v12 = 1;
a1->m_targetGroupID = v12;
GJRotateCommandLayer::updateTargetGroupID(a1);
SetupTriggerPopup::updateEditorLabel(a1);
return;
case 3:
CCTextInputNode::getString(a2, (__int64)&v34);
v3 = atof(v34);
v4 = v34 - 24;
v5 = (const char *)&qword_124B6B0;
if ( v34 - 24 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v23 = (unsigned int *)(v34 - 8);
do
v5 = (const char *)__ldaxr(v23);
while ( __stlxr((_DWORD)v5 - 1, v23) );
}
else
{
v5 = (const char *)*((unsigned int *)v34 - 2);
*((_DWORD *)v34 - 2) = (_DWORD)v5 - 1;
}
if ( (int)v5 <= 0 )
{
v33 = v3;
operator delete(v4);
v3 = v33;
}
}
v6 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%.02f", v5, v3);
a1->m_moveTime = cocos2d::CCString::floatValue(v6);
GJRotateCommandLayer::updateDuration(a1);
m_degreesSlider = a1->m_moveTimeSlider;
v8 = 1.0;
v9 = a1->m_moveTime / 10.0;
v10 = v9 < 1.0;
if ( v9 >= 1.0 )
{
LABEL_5:
if ( !v10 )
v9 = v8;
goto LABEL_7;
}
LABEL_14:
if ( v9 > 0.0 )
{
LABEL_7:
Slider::setValue(m_degreesSlider, v9);
return;
}
Slider::setValue(m_degreesSlider, 0.0);
break;
case 4:
CCTextInputNode::getString(a2, (__int64)&v34);
v20 = v34;
v21 = atoi(v34);
v22 = v20 - 24;
if ( v20 - 24 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v24 = (unsigned int *)(v20 - 8);
do
v25 = __ldaxr(v24);
while ( __stlxr(v25 - 1, v24) );
}
else
{
v25 = *((_DWORD *)v20 - 2);
*((_DWORD *)v20 - 2) = v25 - 1;
}
if ( v25 <= 0 )
operator delete(v22);
}
if ( v21 < 0 )
v21 = 0;
a1->m_centerGroupID = v21;
GJRotateCommandLayer::updateTargetGroupID2(a1);
return;
default:
return;
}
}
}