//
// MenuGameLayer::getBGColor from 0x492240 to 0x4922ee (174 bytes)
//
// 3 xrefs:
// > MenuGameLayer::getBGColor @ 0x4922b6
// > MenuGameLayer::updateColor @ 0x492306
// > MenuGameLayer::init @ 0x493006
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 11:49:38 +0000
//
int __fastcall MenuGameLayer::getBGColor(MenuGameLayer *this, int a2)
{
GameManager *v2; // r0
int v3; // r1
int BGColor; // r0
__int16 v6; // [sp+4h] [bp-8h]
unsigned __int8 v7; // [sp+6h] [bp-6h]
switch ( a2 )
{
case 0:
v6 = 26112;
v7 = -1;
return (unsigned __int8)v6 | (unsigned __int16)(HIBYTE(v6) << 8) | (v7 << 16);
case 1:
v2 = (GameManager *)GameManager::sharedState(this);
v3 = 7;
goto LABEL_10;
case 2:
v2 = (GameManager *)GameManager::sharedState(this);
v3 = 8;
goto LABEL_10;
case 3:
v2 = (GameManager *)GameManager::sharedState(this);
v3 = 9;
goto LABEL_10;
case 4:
v2 = (GameManager *)GameManager::sharedState(this);
v3 = 10;
goto LABEL_10;
case 5:
v2 = (GameManager *)GameManager::sharedState(this);
v3 = 11;
goto LABEL_10;
case 6:
v2 = (GameManager *)GameManager::sharedState(this);
v3 = 1;
goto LABEL_10;
case 7:
v2 = (GameManager *)GameManager::sharedState(this);
v3 = 3;
LABEL_10:
BGColor = GameManager::colorForIdx(v2, v3);
break;
default:
BGColor = MenuGameLayer::getBGColor(this, a2 % 8);
break;
}
v6 = BGColor;
v7 = BYTE2(BGColor);
return (unsigned __int8)v6 | (unsigned __int16)(HIBYTE(v6) << 8) | (v7 << 16);
}