//
// EditLevelLayer::textChanged from 0x4a0778 to 0x4a0874 (252 bytes)
//
// 1 xrefs:
// > `non-virtual thunk to'EditLevelLayer::textChanged @ 0x4a087c
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:49:49 +0000
//
int __fastcall EditLevelLayer::textChanged(EditLevelLayer *this, CCTextInputNode *a2)
{
char *v3; // r5
int result; // r0
CCTextInputNode *String; // r0
int v6; // r0
int v7; // r2
int v8; // r3
char *v9; // r1
int v10; // r8
size_t v11; // r0
unsigned __int8 v12; // [sp+4h] [bp-1Ch] BYREF
_BYTE v13[7]; // [sp+5h] [bp-1Bh] BYREF
char *v14; // [sp+Ch] [bp-14h]
int v15[3]; // [sp+10h] [bp-10h] BYREF
v3 = (char *)a2;
result = (*(int (__fastcall **)(CCTextInputNode *))(*(_DWORD *)a2 + 32))(a2);
if ( result == 1 )
{
v10 = *((_DWORD *)this + 87);
CCTextInputNode::getString((CCTextInputNode *)&v12, (int)v3);
if ( (v12 & 1) == 0 )
v3 = v13;
v15[0] = 0;
if ( (v12 & 1) != 0 )
v3 = v14;
v15[1] = 0;
v15[2] = 0;
v11 = strlen(v3);
std::string::__init(v15, v3, v11);
std::string::operator=((unsigned __int8 *)(v10 + 280), (unsigned __int8 *)v15);
std::string::~string((int)v15);
}
else
{
if ( result != 2 )
return result;
String = CCTextInputNode::getString((CCTextInputNode *)&v12, (int)v3);
v6 = EmoteSprite::maxEmotesComment(String);
if ( EmoteSprite::effectiveLength(&v12, v6, v7, v8) <= 180 )
{
std::string::operator=((unsigned __int8 *)this + 396, &v12);
if ( (v12 & 1) != 0 )
v9 = v14;
else
v9 = v13;
EditLevelLayer::updateDescText(this, v9);
}
else
{
std::string::basic_string(v15, (int)this + 396);
CCTextInputNode::setString((int)v3, (int)v15);
std::string::~string((int)v15);
}
}
return std::string::~string((int)&v12);
}