//
// GJFollowCommandLayer::textChanged from 0x140272130 to 0x140272631 (1281 bytes)
//
// 4 xrefs:
// > ??> @ 0x140568b80
// > ??> @ 0x140686c3c
// > ??> @ 0x140686c4c
// > ??> @ 0x1406d0e30
//
// 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 GJFollowCommandLayer::textChanged(GJFollowCommandLayer *a1, CCTextInputNode *a2)
{
int v4; // eax
int v5; // eax
int v6; // eax
int v7; // eax
const char *v8; // rax
size_t v9; // r8
const char *v10; // rcx
int v11; // edi
char *v12; // rcx
const char *v13; // rax
size_t v14; // r8
const char *v15; // rcx
float v16; // xmm6_4
char *v17; // rcx
cocos2d::CCString *v18; // rax
float v19; // xmm1_4
float v20; // xmm2_4
Slider *v21; // rcx
const char *v22; // rax
size_t v23; // r8
const char *v24; // rcx
int v25; // edi
char *v26; // rcx
const char *v27; // rax
size_t v28; // r8
const char *v29; // rcx
float v30; // xmm6_4
char *v31; // rcx
cocos2d::CCString *v32; // rax
float v33; // xmm2_4
const char *v34; // rax
size_t v35; // r8
const char *v36; // rcx
float v37; // xmm6_4
char *v38; // rcx
cocos2d::CCString *v39; // rax
float v40; // xmm2_4
char *String[2]; // [rsp+28h] [rbp-38h] BYREF
__int128 v42; // [rsp+38h] [rbp-28h]
if ( LOBYTE(a1->m_fSkewX) )
return;
v4 = a2->getTag(a2);
if ( !v4 )
{
v34 = a2->m_textField->getString(&a2->m_textField->cocos2d::CCLabelProtocol);
*(_OWORD *)String = 0;
v35 = -1;
v42 = 0;
do
++v35;
while ( v34[v35] );
sub_14003A930(String, v34, v35);
v36 = (const char *)String;
if ( *((_QWORD *)&v42 + 1) > 0xFu )
v36 = String[0];
v37 = atof(v36);
if ( *((_QWORD *)&v42 + 1) > 0xFu )
{
v38 = String[0];
if ( (unsigned __int64)(*((_QWORD *)&v42 + 1) + 1LL) >= 0x1000 )
{
v38 = *((char **)String[0] - 1);
if ( (unsigned __int64)(String[0] - v38 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v38);
}
v39 = cocos2d::CCString::createWithFormat("%.02f", v37);
*(float *)&a1->m_bTouchEnabled = cocos2d::CCString::floatValue(v39);
GJFollowCommandLayer::updateXMod((GJFollowCommandLayer *)((char *)a1 - 632));
v40 = fminf(1.0, (float)(*(float *)&a1->m_bTouchEnabled * 0.5) + 0.5);
v19 = 0.0;
if ( v40 >= 0.0 )
v19 = v40;
v21 = (Slider *)a1->SetupTriggerPopup::FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCKeyboardDelegate::__vftable;
goto LABEL_67;
}
v5 = v4 - 1;
if ( !v5 )
{
v27 = a2->m_textField->getString(&a2->m_textField->cocos2d::CCLabelProtocol);
*(_OWORD *)String = 0;
v28 = -1;
v42 = 0;
do
++v28;
while ( v27[v28] );
sub_14003A930(String, v27, v28);
v29 = (const char *)String;
if ( *((_QWORD *)&v42 + 1) > 0xFu )
v29 = String[0];
v30 = atof(v29);
if ( *((_QWORD *)&v42 + 1) > 0xFu )
{
v31 = String[0];
if ( (unsigned __int64)(*((_QWORD *)&v42 + 1) + 1LL) >= 0x1000 )
{
v31 = *((char **)String[0] - 1);
if ( (unsigned __int64)(String[0] - v31 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v31);
}
v32 = cocos2d::CCString::createWithFormat("%.02f", v30);
*(float *)&a1->m_bMouseEnabled = cocos2d::CCString::floatValue(v32);
GJFollowCommandLayer::updateYMod((GJFollowCommandLayer *)((char *)a1 - 632));
v33 = fminf(1.0, (float)(*(float *)&a1->m_bMouseEnabled * 0.5) + 0.5);
v19 = 0.0;
if ( v33 >= 0.0 )
v19 = v33;
v21 = (Slider *)a1->SetupTriggerPopup::FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCMouseDelegate::__vftable;
goto LABEL_67;
}
v6 = v5 - 1;
if ( v6 )
{
v7 = v6 - 1;
if ( v7 )
{
if ( v7 == 1 )
{
v8 = a2->m_textField->getString(&a2->m_textField->cocos2d::CCLabelProtocol);
*(_OWORD *)String = 0;
v9 = -1;
v42 = 0;
do
++v9;
while ( v8[v9] );
sub_14003A930(String, v8, v9);
v10 = (const char *)String;
if ( *((_QWORD *)&v42 + 1) > 0xFu )
v10 = String[0];
v11 = atoi(v10);
if ( *((_QWORD *)&v42 + 1) > 0xFu )
{
v12 = String[0];
if ( (unsigned __int64)(*((_QWORD *)&v42 + 1) + 1LL) >= 0x1000 )
{
v12 = *((char **)String[0] - 1);
if ( (unsigned __int64)(String[0] - v12 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v12);
}
if ( v11 < 0 )
v11 = 0;
a1->m_nTouchPriority = v11;
GJFollowCommandLayer::updateTargetGroupID2((GJFollowCommandLayer *)((char *)a1 - 632));
}
return;
}
v13 = a2->m_textField->getString(&a2->m_textField->cocos2d::CCLabelProtocol);
*(_OWORD *)String = 0;
v14 = -1;
v42 = 0;
do
++v14;
while ( v13[v14] );
sub_14003A930(String, v13, v14);
v15 = (const char *)String;
if ( *((_QWORD *)&v42 + 1) > 0xFu )
v15 = String[0];
v16 = atof(v15);
if ( *((_QWORD *)&v42 + 1) > 0xFu )
{
v17 = String[0];
if ( (unsigned __int64)(*((_QWORD *)&v42 + 1) + 1LL) >= 0x1000 )
{
v17 = *((char **)String[0] - 1);
if ( (unsigned __int64)(String[0] - v17 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v17);
}
v18 = cocos2d::CCString::createWithFormat("%.02f", v16);
*(float *)&a1->SetupTriggerPopup::FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCTouchDelegate::__vftable = cocos2d::CCString::floatValue(v18);
GJFollowCommandLayer::updateDuration(&a1[-1].m_uPreviousPriority);
v19 = 0.0;
v20 = fminf(
1.0,
*(float *)&a1->SetupTriggerPopup::FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCTouchDelegate::__vftable
/ 10.0);
if ( v20 >= 0.0 )
v19 = v20;
v21 = *(Slider **)&a1->m_bUseChildIndex;
LABEL_67:
Slider::setValue(v21, v19);
return;
}
v22 = a2->m_textField->getString(&a2->m_textField->cocos2d::CCLabelProtocol);
*(_OWORD *)String = 0;
v23 = -1;
v42 = 0;
do
++v23;
while ( v22[v23] );
sub_14003A930(String, v22, v23);
v24 = (const char *)String;
if ( *((_QWORD *)&v42 + 1) > 0xFu )
v24 = String[0];
v25 = atoi(v24);
if ( *((_QWORD *)&v42 + 1) > 0xFu )
{
v26 = String[0];
if ( (unsigned __int64)(*((_QWORD *)&v42 + 1) + 1LL) >= 0x1000 )
{
v26 = *((char **)String[0] - 1);
if ( (unsigned __int64)(String[0] - v26 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v26);
}
if ( v25 < 1 )
v25 = 1;
LODWORD(a1->m_pScriptKeypadHandlerEntry) = v25;
GJFollowCommandLayer::updateTargetGroupID((GJFollowCommandLayer *)((char *)a1 - 632));
SetupTriggerPopup::updateEditorLabel((GJFollowCommandLayer *)((char *)a1 - 632));
}