//
// CharacterColorPage::activeColorForMode from 0xb514c0 to 0xb51530 (112 bytes)
//
// 5 xrefs:
// > CharacterColorPage::updateColorMode @ 0xb51568
// > CharacterColorPage::updateColorMode @ 0xb51578
// > CharacterColorPage::updateColorMode @ 0xb51588
// > CharacterColorPage::onPlayerColor @ 0xb51c44
// > ??> @ 0xf1738
//
// 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 13:01:59 +0000
//
__int64 __fastcall CharacterColorPage::activeColorForMode(CharacterColorPage *this, int a2)
{
__int64 result; // x0
__int64 v3; // x0
__int64 v4; // x0
__int64 v5; // x0
if ( a2 == 1 )
{
v5 = GameManager::sharedState(this);
return (unsigned int)(*(_DWORD *)(v5 + 824) - *(_DWORD *)(v5 + 828));
}
else if ( a2 == 2 )
{
v4 = GameManager::sharedState(this);
return (unsigned int)(*(_DWORD *)(v4 + 836) - *(_DWORD *)(v4 + 840));
}
else
{
result = 0;
if ( !a2 )
{
v3 = GameManager::sharedState(nullptr);
return (unsigned int)(*(_DWORD *)(v3 + 812) - *(_DWORD *)(v3 + 816));
}
}
return result;
}