//
// GameObject::editorColorForMode from 0x770598 to 0x7706d0 (312 bytes)
//
// 3 xrefs:
// > GameObject::updateObjectEditorColor @ 0x77071c
// > GameObject::updateObjectEditorColor @ 0x770768
// > ??> @ 0xbbd20
//
// This function is hookable on this platform (idp: arm, 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:53:12 +0000
//
unsigned __int64 __fastcall GameObject::editorColorForMode(GameObject *this, int a2)
{
unsigned __int8 v2; // w1
unsigned __int8 v3; // w2
unsigned __int8 v4; // w3
int v6; // w0
if ( a2 == 4 )
{
v2 = -106;
v3 = -1;
v4 = -106;
return v4 | (unsigned __int64)(unsigned __int16)(v3 << 8) | ((unsigned __int64)v2 << 16);
}
if ( a2 <= 4 )
{
if ( a2 == 2 )
{
v3 = -1;
v2 = -106;
v4 = -1;
return v4 | (unsigned __int64)(unsigned __int16)(v3 << 8) | ((unsigned __int64)v2 << 16);
}
if ( a2 > 2 )
{
v2 = -1;
v4 = -106;
v3 = -1;
return v4 | (unsigned __int64)(unsigned __int16)(v3 << 8) | ((unsigned __int64)v2 << 16);
}
if ( a2 == 1 )
{
v2 = -1;
v3 = -106;
v4 = -1;
return v4 | (unsigned __int64)(unsigned __int16)(v3 << 8) | ((unsigned __int64)v2 << 16);
}
}
else
{
if ( a2 == 1005 )
{
v2 = -1;
v3 = -106;
v4 = -81;
return v4 | (unsigned __int64)(unsigned __int16)(v3 << 8) | ((unsigned __int64)v2 << 16);
}
if ( a2 <= 1005 )
{
if ( a2 == 1003 )
{
v3 = -1;
v2 = 0;
v4 = -1;
return v4 | (unsigned __int64)(unsigned __int16)(v3 << 8) | ((unsigned __int64)v2 << 16);
}
}
else
{
if ( a2 == 1006 )
{
v2 = -106;
v4 = -1;
v3 = -106;
return v4 | (unsigned __int64)(unsigned __int16)(v3 << 8) | ((unsigned __int64)v2 << 16);
}
if ( a2 == 1007 )
{
v2 = -1;
v3 = -81;
v4 = 75;
return v4 | (unsigned __int64)(unsigned __int16)(v3 << 8) | ((unsigned __int64)v2 << 16);
}
}
}
if ( *((_BYTE *)this + 1072) )
{
v2 = 0;
v3 = 127;
v4 = -1;
}
else if ( (unsigned int)(a2 - 5) <= 0x3E1 )
{
v6 = GameObject::editorColorForCustomMode(this, a2);
v3 = BYTE1(v6);
v2 = BYTE2(v6);
v4 = v6;
}
else
{
v2 = -1;
v3 = -1;
v4 = -1;
}
return v4 | (unsigned __int64)(unsigned __int16)(v3 << 8) | ((unsigned __int64)v2 << 16);
}