//
// cocos2d::CCSprite::updateColor from 0xb15f00 to 0xb15fe0 (224 bytes)
//
// 7 xrefs:
// > CCSpriteWithHue::updateColor @ 0x5bcfd8
// > cocos2d::CCSprite::setOpacityModifyRGB @ 0xb15ff8
// > cocos2d::CCSprite::setOpacity @ 0xb16e98
// > cocos2d::CCSprite::setColor @ 0xb16ee4
// > cocos2d::CCSprite::updateDisplayedColor @ 0xb16f3c
// > cocos2d::CCSprite::updateDisplayedOpacity @ 0xb16f68
// > ??> @ 0x44898
//
// 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 cocos2d::CCSprite::updateColor(cocos2d::CCSprite *a1)
{
_BOOL4 m_bOpacityModifyRGB; // w5
int r; // w2
int b; // w3
int g; // w0
int displayedOpacity; // w4
float v7; // s3
cocos2d::CCSpriteBatchNode *m_pobBatchNode; // x5
unsigned int m_uAtlasIndex; // w2
m_bOpacityModifyRGB = a1->m_bOpacityModifyRGB;
r = a1->_displayedColor.r;
b = a1->_displayedColor.b;
g = a1->_displayedColor.g;
displayedOpacity = a1->_displayedOpacity;
if ( m_bOpacityModifyRGB )
{
v7 = (float)displayedOpacity / 255.0;
LOBYTE(r) = (unsigned int)(float)((float)r * v7);
LOBYTE(g) = (unsigned int)(float)(v7 * (float)g);
LOBYTE(b) = (unsigned int)(float)(v7 * (float)b);
}
m_pobBatchNode = a1->m_pobBatchNode;
a1->m_sQuad.bl.colors.r = r;
a1->m_sQuad.bl.colors.g = g;
a1->m_sQuad.bl.colors.b = b;
a1->m_sQuad.bl.colors.a = displayedOpacity;
a1->m_sQuad.br.colors.r = r;
a1->m_sQuad.br.colors.g = g;
a1->m_sQuad.br.colors.b = b;
a1->m_sQuad.br.colors.a = displayedOpacity;
a1->m_sQuad.tl.colors.r = r;
a1->m_sQuad.tl.colors.g = g;
a1->m_sQuad.tl.colors.b = b;
a1->m_sQuad.tl.colors.a = displayedOpacity;
a1->m_sQuad.tr.colors.r = r;
a1->m_sQuad.tr.colors.g = g;
a1->m_sQuad.tr.colors.b = b;
a1->m_sQuad.tr.colors.a = displayedOpacity;
if ( m_pobBatchNode )
{
m_uAtlasIndex = a1->m_uAtlasIndex;
if ( m_uAtlasIndex == -1 )
a1->setDirty(a1, 1);
else
cocos2d::CCTextureAtlas::updateQuad(a1->m_pobTextureAtlas, &a1->m_sQuad, m_uAtlasIndex);
}
}