//
// GJEffectManager::calculateBaseActiveColors from 0x5c2fb4 to 0x5c306a (182 bytes)
//
// 3 xrefs:
// > PlayLayer::loadDefaultColors @ 0x40952e
// > GJEffectManager::processColors @ 0x5c6678
// > GJEffectManager::loadFromState @ 0x5d2378
//
// 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::calculateBaseActiveColors(int this)
{
int v1; // r3
int v2; // r3
int v3; // r6
int v4; // r7
int v5; // r3
int v6; // r4
char v7; // r3
int v8; // r2
int v9; // r4
float v10; // r1
float v11; // r2
int v12; // r3
int v13; // r0
__int16 v14; // [sp+8h] [bp-18h] BYREF
char v15; // [sp+Ah] [bp-16h]
float v16; // [sp+Ch] [bp-14h]
float v17; // [sp+10h] [bp-10h]
float v18; // [sp+14h] [bp-Ch]
int v19; // [sp+18h] [bp-8h]
v1 = *(_DWORD *)(this + 272);
if ( v1 )
{
v2 = *(_DWORD *)(v1 + 52);
if ( v2 )
v3 = *(_DWORD *)(v2 + 272);
else
v3 = 0;
while ( v2 )
{
v4 = *(_DWORD *)(v2 + 260);
v5 = *(_DWORD *)(v4 + 268);
v6 = *(_DWORD *)(v4 + 284);
v14 = v5;
v15 = BYTE2(v5);
if ( v6 && *(int *)(v6 + 116) > 0 && !*(_BYTE *)(v6 + 122) )
{
v9 = v6 + 100;
v10 = *(float *)(v9 + 4);
v11 = *(float *)(v9 + 8);
v12 = *(_DWORD *)(v9 + 12);
v16 = *(float *)v9;
v17 = v10;
v18 = v11;
v19 = v12;
v13 = GameToolbox::transformColor((unsigned __int8 *)&v14, v16, v10, v11, v12);
v14 = v13;
this = BYTE2(v13);
v15 = this;
}
v7 = v15;
*(_WORD *)(v4 + 271) = v14;
*(_BYTE *)(v4 + 273) = v7;
if ( v3 )
v8 = *(_DWORD *)(v3 + 272);
else
v8 = 0;
v2 = v3;
v3 = v8;
}
}
return this;
}