//
// GJChestSprite::setColor from 0x4e9d78 to 0x4e9e30 (184 bytes)
//
// 1 xrefs:
// > `non-virtual thunk to'GJChestSprite::setColor @ 0x4e9e3c
//
// 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 GJChestSprite::setColor(GJChestSprite *a1, const cocos2d::ccColor3B *a2)
{
cocos2d::CCArray *v3; // r0
cocos2d::CCArray *v4; // r6
int v5; // r0
_DWORD v6[2]; // [sp+0h] [bp-8h] BYREF
v6[0] = a1;
v6[1] = a2;
*(cocos2d::ccColor3B *)v6 = *a2;
if ( a1->m_dark )
{
BYTE1(v6[0]) = (unsigned int)(float)((float)BYTE1(v6[0]) * 0.4);
BYTE2(v6[0]) = (unsigned int)(float)((float)BYTE2(v6[0]) * 0.4);
LOBYTE(v6[0]) = (unsigned int)(float)((float)LOBYTE(v6[0]) * 0.4);
}
cocos2d::CCSprite::setColor(a1, (const cocos2d::ccColor3B *)v6);
v3 = a1->getChildren(a1);
v4 = v3;
if ( v3 )
{
if ( cocos2d::CCArray::count(v3) )
{
v5 = cocos2d::CCArray::objectAtIndex(v4, 0);
(*(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v5 + 472))(v5, v6);
}
}
}