//
// cocos2d::CCSprite::setOpacityModifyRGB from 0x10028a9d0 to 0x10028aaf5 (293 bytes)
//
// 79 xrefs:
// > sub_10028AB00 @ 0x10028ab0c
// > ??> @ 0x1008b4190
// > ??> @ 0x1008b8178
// > ??> @ 0x1008c4438
// > ??> @ 0x1008c4c70
// > ??> @ 0x1008c5468
// > ??> @ 0x1008c5c60
// > ??> @ 0x1008c6458
// > ??> @ 0x1008c6c50
// > ??> @ 0x1008c7448
// > ??> @ 0x1008c7c40
// > ??> @ 0x1008c8428
// > ??> @ 0x1008c8c38
// > ??> @ 0x1008c94b0
// > ??> @ 0x1008c9cc0
// > ??> @ 0x1008ca4d0
// > ??> @ 0x1008cace0
// > ??> @ 0x1008cb4f0
// > ??> @ 0x1008cbd00
// > ??> @ 0x1008cc510
// > ??> @ 0x1008ccd20
// > ??> @ 0x1008cd530
// > ??> @ 0x1008cdd40
// > ??> @ 0x1008ce568
// > ??> @ 0x1008cedc0
// > ??> @ 0x1008cf5e8
// > ??> @ 0x1008cfe10
// > ??> @ 0x1008d0638
// > ??> @ 0x1008d0e60
// > ??> @ 0x1008d1670
// > ??> @ 0x1008d1e80
// > ??> @ 0x1008d2690
// > ??> @ 0x1008d2ea0
// > ??> @ 0x1008d36b0
// > ??> @ 0x1008d3ec0
// > ??> @ 0x1008d46d0
// > ??> @ 0x1008d4ee0
// > ??> @ 0x1008d56f0
// > ??> @ 0x1008d5f00
// > ??> @ 0x1008d6710
// > ??> @ 0x1008d6f20
// > ??> @ 0x1008d7730
// > ??> @ 0x1008d7f40
// > ??> @ 0x1008d8750
// > ??> @ 0x1008d8f60
// > ??> @ 0x1008dd540
// > ??> @ 0x1008e0a70
// > ??> @ 0x1008f06e8
// > ??> @ 0x1008f3a78
// > ??> @ 0x100904e70
// > ??> @ 0x100909a48
// > ??> @ 0x10090ba80
// > ??> @ 0x100913528
// > ??> @ 0x1009147d0
// > ??> @ 0x100915360
// > ??> @ 0x10091c0f0
// > ??> @ 0x10091c678
// > ??> @ 0x10091dad0
// > ??> @ 0x10091e070
// > ??> @ 0x100923708
// > ??> @ 0x1009280a0
// > ??> @ 0x10092adf8
// > ??> @ 0x100933ad0
// > ??> @ 0x1009342f8
// > ??> @ 0x10093c998
// > ??> @ 0x10093cf48
// > ??> @ 0x1009421d8
// > ??> @ 0x10094e8f0
// > ??> @ 0x1009717b8
// > ??> @ 0x100971fa0
// > ??> @ 0x1009727b0
// > ??> @ 0x100974a18
// > ??> @ 0x100974fd0
// > ??> @ 0x100975588
// > ??> @ 0x10097a578
// > ??> @ 0x10097ab30
// > ??> @ 0x100985600
// > ??> @ 0x1009919e8
// > ??> @ 0x100996210
//
// 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::setOpacityModifyRGB(cocos2d::CCSprite *a1, bool a2)
{
GLubyte displayedOpacity; // al
int v3; // ecx
int v4; // edx
int v5; // r8d
float v6; // xmm0_4
unsigned int m_uAtlasIndex; // edx
if ( a1->m_bOpacityModifyRGB != a2 )
{
a1->m_bOpacityModifyRGB = a2;
displayedOpacity = a1->_displayedOpacity;
LOBYTE(v3) = a1->_displayedColor.r;
LOBYTE(v4) = a1->_displayedColor.g;
LOBYTE(v5) = a1->_displayedColor.b;
if ( a2 )
{
v6 = (float)displayedOpacity / 255.0;
v3 = (int)(float)((float)(unsigned __int8)v3 * v6);
v4 = (int)(float)((float)(unsigned __int8)v4 * v6);
v5 = (int)(float)((float)(unsigned __int8)v5 * v6);
}
a1->m_sQuad.bl.colors.r = v3;
a1->m_sQuad.bl.colors.g = v4;
a1->m_sQuad.bl.colors.b = v5;
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 = v5;
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 = v5;
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 = v5;
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);
}
}
}