//
// GameObject::editorColorForMode from 0x356afc to 0x356baa (174 bytes)
//
// 2 xrefs:
// > GameObject::updateObjectEditorColor @ 0x356bd6
// > GameObject::updateObjectEditorColor @ 0x356c10
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
cocos2d::ccColor3B GameObject::editorColorForMode(GameObject *a1, 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 (cocos2d::ccColor3B)(v2 | (unsigned __int16)(v4 << 8) | (v3 << 16));
}
if ( a2 > 2 )
{
v3 = -1;
v4 = -1;
LABEL_18:
v2 = -106;
return (cocos2d::ccColor3B)(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 (cocos2d::ccColor3B)(v2 | (unsigned __int16)(v4 << 8) | (v3 << 16));
}
if ( a2 <= 1005 )
{
if ( a2 == 1003 )
{
v3 = 0;
v4 = -1;
LABEL_16:
v2 = -1;
return (cocos2d::ccColor3B)(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 ( !a1->m_isInvisibleBlock )
{
if ( (unsigned int)(a2 - 5) <= 0x3E1 )
{
*(cocos2d::ccColor3B *)&v5 = GameObject::editorColorForCustomMode(a1, a2);
v2 = v5;
v4 = BYTE1(v5);
v3 = BYTE2(v5);
return (cocos2d::ccColor3B)(v2 | (unsigned __int16)(v4 << 8) | (v3 << 16));
}
v3 = -1;
v4 = -1;
LABEL_26:
v2 = -1;
return (cocos2d::ccColor3B)(v2 | (unsigned __int16)(v4 << 8) | (v3 << 16));
}
v3 = 0;
v4 = 127;
goto LABEL_16;
}
v3 = -1;
v4 = -81;
v2 = 75;
return (cocos2d::ccColor3B)(v2 | (unsigned __int16)(v4 << 8) | (v3 << 16));
}