//
// cocos2d::CCLayerRGBA::updateDisplayedColor from 0x180051830 to 0x180051939 (265 bytes)
//
// 8 xrefs:
// > ??> @ 0x1800ed8c0
// > ??> @ 0x1800ede10
// > ??> @ 0x1800ee3e8
// > ??> @ 0x1800f7218
// > ??> @ 0x1801381d0
// > ??> @ 0x180138228
// > ??> @ 0x1801438a8
// > ??> @ 0x1801b21fc
//
// 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::updateDisplayedColor(
cocos2d::CCLayerRGBA *this,
const struct cocos2d::_ccColor3B *a2)
{
char *v2; // rsi
bool v3; // zf
__int64 v4; // rax
unsigned int *v5; // rbx
__int64 v6; // rax
_QWORD *v7; // rbx
_QWORD *i; // rdi
__int64 v9; // rax
v2 = (char *)&this->m_uID + 2;
BYTE2(this->m_uID) = (int)((double)(a2->r * BYTE1(this->m_nLuaID)) / 255.0);
HIBYTE(this->m_uID) = (int)((double)(BYTE2(this->m_nLuaID) * a2->g) / 255.0);
v3 = BYTE1(this->m_nTag) == 0;
LOBYTE(this->m_nLuaID) = (int)((double)(HIBYTE(this->m_nLuaID) * a2->b) / 255.0);
if ( !v3 )
{
v4 = *((_QWORD *)this - 25);
if ( v4 )
{
v5 = *(unsigned int **)(v4 + 56);
v6 = *v5;
if ( (_DWORD)v6 )
{
v7 = *((_QWORD **)v5 + 2);
for ( i = &v7[v6 - 1]; v7 <= i; ++v7 )
{
if ( !*v7 )
break;
v9 = _RTDynamicCast(
*v7,
0,
&cocos2d::CCObject `RTTI Type Descriptor',
&cocos2d::CCRGBAProtocol `RTTI Type Descriptor',
0);
if ( v9 )
(*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v9 + 80LL))(v9, v2);
}
}
}
}
}