//
// ColorChannelSprite::updateCopyLabel from 0x5c212c to 0x5c225e (306 bytes)
//
// 2 xrefs:
// > ColorChannelSprite::updateValues @ 0x5c248a
// > ColorChannelSprite::updateValues @ 0x5c24e4
//
// 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:53:50 +0000
//
int __fastcall ColorChannelSprite::updateCopyLabel(int this, GJSpecialColorSelect *a2, int a3)
{
cocos2d::CCLabelBMFont **v4; // r4
int v6; // r3
cocos2d::CCLabelBMFont *v7; // r0
cocos2d::CCLabelBMFont *v8; // r3
cocos2d::CCLabelBMFont *v9; // r9
void (__fastcall *v10)(cocos2d::CCLabelBMFont *, _BYTE *); // r10
float v11; // s17
int v12; // r0
cocos2d::CCString *v13; // r0
int CString; // r0
__int16 *v15; // r1
_BYTE v16[8]; // [sp+4h] [bp-Ch] BYREF
v4 = (cocos2d::CCLabelBMFont **)this;
v6 = *(_DWORD *)(this + 508);
if ( a2 || v6 )
{
if ( !v6 )
{
v7 = (cocos2d::CCLabelBMFont *)cocos2d::CCLabelBMFont::create(
(cocos2d::CCLabelBMFont *)" ",
"bigFont.fnt",
_stack_chk_guard);
v8 = *v4;
v4[127] = v7;
(*((void (__fastcall **)(cocos2d::CCLabelBMFont **, cocos2d::CCLabelBMFont *, int))v8 + 58))(v4, v7, 1);
v9 = v4[127];
v10 = *(void (__fastcall **)(cocos2d::CCLabelBMFont *, _BYTE *))(*(_DWORD *)v9 + 92);
v11 = *(float *)(*((int (__fastcall **)(cocos2d::CCLabelBMFont **))*v4 + 41))(v4);
v12 = (*((int (__fastcall **)(cocos2d::CCLabelBMFont **))*v4 + 41))(v4);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v16, v11 * 0.5, (float)(*(float *)(v12 + 4) * 0.5) + 3.0);
v10(v9, v16);
(*(void (__fastcall **)(cocos2d::CCLabelBMFont *, float))(*(_DWORD *)v4[127] + 80))(v4[127], 0.5);
}
if ( a2 )
{
if ( (int)a2 >= 1000 )
{
CString = GJSpecialColorSelect::textForColorIdx(a2, (int)a2);
}
else
{
v13 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i", (const char *)a2);
CString = cocos2d::CCString::getCString(v13);
}
(*(void (__fastcall **)(cocos2d::CCLabelBMFont *, int))(*(_DWORD *)v4[127] + 464))(v4[127], CString);
cocos2d::CCLabelBMFont::limitLabelWidth(v4[127], 28.0, 0.5, 0.0);
(*(void (__fastcall **)(cocos2d::CCLabelBMFont *, int))(*(_DWORD *)v4[127] + 172))(v4[127], 1);
if ( a3 )
v15 = (__int16 *)&unk_BEE134;
else
v15 = &word_BEE137;
return (*(int (__fastcall **)(cocos2d::CCLabelBMFont *, __int16 *))(*(_DWORD *)v4[127] + 536))(v4[127], v15);
}
else
{
return (*(int (__fastcall **)(cocos2d::CCLabelBMFont *, _DWORD))(*(_DWORD *)v4[127] + 172))(v4[127], 0);
}
}
return this;
}