//
// MenuGameLayer::getBGColor from 0x7da028 to 0x7da12c (260 bytes)
//
// 4 xrefs:
// > MenuGameLayer::getBGColor @ 0x7da04c
// > MenuGameLayer::updateColor @ 0x7da14c
// > MenuGameLayer::init @ 0x7db028
// > ??> @ 0xfd2e8
//
// 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 12:54:23 +0000
//
unsigned __int64 __fastcall MenuGameLayer::getBGColor(MenuGameLayer *this, int a2)
{
int BGColor; // w0
GameManager *v4; // x0
GameManager *v5; // x0
GameManager *v6; // x0
GameManager *v7; // x0
GameManager *v8; // x0
GameManager *v9; // x0
GameManager *v10; // x0
__int16 v11; // [xsp+18h] [xbp+18h]
unsigned __int8 v12; // [xsp+1Ah] [xbp+1Ah]
switch ( a2 )
{
case 0:
v11 = 26112;
v12 = -1;
return (unsigned __int8)v11
| (unsigned __int64)(unsigned __int16)(HIBYTE(v11) << 8)
| ((unsigned __int64)v12 << 16);
case 1:
v6 = (GameManager *)GameManager::sharedState(this);
BGColor = GameManager::colorForIdx(v6, 7);
goto LABEL_3;
case 2:
v7 = (GameManager *)GameManager::sharedState(this);
BGColor = GameManager::colorForIdx(v7, 8);
goto LABEL_3;
case 3:
v8 = (GameManager *)GameManager::sharedState(this);
BGColor = GameManager::colorForIdx(v8, 9);
goto LABEL_3;
case 4:
v9 = (GameManager *)GameManager::sharedState(this);
BGColor = GameManager::colorForIdx(v9, 10);
goto LABEL_3;
case 5:
v10 = (GameManager *)GameManager::sharedState(this);
BGColor = GameManager::colorForIdx(v10, 11);
goto LABEL_3;
case 6:
v4 = (GameManager *)GameManager::sharedState(this);
BGColor = GameManager::colorForIdx(v4, 1);
goto LABEL_3;
case 7:
v5 = (GameManager *)GameManager::sharedState(this);
BGColor = GameManager::colorForIdx(v5, 3);
goto LABEL_3;
default:
BGColor = MenuGameLayer::getBGColor(this, a2 % 8);
LABEL_3:
v11 = BGColor;
v12 = BYTE2(BGColor);
return (unsigned __int8)v11
| (unsigned __int64)(unsigned __int16)(HIBYTE(v11) << 8)
| ((unsigned __int64)v12 << 16);
}
}