//
// ColorChannelSprite::updateCopyLabel from 0x1002d8c60 to 0x1002d8e13 (435 bytes)
//
// 1 xrefs:
// > ColorChannelSprite::updateValues @ 0x1002d90a1
//
// 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 ColorChannelSprite::updateCopyLabel(ColorChannelSprite *a1, int a2, bool a3)
{
cocos2d::CCLabelBMFont *m_copyLabel; // rdi
cocos2d::CCString *v6; // rax
const char *CString; // rax
cocos2d::CCLabelBMFont *v8; // rax
cocos2d::CCLabelBMFont *v9; // r15
__int64 v10; // rax
void *v11; // rsi
char v12; // [rsp+0h] [rbp-40h]
float v13[2]; // [rsp+Ch] [rbp-34h] BYREF
float v14; // [rsp+14h] [rbp-2Ch]
m_copyLabel = a1->m_copyLabel;
if ( a2 )
{
if ( m_copyLabel )
{
if ( a2 <= 999 )
{
LABEL_4:
v6 = (cocos2d::CCString *)sub_1007AB580("%i", v12);
CString = cocos2d::CCString::getCString(v6);
LABEL_9:
((void (__fastcall *)(cocos2d::CCLabelBMFont *, const char *))a1->m_copyLabel->setString)(
a1->m_copyLabel,
CString);
cocos2d::CCLabelBMFont::limitLabelWidth(a1->m_copyLabel, 28.0, 0.5, 0.0);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, __int64))a1->m_copyLabel->setVisible)(a1->m_copyLabel, 1);
v11 = &unk_10081948B;
if ( a3 )
v11 = &unk_100819488;
((void (__fastcall *)(cocos2d::CCLabelBMFont *, void *))a1->m_copyLabel->setColor)(a1->m_copyLabel, v11);
return;
}
}
else
{
v8 = cocos2d::CCLabelBMFont::create_3(" ", "bigFont.fnt");
a1->m_copyLabel = v8;
((void (__fastcall *)(ColorChannelSprite *, cocos2d::CCLabelBMFont *, __int64))a1->addChild_0)(a1, v8, 1);
v9 = a1->m_copyLabel;
v14 = *(float *)((__int64 (__fastcall *)(ColorChannelSprite *))a1->getContentSize)(a1) * 0.5;
v10 = ((__int64 (__fastcall *)(ColorChannelSprite *))a1->getContentSize)(a1);
sub_10028CBE0(v13, v14, (float)(*(float *)(v10 + 4) * 0.5) + 3.0);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, float *))v9->setPosition)(v9, v13);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))a1->m_copyLabel->setScale)(a1->m_copyLabel, 0.5);
if ( a2 <= 999 )
goto LABEL_4;
}
CString = GJSpecialColorSelect::textForColorIdx(a2);
goto LABEL_9;
}
if ( m_copyLabel )
((void (__fastcall *)(cocos2d::CCLabelBMFont *, _QWORD, bool))m_copyLabel->setVisible)(m_copyLabel, 0, a3);
}