//
// cocos2d::CCLayerRGBA::setOpacity from 0x1004b1bb0 to 0x1004b1c44 (148 bytes)
//
// 13 xrefs:
// > cocos2d::extension::CCControlButton::setOpacity @ 0x10035528c
// > sub_1003552E0 @ 0x1003552f3
// > ??> @ 0x10090c658
// > ??> @ 0x1009159c0
// > ??> @ 0x1009168c0
// > ??> @ 0x100916fa0
// > ??> @ 0x100917f00
// > ??> @ 0x10091b408
// > ??> @ 0x100924ac0
// > ??> @ 0x100926f28
// > ??> @ 0x100928708
// > ??> @ 0x100949610
// > ??> @ 0x10098c4c0
//
// 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::CCLayerRGBA::setOpacity(cocos2d::CCLayerRGBA *a1, unsigned __int8 a2)
{
unsigned __int8 v2; // bl
void *v3; // rax
void *v4; // r14
a1->_realOpacity = a2;
a1->_displayedOpacity = a2;
if ( a1->_cascadeOpacityEnabled )
{
v2 = -1;
if ( a1->m_pParent )
{
v3 = __dynamic_cast(
a1->m_pParent,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCNode,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCRGBAProtocol,
-2);
if ( v3 )
{
v4 = v3;
if ( (*(unsigned __int8 (__fastcall **)(void *))(*(_QWORD *)v3 + 88LL))(v3) )
v2 = (*(__int64 (__fastcall **)(void *))(*(_QWORD *)v4 + 24LL))(v4);
}
}
((void (__fastcall *)(cocos2d::CCLayerRGBA *, _QWORD))a1->updateDisplayedOpacity)(a1, v2);
}
}