//
// GameObject::updateMainColor from 0x10069be30 to 0x10069bf1b (235 bytes)
//
// 1 xrefs:
// > PlayLayer::updateVisibility @ 0x100084e73
//
// 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
//
__int64 __fastcall GameObject::updateMainColor(__int64 a1)
{
__int64 v1; // rax
int v2; // eax
float v3; // xmm0_4
float v4; // xmm0_4
__int64 v5; // r14
float v6; // xmm1_4
__int64 result; // rax
float v8; // [rsp+Ch] [rbp-14h]
v1 = GameObject::colorForMode(a1, *(unsigned int *)(a1 + 656), 1);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 1584LL))(a1, v1);
if ( *(int *)(a1 + 656) > 0 && (v2 = (int)*(float *)(*(_QWORD *)(a1 + 1264) + 316LL), (unsigned __int8)v2 < 0xFAu) )
{
v3 = (float)(unsigned __int8)v2 * 0.0040000002;
if ( *(__int16 *)(a1 + 1200) <= 0 )
goto LABEL_10;
}
else
{
v3 = 1.0;
if ( *(__int16 *)(a1 + 1200) <= 0 )
goto LABEL_10;
}
v8 = v3;
v4 = 1.0;
v5 = 0;
do
{
v4 = GJEffectManager::opacityModForGroup(*(_QWORD *)(a1 + 1280), *(__int16 *)(*(_QWORD *)(a1 + 1192) + 2 * v5)) * v4;
v6 = 0.0;
if ( v4 <= 0.0 )
break;
++v5;
v6 = v4;
}
while ( v5 < *(__int16 *)(a1 + 1200) );
v3 = v8 * v6;
LABEL_10:
result = *(_QWORD *)(a1 + 1096);
*(float *)(result + 8) = v3;
return result;
}