//
// cocos2d::CCNodeRGBA::setColor from 0x180004c20 to 0x180004cda (186 bytes)
//
// 16 xrefs:
// > cocos2d::CCAtlasNode::setColor @ 0x180001e1a
// > cocos2d::CCSprite::setColor @ 0x18008f5c3
// > ??> @ 0x1800ec180
// > ??> @ 0x1800ecad8
// > ??> @ 0x1800fda88
// > ??> @ 0x1800fdee0
// > ??> @ 0x1800fe338
// > ??> @ 0x1800fe790
// > ??> @ 0x1800fec00
// > ??> @ 0x1800ff070
// > ??> @ 0x1800ff4c8
// > ??> @ 0x1800ffc98
// > ??> @ 0x18013a164
// > ??> @ 0x18013a174
// > ??> @ 0x18014cf68
// > ??> @ 0x1801b75b8
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:21:17 +0000
//
void __fastcall cocos2d::CCNodeRGBA::setColor(cocos2d::CCNodeRGBA *this, const struct cocos2d::_ccColor3B *a2)
{
bool v2; // zf
__int64 v4; // rcx
__int64 v5; // rax
__int64 v6; // rdi
__int64 v7; // rax
__int16 v8; // [rsp+40h] [rbp+8h] BYREF
char v9; // [rsp+42h] [rbp+Ah]
v2 = *((_BYTE *)this + 16) == 0;
*(_WORD *)((char *)this + 13) = *(_WORD *)a2;
*((_BYTE *)this + 15) = *((_BYTE *)a2 + 2);
*((_WORD *)this + 5) = *(_WORD *)((char *)this + 13);
*((_BYTE *)this + 12) = *((_BYTE *)this + 15);
if ( !v2 )
{
v4 = *((_QWORD *)this - 13);
v8 = -1;
v9 = -1;
v5 = _RTDynamicCast(
v4,
0,
&cocos2d::CCNode `RTTI Type Descriptor',
&cocos2d::CCRGBAProtocol `RTTI Type Descriptor',
0);
v6 = v5;
if ( v5 )
{
if ( (*(unsigned __int8 (__fastcall **)(__int64))(*(_QWORD *)v5 + 64LL))(v5) )
{
v7 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v6 + 16LL))(v6);
v8 = *(_WORD *)v7;
v9 = *(_BYTE *)(v7 + 2);
}
}
(*(void (__fastcall **)(cocos2d::CCNodeRGBA *, __int16 *))(*(_QWORD *)this + 80LL))(this, &v8);
}
}