//
// GameManager::activeIconForType from 0x100317640 to 0x100317750 (272 bytes)
//
// 3 xrefs:
// > GJGarageLayer::onArrow @ 0x100304a28
// > GJGarageLayer::setupPage @ 0x100304c10
// > GJGarageLayer::getItems_1 @ 0x1003058d8
//
// 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 GameManager::activeIconForType(GameManager *a1, IconType a2)
{
int result; // w0
int random; // w9
int seed; // w8
result = 0;
if ( a2 > Robot )
{
if ( a2 > 97 )
{
switch ( a2 )
{
case DeathEffect:
random = a1->m_playerDeathEffect.random;
seed = a1->m_playerDeathEffect.seed;
break;
case Special:
random = a1->m_playerStreak.random;
seed = a1->m_playerStreak.seed;
break;
case ShipFire:
random = a1->m_playerShipFire.random;
seed = a1->m_playerShipFire.seed;
break;
default:
return result;
}
}
else
{
switch ( a2 )
{
case Spider:
random = a1->m_playerSpider.random;
seed = a1->m_playerSpider.seed;
break;
case Swing:
random = a1->m_playerSwing.random;
seed = a1->m_playerSwing.seed;
break;
case Jetpack:
random = a1->m_playerJetpack.random;
seed = a1->m_playerJetpack.seed;
break;
default:
return result;
}
}
}
else if ( a2 > Ball )
{
if ( a2 == Ufo )
{
random = a1->m_playerBird.random;
seed = a1->m_playerBird.seed;
}
else if ( a2 == Wave )
{
random = a1->m_playerDart.random;
seed = a1->m_playerDart.seed;
}
else
{
random = a1->m_playerRobot.random;
seed = a1->m_playerRobot.seed;
}
}
else if ( a2 )
{
if ( a2 == Ship )
{
random = a1->m_playerShip.random;
seed = a1->m_playerShip.seed;
}
else
{
if ( a2 != Ball )
return result;
random = a1->m_playerBall.random;
seed = a1->m_playerBall.seed;
}
}
else
{
random = a1->m_playerFrame.random;
seed = a1->m_playerFrame.seed;
}
return random - seed;
}