//
// KeyframeGameObject::setOpacity from 0x1404b56f0 to 0x1404b57a2 (178 bytes)
//
// 4 xrefs:
// > ??> @ 0x140614ad8
// > ??> @ 0x1406a8830
// > ??> @ 0x1406a8840
// > ??> @ 0x1406dcbd8
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void KeyframeGameObject::setOpacity(KeyframeGameObject *a1, unsigned __int8 a2)
{
int v3; // edi
__int64 v4; // rcx
__int64 v5; // rax
unsigned int *v6; // rbx
__int64 v7; // rax
unsigned __int64 v8; // rbx
unsigned __int64 i; // rsi
LOBYTE(v3) = a2;
if ( LOBYTE(a1->m_rotationDegrees) )
v3 = (int)(float)((float)a2 * 0.5);
GameObject::setOpacity(a1, v3);
v4 = *(_QWORD *)&a1->m_lockToPlayerX;
if ( v4 )
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)(v4 + 368) + 40LL))(v4 + 368, BYTE1(a1->m_uID));
v5 = *(_QWORD *)&a1->m_moveModY;
if ( v5 )
{
v6 = *(unsigned int **)(v5 + 56);
v7 = *v6;
if ( (_DWORD)v7 )
{
v8 = *((_QWORD *)v6 + 2);
for ( i = v8 + 8 * (v7 - 1); v8 <= i; v8 += 8LL )
{
if ( !*(_QWORD *)v8 )
break;
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)(*(_QWORD *)v8 + 320LL) + 40LL))(
*(_QWORD *)v8 + 320LL,
(unsigned __int8)v3);
}
}
}
}