//
// cocos2d::CCLayerRGBA::updateDisplayedOpacity from 0x7d7758 to 0x7d77ce (118 bytes)
//
// 1 xrefs:
// > `non-virtual thunk to'cocos2d::CCLayerRGBA::updateDisplayedOpacity @ 0x7d77e4
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:00:40 +0000
//
_BYTE *__fastcall cocos2d::CCLayerRGBA::updateDisplayedOpacity(_BYTE *this, int a2)
{
_BYTE *v2; // r6
int v3; // r3
_DWORD *v4; // r2
void **v5; // r4
void **v6; // r5
_BYTE *v7; // t1
v2 = this;
*(this + 320) = (unsigned int)((double)(a2 * (unsigned __int8)*(this + 321)) / 255.0);
if ( *(this + 328) )
{
v3 = *((_DWORD *)this + 48);
if ( v3 )
{
v4 = *(_DWORD **)(v3 + 52);
if ( *v4 )
{
v5 = (void **)v4[3];
v6 = &v5[*v4] + 0x3FFFFFFF;
while ( v5 <= v6 )
{
v7 = *v5++;
this = v7;
if ( !v7 )
break;
this = _dynamic_cast(
this,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCObject,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCRGBAProtocol,
-2);
if ( this )
this = (_BYTE *)(*(int (__fastcall **)(_BYTE *, _DWORD))(*(_DWORD *)this + 52))(
this,
(unsigned __int8)v2[320]);
}
}
}
}
return this;
}