//
// GameObject::setOpacity from 0x76ebac to 0x76edf0 (580 bytes)
//
// 13 xrefs:
// > PlayerObject::setOpacity @ 0x74db50
// > `non-virtual thunk to'GameObject::setOpacity @ 0x76edf4
// > AnimatedGameObject::setOpacity @ 0x86fc48
// > EffectGameObject::setOpacity @ 0x86fd18
// > LabelGameObject::setOpacity @ 0x86fe00
// > ??> @ 0x5a550
// > ??> @ 0x1434420
// > ??> @ 0x1434c00
// > ??> @ 0x1435410
// > ??> @ 0x1446fe0
// > ??> @ 0x14477c0
// > ??> @ 0x1447fd0
// > ??> @ 0x1459260
//
// 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 12:53:12 +0000
//
__int64 __fastcall GameObject::setOpacity(GameObject *this, int a2)
{
float v3; // s0
float v4; // s9
float v5; // s8
unsigned __int8 v6; // w20
unsigned int v7; // w21
__int64 v8; // x0
float v9; // s9
unsigned int v10; // w20
float v12; // s0
unsigned int v13; // w20
__int64 v14; // x0
unsigned int *v15; // x1
char *v16; // x23
__int64 v17; // x0
char *v18; // x25
__int64 v19; // x22
__int64 v20; // x0
void (__fastcall *v21)(__int64, __int64); // x24
__int64 v22; // x1
unsigned __int8 v23; // w20
a2 = (unsigned __int8)a2;
*((_BYTE *)this + 1328) = a2;
v3 = *((float *)this + 273);
if ( v3 > 0.0 )
a2 = (unsigned __int8)(unsigned int)(float)(v3 * (float)(unsigned __int8)a2);
v4 = 0.0;
if ( !*((_BYTE *)this + 774) )
v4 = (float)a2;
v5 = v4 * *(float *)(*((_QWORD *)this + 137) + 8LL);
v6 = (unsigned int)v5;
v7 = v6;
(*(void (__fastcall **)(GameObject *, _QWORD))(*(_QWORD *)this + 1664LL))(this, v6);
if ( *((_WORD *)this + 440) == 2 && *((_BYTE *)this + 884) )
{
v5 = 0.0;
v7 = 0;
}
if ( (float)*((unsigned __int8 *)this + 329) == v5 )
goto LABEL_7;
cocos2d::CCSprite::setOpacity(this, v7);
if ( *((_BYTE *)this + 1073) )
{
GameObject::setGlowOpacity((__int64)this, v6);
if ( !*((_BYTE *)this + 886) )
goto LABEL_7;
}
else
{
if ( *((_WORD *)this + 440) == 2 )
v23 = 0;
else
v23 = v7;
GameObject::setGlowOpacity((__int64)this, v23);
if ( !*((_BYTE *)this + 886) )
goto LABEL_7;
}
if ( *((_BYTE *)this + 648) )
return (*(__int64 (__fastcall **)(GameObject *, _QWORD))(*(_QWORD *)this + 1656LL))(this, v7);
v12 = *((float *)this + 161);
if ( v12 <= 0.0 )
v13 = v7;
else
v13 = (unsigned __int8)(unsigned int)(float)(v5 * v12);
(*(void (__fastcall **)(GameObject *, _QWORD))(*(_QWORD *)this + 1672LL))(this, v13);
v14 = (*(__int64 (__fastcall **)(GameObject *))(*(_QWORD *)this + 488LL))(this);
if ( v14 )
{
v15 = *(unsigned int **)(v14 + 56);
if ( *v15 )
{
v16 = *((char **)v15 + 2);
v17 = 8LL * *v15 - 8;
v18 = &v16[v17];
while ( v18 >= v16 )
{
v19 = *(_QWORD *)v16;
if ( !*(_QWORD *)v16 )
break;
v20 = *(_QWORD *)v16;
v16 += 8;
v21 = *(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v19 + 912LL);
v22 = (*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)v19 + 64LL))(v20) == 997 ? v7 : v13;
v21(v19, v22);
}
}
}
LABEL_7:
v8 = *((_QWORD *)this + 111);
if ( v8 && !*((_BYTE *)this + 648) )
{
v9 = v4 * *(float *)(*((_QWORD *)this + 138) + 8LL);
if ( *((_WORD *)this + 441) != 2 || (v10 = 0, !*((_BYTE *)this + 885)) )
v10 = (unsigned __int8)(unsigned int)v9;
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v8 + 912LL))(v8, v10);
(*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 111) + 1104LL))(*((_QWORD *)this + 111), v10);
}
return (*(__int64 (__fastcall **)(GameObject *, _QWORD))(*(_QWORD *)this + 1656LL))(this, v7);
}