//
// cocos2d::CCSprite::updateDisplayedColor from 0x10028ab40 to 0x10028ac6c (300 bytes)
//
// 79 xrefs:
// > sub_10028AC70 @ 0x10028ac7c
// > ??> @ 0x1008b4178
// > ??> @ 0x1008b8160
// > ??> @ 0x1008c4420
// > ??> @ 0x1008c4c58
// > ??> @ 0x1008c5450
// > ??> @ 0x1008c5c48
// > ??> @ 0x1008c6440
// > ??> @ 0x1008c6c38
// > ??> @ 0x1008c7430
// > ??> @ 0x1008c7c28
// > ??> @ 0x1008c8410
// > ??> @ 0x1008c8c20
// > ??> @ 0x1008c9498
// > ??> @ 0x1008c9ca8
// > ??> @ 0x1008ca4b8
// > ??> @ 0x1008cacc8
// > ??> @ 0x1008cb4d8
// > ??> @ 0x1008cbce8
// > ??> @ 0x1008cc4f8
// > ??> @ 0x1008ccd08
// > ??> @ 0x1008cd518
// > ??> @ 0x1008cdd28
// > ??> @ 0x1008ce550
// > ??> @ 0x1008ceda8
// > ??> @ 0x1008cf5d0
// > ??> @ 0x1008cfdf8
// > ??> @ 0x1008d0620
// > ??> @ 0x1008d0e48
// > ??> @ 0x1008d1658
// > ??> @ 0x1008d1e68
// > ??> @ 0x1008d2678
// > ??> @ 0x1008d2e88
// > ??> @ 0x1008d3698
// > ??> @ 0x1008d3ea8
// > ??> @ 0x1008d46b8
// > ??> @ 0x1008d4ec8
// > ??> @ 0x1008d56d8
// > ??> @ 0x1008d5ee8
// > ??> @ 0x1008d66f8
// > ??> @ 0x1008d6f08
// > ??> @ 0x1008d7718
// > ??> @ 0x1008d7f28
// > ??> @ 0x1008d8738
// > ??> @ 0x1008d8f48
// > ??> @ 0x1008dd528
// > ??> @ 0x1008e0a58
// > ??> @ 0x1008f06d0
// > ??> @ 0x1008f3a60
// > ??> @ 0x100904e58
// > ??> @ 0x100909a30
// > ??> @ 0x10090ba68
// > ??> @ 0x100913510
// > ??> @ 0x1009147b8
// > ??> @ 0x100915348
// > ??> @ 0x10091c0d8
// > ??> @ 0x10091c660
// > ??> @ 0x10091dab8
// > ??> @ 0x10091e058
// > ??> @ 0x1009236f0
// > ??> @ 0x100928088
// > ??> @ 0x10092ade0
// > ??> @ 0x100933ab8
// > ??> @ 0x1009342e0
// > ??> @ 0x10093c980
// > ??> @ 0x10093cf30
// > ??> @ 0x1009421c0
// > ??> @ 0x10094e8d8
// > ??> @ 0x1009717a0
// > ??> @ 0x100971f88
// > ??> @ 0x100972798
// > ??> @ 0x100974a00
// > ??> @ 0x100974fb8
// > ??> @ 0x100975570
// > ??> @ 0x10097a560
// > ??> @ 0x10097ab18
// > ??> @ 0x1009855e8
// > ??> @ 0x1009919d0
// > ??> @ 0x1009961f8
//
// 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::updateDisplayedColor(cocos2d::CCSprite *a1, const cocos2d::ccColor3B *a2)
{
GLubyte displayedOpacity; // al
int v3; // ecx
int v4; // edx
float v5; // xmm0_4
unsigned int m_uAtlasIndex; // edx
cocos2d::CCNodeRGBA::updateDisplayedColor(a1, a2);
displayedOpacity = a1->_displayedOpacity;
LOBYTE(v3) = a1->_displayedColor.r;
LOBYTE(v4) = a1->_displayedColor.g;
LOBYTE(a2) = a1->_displayedColor.b;
if ( a1->m_bOpacityModifyRGB )
{
v5 = (float)displayedOpacity / 255.0;
v3 = (int)(float)((float)(unsigned __int8)v3 * v5);
v4 = (int)(float)((float)(unsigned __int8)v4 * v5);
LODWORD(a2) = (int)(float)((float)(unsigned __int8)a2 * v5);
}
a1->m_sQuad.bl.colors.r = v3;
a1->m_sQuad.bl.colors.g = v4;
a1->m_sQuad.bl.colors.b = (unsigned __int8)a2;
a1->m_sQuad.bl.colors.a = displayedOpacity;
a1->m_sQuad.br.colors.r = v3;
a1->m_sQuad.br.colors.g = v4;
a1->m_sQuad.br.colors.b = (unsigned __int8)a2;
a1->m_sQuad.br.colors.a = displayedOpacity;
a1->m_sQuad.tl.colors.r = v3;
a1->m_sQuad.tl.colors.g = v4;
a1->m_sQuad.tl.colors.b = (unsigned __int8)a2;
a1->m_sQuad.tl.colors.a = displayedOpacity;
a1->m_sQuad.tr.colors.r = v3;
a1->m_sQuad.tr.colors.g = v4;
a1->m_sQuad.tr.colors.b = (unsigned __int8)a2;
a1->m_sQuad.tr.colors.a = displayedOpacity;
if ( a1->m_pobBatchNode )
{
m_uAtlasIndex = a1->m_uAtlasIndex;
if ( m_uAtlasIndex == -1 )
((void (__fastcall *)(cocos2d::CCSprite *, __int64))a1->setDirty)(a1, 1);
else
cocos2d::CCTextureAtlas::updateQuad(a1->m_pobTextureAtlas, &a1->m_sQuad, m_uAtlasIndex);
}
}