//
// GameObject::shouldBlendColor from 0x35442e to 0x354492 (100 bytes)
//
// 2 xrefs:
// > GameObject::updateBlendMode @ 0x355a88
// > GameObject::updateBlendMode @ 0x355aae
//
// 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
//
bool GameObject::shouldBlendColor(GameObject *a1, GJSpriteColor *m_baseColor, bool a3)
{
_BOOL4 m_unk353; // r7
_BOOL4 m_editorEnabled; // r5
int ColorMode; // r0
int v7; // r4
GameManager *v8; // r0
GameManager *v10; // r0
m_unk353 = a1->m_unk353;
m_editorEnabled = a1->m_editorEnabled;
while ( 1 )
{
ColorMode = GJSpriteColor::getColorMode(m_baseColor);
v7 = ColorMode;
if ( m_unk353 )
{
if ( m_editorEnabled )
{
v7 = 0;
LABEL_7:
v8 = GameManager::sharedState();
return LevelEditorLayer::shouldBlend(v8->m_levelEditorLayer, v7);
}
return m_editorEnabled;
}
if ( m_editorEnabled )
goto LABEL_7;
if ( ColorMode < 1008 )
break;
if ( ColorMode != 1012 )
goto LABEL_14;
m_baseColor = a1->m_baseColor;
}
if ( ColorMode > 1004 )
{
LOBYTE(m_editorEnabled) = 1;
}
else if ( ColorMode )
{
LABEL_14:
v10 = GameManager::sharedState();
return PlayLayer::shouldBlend(v10->m_playLayer, v7);
}
return m_editorEnabled;
}