//
// GJEffectManager::getMixedColor from 0x5c3fa8 to 0x5c40c6 (286 bytes)
//
// 2 xrefs:
// > PlayLayer::updateInvisibleBlock @ 0x401aa6
// > GJEffectManager::calculateLightBGColor @ 0x5c414c
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:53:51 +0000
//
int __fastcall GJEffectManager::getMixedColor(int a1, int a2, float a3)
{
float v3; // s13
float v4; // s14
float v5; // s15
unsigned __int8 v6; // r1
unsigned __int8 v7; // r2
unsigned __int8 v8; // r3
v3 = (float)((float)(1.0 - a3) * (float)(unsigned __int8)a2) + (float)((float)(unsigned __int8)a1 * a3);
v4 = (float)((float)(1.0 - a3) * (float)BYTE1(a2)) + (float)((float)BYTE1(a1) * a3);
v5 = (float)((float)(1.0 - a3) * (float)BYTE2(a2)) + (float)((float)BYTE2(a1) * a3);
if ( v3 > 255.0 )
goto LABEL_6;
if ( v3 <= 0.0 )
{
v6 = 0;
goto LABEL_7;
}
if ( v3 > 255.0 )
{
LABEL_6:
v6 = -1;
goto LABEL_7;
}
v6 = (unsigned int)v3;
LABEL_7:
if ( v4 > 255.0 )
goto LABEL_12;
if ( v4 <= 0.0 )
{
v7 = 0;
goto LABEL_13;
}
if ( v4 > 255.0 )
{
LABEL_12:
v7 = -1;
goto LABEL_13;
}
v7 = (unsigned int)v4;
LABEL_13:
if ( v5 > 255.0 )
goto LABEL_18;
if ( v5 <= 0.0 )
{
v8 = 0;
return v6 | (unsigned __int16)(v7 << 8) | (v8 << 16);
}
if ( v5 > 255.0 )
{
LABEL_18:
v8 = -1;
return v6 | (unsigned __int16)(v7 << 8) | (v8 << 16);
}
v8 = (unsigned int)v5;
return v6 | (unsigned __int16)(v7 << 8) | (v8 << 16);
}