//
// cocos2d::CCLabelBMFont::setColor from 0x1005d9a30 to 0x1005d9ae8 (184 bytes)
//
// 2 xrefs:
// > ??> @ 0x10095dff8
// > ??> @ 0x1009744e0
//
// 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 cocos2d::CCLabelBMFont::setColor(cocos2d::CCLabelBMFont *a1, const cocos2d::ccColor3B *a2)
{
__int16 v2; // ax
cocos2d::CCNode *m_pParent; // rdi
void *v5; // rax
void *v6; // rbx
__int64 v7; // rax
__int16 v8; // [rsp-1Ch] [rbp-1Ch] BYREF
char v9; // [rsp-1Ah] [rbp-1Ah]
a1->m_tRealColor = *a2;
v2 = *(_WORD *)&a2->r;
a1->m_tDisplayedColor.b = a2->b;
*(_WORD *)&a1->m_tDisplayedColor.r = v2;
if ( a1->m_bCascadeColorEnabled )
{
v9 = -1;
v8 = -1;
m_pParent = a1->m_pParent;
if ( m_pParent )
{
v5 = __dynamic_cast(
m_pParent,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCNode,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCRGBAProtocol,
-2);
if ( v5 )
{
v6 = v5;
if ( (*(unsigned __int8 (__fastcall **)(void *))(*(_QWORD *)v5 + 64LL))(v5) )
{
v7 = (*(__int64 (__fastcall **)(void *))(*(_QWORD *)v6 + 16LL))(v6);
v8 = *(_WORD *)v7;
v9 = *(_BYTE *)(v7 + 2);
}
}
}
((void (__fastcall *)(cocos2d::CCLabelBMFont *, __int16 *))a1->updateDisplayedColor)(a1, &v8);
}
}