//
// GameObject::getMainColorMode from 0x64847c to 0x6484c4 (72 bytes)
//
// 17 xrefs:
// > GameObject::saveActiveColors @ 0x64aad0
// > GameObject::getColorKey @ 0x656920
// > LevelEditorLayer::updateObjectColors @ 0x65f804
// > LevelEditorLayer::updateObjectColors @ 0x65f830
// > LevelEditorLayer::updateVisibility @ 0x662d98
// > LevelEditorLayer::updateVisibility @ 0x662e88
// > LevelEditorLayer::updateVisibility @ 0x662eb4
// > LevelEditorLayer::getNextColorChannel @ 0x672c50
// > LevelEditorLayer::resetUnusedColorChannels @ 0x672ec4
// > EditorUI::enableButton @ 0x6871e0
// > EditorUI::canSelectObject @ 0x6890dc
// > EditorUI::spriteFromObjectString @ 0x6970c0
// > EditorUI::selectObjects @ 0x6be9f8
// > EditorUI::copyObjects @ 0x6c4680
// > GJBaseGameLayer::triggerGradientCommand @ 0x86c24c
// > GameObject::setupCustomSprites @ 0x9855d0
// > ??> @ 0x51db0
//
// 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
//
int GameObject::getMainColorMode(GameObject *a1)
{
GJSpriteColor *MainColor; // x0
GJSpriteColor *v2; // x1
int result; // w0
int m_defaultColorID; // w1
MainColor = GameObject::getMainColor(a1);
v2 = MainColor;
if ( !MainColor )
return 0;
result = MainColor->m_colorID;
m_defaultColorID = v2->m_defaultColorID;
if ( result == m_defaultColorID || !result )
return m_defaultColorID;
return result;
}