//
// cocos2d::CCSprite::updateColor from 0x18008d450 to 0x18008d526 (214 bytes)
//
// 6 xrefs:
// > cocos2d::CCSprite::setColor @ 0x18008c3e4
// > cocos2d::CCSprite::setOpacity @ 0x18008c612
// > cocos2d::CCSprite::setOpacityModifyRGB @ 0x18008c645
// > cocos2d::CCSprite::updateDisplayedColor @ 0x18008d54a
// > cocos2d::CCSprite::updateDisplayedOpacity @ 0x18008d56a
// > ??> @ 0x1801438a8
//
// 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::CCSprite::updateColor(cocos2d::CCSprite *this)
{
__int64 r; // rdx
float v2; // xmm1_4
bool v3; // zf
unsigned int m_uAtlasIndex; // r8d
cocos2d::ccColor4B v5; // [rsp+8h] [rbp+8h]
r = this->_displayedColor.r;
*(cocos2d::ccColor3B *)&v5.r = this->_displayedColor;
v5.a = this->_displayedOpacity;
if ( this->m_bOpacityModifyRGB )
{
v2 = (float)this->_displayedOpacity / 255.0;
v5.r = (int)(float)((float)(int)r * v2);
v5.g = (int)(float)((float)this->_displayedColor.g * v2);
v5.b = (int)(float)((float)this->_displayedColor.b * v2);
}
v3 = this->m_pobBatchNode == nullptr;
this->m_sQuad.bl.colors = v5;
this->m_sQuad.br.colors = v5;
this->m_sQuad.tl.colors = v5;
this->m_sQuad.tr.colors = v5;
if ( !v3 )
{
m_uAtlasIndex = this->m_uAtlasIndex;
if ( m_uAtlasIndex == -1 )
{
LOBYTE(r) = 1;
((void (__fastcall *)(cocos2d::CCSprite *, __int64))this->setDirty)(this, r);
}
else
{
cocos2d::CCTextureAtlas::updateQuad(this->m_pobTextureAtlas, &this->m_sQuad, m_uAtlasIndex);
}
}
}