//
// ColorSelectLiveOverlay::updateColorLabel from 0x4ce8d0 to 0x4ce9ae (222 bytes)
//
// 2 xrefs:
// > sub_4CE9C0 @ 0x4cf3c0
// > ColorSelectLiveOverlay::onSelectTab @ 0x4cf60e
//
// 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 ColorSelectLiveOverlay::updateColorLabel(ColorSelectLiveOverlay *a1)
{
ColorAction *m_detailColorAction; // r7
const char *m_colorID; // r4
EffectGameObject *m_effectGameObject; // r3
cocos2d::CCString *v5; // r0
char *CString; // r0
unsigned int v7; // r4
ColorSelectLiveOverlay *v8; // r0
bool v9; // r1
const unsigned __int8 *v10; // [sp+8h] [bp-8h] BYREF
m_detailColorAction = a1->m_detailColorAction;
if ( !a1->m_detailColorSelected )
m_detailColorAction = a1->m_baseColorAction;
if ( m_detailColorAction )
{
m_colorID = (const char *)m_detailColorAction->m_colorID;
}
else
{
m_effectGameObject = a1->m_effectGameObject;
if ( !m_effectGameObject )
{
LABEL_19:
((void (__fastcall *)(cocos2d::CCLabelBMFont *, const char *, ColorAction *, void (__fastcall *)(cocos2d::CCLabelBMFont *__hidden, const unsigned __int8 *), ColorSelectLiveOverlay *))a1->m_colorLabel->setString)(
a1->m_colorLabel,
" ",
a1->m_baseColorAction,
a1->m_colorLabel->setString,
a1);
return;
}
m_colorID = (const char *)m_effectGameObject->m_targetColor;
}
if ( (int)m_colorID <= 0 )
goto LABEL_19;
sub_776584((int)&v10, (char *)&unk_939830);
if ( (int)m_colorID >= 1000 )
{
CString = (char *)GJSpecialColorSelect::textForColorIdx((int)m_colorID);
}
else
{
v5 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i", m_colorID);
CString = (char *)cocos2d::CCString::getCString(v5);
}
sub_7753D4((int)&v10, CString);
a1->m_colorLabel->setString(a1->m_colorLabel, v10);
if ( m_detailColorAction )
{
if ( (int)m_colorID <= 1004 || (v7 = (unsigned int)(m_colorID - 1009), v7 <= 5) && ((1 << v7) & 0x31) != 0 )
{
v8 = a1;
v9 = 1;
}
else
{
v8 = a1;
v9 = 0;
}
ColorSelectLiveOverlay::toggleControls(v8, v9);
}
sub_774008(&v10);
}