//
// GameObject::editorColorForMode from 0x44e110 to 0x44e1be (174 bytes)
//
// 2 xrefs:
// > GameObject::updateObjectEditorColor @ 0x44e1ea
// > GameObject::updateObjectEditorColor @ 0x44e224
//
// 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:35 +0000
//
int __fastcall GameObject::editorColorForMode(GameObject *this, int a2)
{
unsigned __int8 v2; // r1
unsigned __int8 v3; // r3
unsigned __int8 v4; // r2
int v5; // r0
if ( a2 == 4 )
{
v3 = -106;
v4 = -1;
goto LABEL_18;
}
if ( a2 <= 4 )
{
if ( a2 == 2 )
{
v4 = -1;
v3 = -106;
v2 = -1;
return v2 | (unsigned __int16)(v4 << 8) | (v3 << 16);
}
if ( a2 > 2 )
{
v3 = -1;
v4 = -1;
LABEL_18:
v2 = -106;
return v2 | (unsigned __int16)(v4 << 8) | (v3 << 16);
}
if ( a2 == 1 )
{
v3 = -1;
v4 = -106;
goto LABEL_26;
}
goto LABEL_20;
}
if ( a2 == 1005 )
{
v3 = -1;
v4 = -106;
v2 = -81;
return v2 | (unsigned __int16)(v4 << 8) | (v3 << 16);
}
if ( a2 <= 1005 )
{
if ( a2 == 1003 )
{
v3 = 0;
v4 = -1;
LABEL_16:
v2 = -1;
return v2 | (unsigned __int16)(v4 << 8) | (v3 << 16);
}
goto LABEL_20;
}
if ( a2 == 1006 )
{
v3 = -106;
v4 = -106;
goto LABEL_16;
}
if ( a2 != 1007 )
{
LABEL_20:
if ( !*((_BYTE *)this + 936) )
{
if ( (unsigned int)(a2 - 5) <= 0x3E1 )
{
v5 = GameObject::editorColorForCustomMode(this, a2);
v2 = v5;
v4 = BYTE1(v5);
v3 = BYTE2(v5);
return v2 | (unsigned __int16)(v4 << 8) | (v3 << 16);
}
v3 = -1;
v4 = -1;
LABEL_26:
v2 = -1;
return v2 | (unsigned __int16)(v4 << 8) | (v3 << 16);
}
v3 = 0;
v4 = 127;
goto LABEL_16;
}
v3 = -1;
v4 = -81;
v2 = 75;
return v2 | (unsigned __int16)(v4 << 8) | (v3 << 16);
}