//
// SetupGravityModPopup::textChanged from 0x1003d9510 to 0x1003d95e1 (209 bytes)
//
// 2 xrefs:
// > sub_1003D95F0 @ 0x1003d95fc
// > ??> @ 0x100930968
//
// 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 __fastcall SetupGravityModPopup::textChanged(SetupGravityModPopup *a1, CCTextInputNode *a2)
{
double v2; // xmm0_8
int m_itemID; // eax
char *v5; // r14
int v6; // ecx
int v7; // eax
EffectGameObject *m_gameObject; // rcx
cocos2d::CCArray *m_gameObjects; // rdi
unsigned int v10; // r14d
_QWORD v11[2]; // [rsp-30h] [rbp-30h] BYREF
char *v12; // [rsp-20h] [rbp-20h]
if ( !a1->m_disableDelegate )
{
CCTextInputNode::getString(v11, (__int64)a2, v2);
if ( (v11[0] & 1) != 0 )
{
v5 = v12;
a1->m_itemID = atoi(v12);
operator delete(v5);
m_itemID = a1->m_itemID;
}
else
{
m_itemID = atoi((const char *)v11 + 1);
}
v6 = 0;
if ( m_itemID > 0 )
v6 = m_itemID;
v7 = 999;
if ( v6 < 999 )
v7 = v6;
a1->m_itemID = v7;
m_gameObject = a1->m_gameObject;
if ( m_gameObject )
{
m_gameObject->m_itemID = v7;
}
else
{
m_gameObjects = a1->m_gameObjects;
if ( m_gameObjects && (unsigned int)sub_100720070(m_gameObjects) )
{
v10 = 0;
do
*(_DWORD *)(sub_1007200C0(a1->m_gameObjects, v10++) + 1680) = a1->m_itemID;
while ( v10 < (unsigned int)sub_100720070(a1->m_gameObjects) );
}
}
}
}