//
// CustomizeObjectLayer::textChanged from 0x57f2a0 to 0x57f39e (254 bytes)
//
// 1 xrefs:
// > `non-virtual thunk to'CustomizeObjectLayer::textChanged @ 0x57f3ac
//
// 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:52:51 +0000
//
int __fastcall CustomizeObjectLayer::textChanged(int this, CCTextInputNode *a2)
{
int v2; // r4
char *v3; // r5
char *v4; // r0
cocos2d::CCString *v5; // r0
char *CString; // r0
_BYTE *v7; // r8
size_t v8; // r0
char v9; // [sp+4h] [bp-1Ch] BYREF
char v10; // [sp+5h] [bp-1Bh] BYREF
char *v11; // [sp+Ch] [bp-14h]
int v12[2]; // [sp+10h] [bp-10h] BYREF
char *v13; // [sp+18h] [bp-8h]
v2 = this;
v3 = (char *)a2;
if ( !*(_BYTE *)(this + 654) )
{
this = (*(int (__fastcall **)(CCTextInputNode *))(*(_DWORD *)a2 + 32))(a2);
if ( this )
{
if ( this == 1 )
{
v7 = *(_BYTE **)(v2 + 532);
CCTextInputNode::getString((CCTextInputNode *)&v9, (int)v3);
if ( (v9 & 1) == 0 )
v3 = &v10;
v12[0] = 0;
if ( (v9 & 1) != 0 )
v3 = v11;
v12[1] = 0;
v13 = nullptr;
v8 = strlen(v3);
std::string::__init(v12, v3, v8);
TextGameObject::updateTextObject(v7, (unsigned __int8 *)v12, 0);
std::string::~string((int)v12);
return std::string::~string((int)&v9);
}
}
else
{
CCTextInputNode::getString((CCTextInputNode *)v12, (int)v3);
if ( (v12[0] & 1) != 0 )
v4 = v13;
else
v4 = (char *)v12 + 1;
*(_DWORD *)(v2 + 564) = atoi(v4);
std::string::~string((int)v12);
v5 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%i",
*(const char **)(v2 + 564));
CString = (char *)cocos2d::CCString::getCString(v5);
ButtonSprite::setString(*(_DWORD *)(v2 + 620), CString);
CustomizeObjectLayer::updateSelected((CustomizeObjectLayer *)v2, *(_DWORD *)(v2 + 564));
CustomizeObjectLayer::updateColorSprite((ColorChannelSprite **)v2);
return CustomizeObjectLayer::updateChannelLabel((CustomizeObjectLayer *)v2, *(GJSpecialColorSelect **)(v2 + 564));
}
}
return this;
}