//
// GameObject::getActiveColorForMode from 0x44ede8 to 0x44eee0 (248 bytes)
//
// 3 xrefs:
// > PlayLayer::addObject @ 0x40034c
// > PlayLayer::addObject @ 0x400360
// > GameObject::colorForMode @ 0x44eefe
//
// 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:48:36 +0000
//
__int16 *__fastcall GameObject::getActiveColorForMode(GameObject *this, int a2, int a3)
{
char v4; // r6
int v6; // r7
char *v7; // r4
unsigned __int8 *v8; // r0
int v9; // r0
unsigned __int8 *v10; // r2
int v11; // r0
int v12; // [sp+8h] [bp-20h]
int v13; // [sp+Ch] [bp-1Ch]
int v14; // [sp+10h] [bp-18h]
int v15; // [sp+14h] [bp-14h]
int v16; // [sp+18h] [bp-10h]
int v17; // [sp+1Ch] [bp-Ch]
int v18; // [sp+20h] [bp-8h]
int v19; // [sp+24h] [bp-4h]
v4 = a3;
if ( a2 == 1010 )
return (__int16 *)&unk_BEBC04;
if ( a2 <= 1010 )
{
if ( a2 )
{
LABEL_13:
if ( a3 )
v11 = *((_DWORD *)this + 274);
else
v11 = *((_DWORD *)this + 275);
return (__int16 *)(v11 + 271);
}
return &word_BEBBDC;
}
if ( a2 == 1011 )
return &word_BEBBDC;
if ( a2 != 1012 )
goto LABEL_13;
v6 = *((_DWORD *)this + 276);
v7 = (char *)this + 537;
if ( a3 )
{
v10 = *((unsigned __int8 **)this + 274);
LOWORD(v15) = 256;
v9 = GJEffectManager::colorForEffect(
v6,
v10[271] | (v10[272] << 8) | (v10[273] << 16),
v12,
v13,
1041865114,
v15,
0,
1059481190,
1041865114);
}
else
{
v8 = (unsigned __int8 *)(*(int (__fastcall **)(GameObject *))(*(_DWORD *)this + 472))(this);
LOBYTE(v19) = v4;
BYTE1(v19) = 1;
v18 = 1041865114;
v16 = 0;
v17 = 1059481190;
v9 = GJEffectManager::colorForEffect(
v6,
*v8 | (v8[1] << 8) | (v8[2] << 16),
0,
1059481190,
1041865114,
v19,
v12,
v13,
v14);
}
*(_WORD *)((char *)this + 537) = v9;
*((_BYTE *)this + 539) = BYTE2(v9);
return (__int16 *)v7;
}