//
// ColorChannelSprite::updateCopyLabel from 0x140362e60 to 0x14036301a (442 bytes)
//
// 6 xrefs:
// > CustomizeObjectLayer::updateColorSprite @ 0x1401426ac
// > GJColorSetupLayer::updateSpriteColor @ 0x14035f59c
// > LevelSettingsLayer::updateColorSprite @ 0x14045ad57
// > ??> @ 0x1408ba7a0
// > ??> @ 0x1408ba7dc
// > ??> @ 0x1409214c4
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// 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:30:53 +0000
//
void __fastcall ColorChannelSprite::updateCopyLabel(cocos2d::CCLabelBMFont **a1, int a2, char a3)
{
struct cocos2d::CCLabelBMFont *v6; // rax
cocos2d::CCLabelBMFont *v7; // rcx
float *v8; // rbx
cocos2d::CCLabelBMFont *v9; // rsi
__int64 v10; // rdi
__int64 v11; // rax
__int64 v12; // rax
cocos2d::CCString *v13; // rax
const char *CString; // rax
__int64 v15; // rdx
__int16 *v16; // rdx
char v17; // [rsp+68h] [rbp+20h] BYREF
if ( a2 )
{
if ( !a1[75] )
{
v6 = cocos2d::CCLabelBMFont::create(" ", (const char *)&qword_140704F78);
v7 = *a1;
a1[75] = v6;
(*((void (__fastcall **)(cocos2d::CCLabelBMFont **, struct cocos2d::CCLabelBMFont *, __int64))v7 + 57))(a1, v6, 1);
v8 = (float *)(*((__int64 (__fastcall **)(cocos2d::CCLabelBMFont **))*a1 + 40))(a1);
v9 = a1[75];
v10 = *(_QWORD *)v9;
v11 = (*((__int64 (__fastcall **)(cocos2d::CCLabelBMFont **))*a1 + 40))(a1);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v17, *v8 * 0.5, (float)(*(float *)(v11 + 4) * 0.5) + 3.0);
(*(void (__fastcall **)(cocos2d::CCLabelBMFont *, __int64))(v10 + 184))(v9, v12);
(*(void (__fastcall **)(cocos2d::CCLabelBMFont *))(*(_QWORD *)a1[75] + 160LL))(a1[75]);
}
if ( a2 >= 1000 )
{
CString = (const char *)GJSpecialColorSelect::textForColorIdx((unsigned int)a2);
}
else
{
v13 = cocos2d::CCString::createWithFormat((const char *)&word_1406ED6F8, (unsigned int)a2);
CString = cocos2d::CCString::getCString(v13);
}
(**((void (__fastcall ***)(__int64, const char *))a1[75] + 45))((__int64)a1[75] + 360, CString);
cocos2d::CCLabelBMFont::limitLabelWidth(a1[75], 28.0, 0.5, 0.0);
LOBYTE(v15) = 1;
(*(void (__fastcall **)(cocos2d::CCLabelBMFont *, __int64))(*(_QWORD *)a1[75] + 336LL))(a1[75], v15);
v16 = &word_140703460;
if ( a3 )
v16 = (__int16 *)&unk_140703458;
(**((void (__fastcall ***)(__int64, __int16 *))a1[75] + 46))((__int64)a1[75] + 368, v16);
}
else if ( a1[75] )
{
(*(void (__fastcall **)(cocos2d::CCLabelBMFont *))(*(_QWORD *)a1[75] + 336LL))(a1[75]);
}
}