//
// cocos2d::CCSprite::setOpacity from 0x5e78b4 to 0x5e7912 (94 bytes)
//
// 10 xrefs:
// > CCAnimatedSprite::setOpacity @ 0x2e4584
// > CCCountdown::setOpacity @ 0x2e5770
// > CCPartAnimSprite::setOpacity @ 0x2e6e9c
// > MultilineBitmapFont::setOpacity @ 0x2f1b50
// > TextArea::setOpacity @ 0x2f4a62
// > CCSpriteCOpacity::setOpacity @ 0x2fcf72
// > GameObject::setOpacity @ 0x354fa0
// > GJItemIcon::setOpacity @ 0x407f2a
// > GJChestSprite::setOpacity @ 0x4e9e46
// > `non-virtual thunk to'cocos2d::CCSprite::setOpacity @ 0x5e7916
//
// 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::setOpacity(cocos2d::CCSprite *a1, unsigned __int8 a2)
{
int v3; // r5
unsigned int realOpacity; // r3
float v5; // s16
v3 = a2;
realOpacity = a1->_realOpacity;
if ( realOpacity != a2 )
{
v5 = (float)realOpacity;
cocos2d::CCNodeRGBA::setOpacity(a1, a2);
if ( a1->m_pobBatchNode )
{
if ( v5 == 0.0 )
{
if ( v3 )
{
LABEL_8:
a1->setDirty(a1, 1);
goto LABEL_9;
}
}
else if ( v3 )
{
goto LABEL_9;
}
if ( v5 > 0.0 )
goto LABEL_8;
}
LABEL_9:
cocos2d::CCSprite::updateColor(a1);
}
}