//
// GameObject::getMainColorMode from 0x1005bfca0 to 0x1005bfcbe (30 bytes)
//
// 17 xrefs:
// > EditorUI::onDelete @ 0x10002dd9c
// > EditorUI::updateCreateMenu @ 0x10002e416
// > EditorUI::updateCreateMenu @ 0x10002e5a6
// > EditorUI::enableButton @ 0x10002e962
// > EditorUI::copyObjects @ 0x100030eee
// > EditorUI::spriteFromObjectString @ 0x100034018
// > EditorUI::canSelectObject @ 0x10003c12b
// > EditorUI::selectObjects @ 0x10003c331
// > LevelEditorLayer::updateVisibility @ 0x1000eaea8
// > LevelEditorLayer::updateVisibility @ 0x1000eb1ea
// > LevelEditorLayer::updateVisibility @ 0x1000eb24f
// > LevelEditorLayer::updateObjectColors @ 0x1000eb8af
// > LevelEditorLayer::updateObjectColors @ 0x1000eb914
// > LevelEditorLayer::getNextColorChannel @ 0x1000ed6d4
// > LevelEditorLayer::resetUnusedColorChannels @ 0x1000eda34
// > GJBaseGameLayer::triggerGradientCommand @ 0x100138faa
// > GameObject::setupCustomSprites @ 0x1004463c7
//
// 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 __fastcall GameObject::getMainColorMode(GameObject *a1)
{
GJSpriteColor *m_baseColor; // rcx
int result; // eax
m_baseColor = a1->m_baseColor;
if ( !m_baseColor )
return 0;
result = m_baseColor->m_colorID;
if ( !m_baseColor->m_colorID )
return m_baseColor->m_defaultColorID;
return result;
}