//
// cocos2d::CCNodeRGBA::setOpacity from 0x100261700 to 0x100261794 (148 bytes)
//
// 19 xrefs:
// > cocos2d::CCSprite::setOpacity @ 0x100275ac5
// > cocos2d::CCAtlasNode::setOpacity @ 0x100316779
// > sub_1003167B0 @ 0x1003167c4
// > ??> @ 0x100ab6958
// > ??> @ 0x100ab9cb0
// > ??> @ 0x100aeff18
// > ??> @ 0x100af5608
// > ??> @ 0x100af5ae8
// > ??> @ 0x100b145e0
// > ??> @ 0x100b33b70
// > ??> @ 0x100b34030
// > ??> @ 0x100b34528
// > ??> @ 0x100b34a20
// > ??> @ 0x100b34f30
// > ??> @ 0x100b35458
// > ??> @ 0x100b35950
// > ??> @ 0x100b72d10
// > ??> @ 0x100b7fb40
// > ??> @ 0x100b95498
//
// This function is hookable on this platform (idp: pc, 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 12:27:31 +0000
//
__int64 __fastcall cocos2d::CCNodeRGBA::setOpacity(__int64 a1, char a2)
{
__int64 result; // rax
unsigned __int8 v3; // bl
void *v4; // rax
void *v5; // r14
*(_BYTE *)(a1 + 329) = a2;
*(_BYTE *)(a1 + 328) = a2;
if ( *(_BYTE *)(a1 + 337) == 1 )
{
v3 = -1;
if ( *(_QWORD *)(a1 + 216) )
{
v4 = __dynamic_cast(
*(const void **)(a1 + 216),
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCNode,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCRGBAProtocol,
-2);
if ( v4 )
{
v5 = v4;
if ( (*(unsigned __int8 (__fastcall **)(void *))(*(_QWORD *)v4 + 88LL))(v4) )
v3 = (*(__int64 (__fastcall **)(void *))(*(_QWORD *)v5 + 24LL))(v5);
}
}
return (*(__int64 (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a1 + 920LL))(a1, v3);
}
return result;
}