//
// cocos2d::CCNodeRGBA::setOpacity from 0xd3dab4 to 0xd3db4c (152 bytes)
//
// 20 xrefs:
// > cocos2d::CCAtlasNode::setOpacity @ 0xd3c568
// > `non-virtual thunk to'cocos2d::CCNodeRGBA::setOpacity @ 0xd3db50
// > cocos2d::CCSprite::setOpacity @ 0xd8832c
// > ??> @ 0x87da8
// > ??> @ 0x1416b40
// > ??> @ 0x1417060
// > ??> @ 0x141dbf0
// > ??> @ 0x1431450
// > ??> @ 0x146e040
// > ??> @ 0x14880a0
// > ??> @ 0x14e17a0
// > ??> @ 0x1516170
// > ??> @ 0x1516d60
// > ??> @ 0x1524a10
// > ??> @ 0x1524ef0
// > ??> @ 0x15253d0
// > ??> @ 0x1525890
// > ??> @ 0x1525d70
// > ??> @ 0x1526270
// > ??> @ 0x1526770
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 13:07:28 +0000
//
__int64 __fastcall cocos2d::CCNodeRGBA::setOpacity(__int64 this, char a2)
{
int v2; // w2
__int64 v3; // x19
const void *v4; // x0
void *v5; // x0
void *v6; // x20
__int64 v7; // x1
*(_BYTE *)(this + 329) = a2;
v2 = *(unsigned __int8 *)(this + 337);
*(_BYTE *)(this + 328) = a2;
if ( v2 )
{
v3 = this;
v4 = *(const void **)(this + 216);
if ( v4
&& (v5 = _dynamic_cast(
v4,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCNode,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCRGBAProtocol,
-2),
(v6 = v5) != nullptr)
&& (*(unsigned __int8 (__fastcall **)(void *))(*(_QWORD *)v5 + 88LL))(v5) )
{
v7 = (*(unsigned __int8 (__fastcall **)(void *))(*(_QWORD *)v6 + 24LL))(v6);
}
else
{
v7 = 255;
}
return (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)v3 + 920LL))(v3, v7);
}
return this;
}