//
// GameObject::updateSecondaryColor from 0x10069c320 to 0x10069c42b (267 bytes)
//
// 1 xrefs:
// > PlayLayer::updateVisibility @ 0x100084e7b
//
// 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:35:16 +0000
//
void __fastcall GameObject::updateSecondaryColor(
__int64 a1,
double a2,
double a3,
double a4,
double a5,
double a6,
double a7,
double a8,
double a9)
{
int v9; // esi
unsigned __int16 *v10; // rax
int v11; // eax
float v12; // xmm0_4
float v13; // xmm0_4
__int64 v14; // r14
float v15; // xmm1_4
float v16; // [rsp-1Ch] [rbp-1Ch]
if ( *(_QWORD *)(a1 + 888) )
{
v9 = *(_DWORD *)(a1 + 660);
if ( v9 || *(_WORD *)(a1 + 1168) )
{
v10 = GameObject::colorForMode(a1, v9, 0, a2, a3, a4, a5, a6, a7, a8, a9);
(*(void (__fastcall **)(__int64, unsigned __int16 *))(*(_QWORD *)a1 + 1592LL))(a1, v10);
if ( *(int *)(a1 + 660) > 0
&& (v11 = (int)*(float *)(*(_QWORD *)(a1 + 1272) + 316LL), (unsigned __int8)v11 < 0xFAu) )
{
v12 = (float)(unsigned __int8)v11 * 0.0040000002;
if ( *(__int16 *)(a1 + 1200) <= 0 )
{
LABEL_13:
*(float *)(*(_QWORD *)(a1 + 1104) + 8LL) = v12;
return;
}
}
else
{
v12 = 1.0;
if ( *(__int16 *)(a1 + 1200) <= 0 )
goto LABEL_13;
}
v16 = v12;
v13 = 1.0;
v14 = 0;
do
{
v13 = GJEffectManager::opacityModForGroup(
*(_QWORD *)(a1 + 1280),
*(__int16 *)(*(_QWORD *)(a1 + 1192) + 2 * v14))
* v13;
v15 = 0.0;
if ( v13 <= 0.0 )
break;
++v14;
v15 = v13;
}
while ( v14 < *(__int16 *)(a1 + 1200) );
v12 = v16 * v15;
goto LABEL_13;
}
}
}