//
// cocos2d::CCLayerRGBA::setColor from 0x1004b1d30 to 0x1004b1de8 (184 bytes)
//
// 13 xrefs:
// > cocos2d::extension::CCControlButton::setColor @ 0x10035536d
// > sub_1003553C0 @ 0x1003553d4
// > ??> @ 0x10090c688
// > ??> @ 0x1009159f0
// > ??> @ 0x1009168f0
// > ??> @ 0x100916fd0
// > ??> @ 0x100917f30
// > ??> @ 0x10091b438
// > ??> @ 0x100924af0
// > ??> @ 0x100926f58
// > ??> @ 0x100928738
// > ??> @ 0x100949640
// > ??> @ 0x10098c4f0
//
// 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::CCLayerRGBA::setColor(cocos2d::CCLayerRGBA *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->_realColor = *a2;
v2 = *(_WORD *)&a2->r;
a1->_displayedColor.b = a2->b;
*(_WORD *)&a1->_displayedColor.r = v2;
if ( a1->_cascadeColorEnabled )
{
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::CCLayerRGBA *, __int16 *))a1->updateDisplayedColor)(a1, &v8);
}
}