//
// KeyframeGameObject::setOpacity from 0x140656ac0 to 0x140656b72 (178 bytes)
//
// 5 xrefs:
// > ??> @ 0x140826a38
// > ??> @ 0x1408e93b8
// > ??> @ 0x1408e93c8
// > ??> @ 0x14093179c
// > ??> @ 0x1409317a8
//
// 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 11:35:45 +0000
//
__int64 __fastcall KeyframeGameObject::setOpacity(__int64 a1, unsigned __int8 a2)
{
int v3; // edi
__int64 v4; // rcx
__int64 result; // rax
unsigned int *v6; // rbx
unsigned __int64 v7; // rbx
unsigned __int64 i; // rsi
LOBYTE(v3) = a2;
if ( *(_BYTE *)(a1 + 1560) )
v3 = (int)(float)((float)a2 * 0.5);
GameObject::setOpacity(a1, (unsigned __int8)v3);
v4 = *(_QWORD *)(a1 + 1520);
if ( v4 )
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)(v4 + 368) + 40LL))(v4 + 368, *(unsigned __int8 *)(a1 + 9));
result = *(_QWORD *)(a1 + 1536);
if ( result )
{
v6 = *(unsigned int **)(result + 56);
result = *v6;
if ( (_DWORD)result )
{
v7 = *((_QWORD *)v6 + 2);
for ( i = v7 + 8 * (result - 1); v7 <= i; v7 += 8LL )
{
if ( !*(_QWORD *)v7 )
break;
result = (*(__int64 (__fastcall **)(__int64, _QWORD))(*(_QWORD *)(*(_QWORD *)v7 + 320LL) + 40LL))(
*(_QWORD *)v7 + 320LL,
(unsigned __int8)v3);
}
}
}
return result;
}