//
// GameManager::activeIconForType from 0x3223d4 to 0x322486 (178 bytes)
//
// 3 xrefs:
// > GJGarageLayer::getItems @ 0x405d5c
// > GJGarageLayer::setupPage @ 0x406192
// > GJGarageLayer::onArrow @ 0x4065ae
//
// 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 GameManager::activeIconForType(GameManager *a1, IconType a2)
{
int random; // r3
int seed; // r0
if ( a2 == Robot )
{
random = a1->m_playerRobot.random;
seed = a1->m_playerRobot.seed;
return random - seed;
}
if ( (unsigned int)a2 <= Robot )
{
if ( a2 == Ball )
{
random = a1->m_playerBall.random;
seed = a1->m_playerBall.seed;
}
else if ( (unsigned int)a2 > Ball )
{
if ( a2 == Ufo )
{
random = a1->m_playerBird.random;
seed = a1->m_playerBird.seed;
}
else
{
random = a1->m_playerDart.random;
seed = a1->m_playerDart.seed;
}
}
else if ( a2 )
{
random = a1->m_playerShip.random;
seed = a1->m_playerShip.seed;
}
else
{
random = a1->m_playerFrame.random;
seed = a1->m_playerFrame.seed;
}
return random - seed;
}
if ( a2 == Jetpack )
{
random = a1->m_playerJetpack.random;
seed = a1->m_playerJetpack.seed;
return random - seed;
}
if ( (unsigned int)a2 <= Jetpack )
{
if ( a2 == Spider )
{
random = a1->m_playerSpider.random;
seed = a1->m_playerSpider.seed;
}
else
{
random = a1->m_playerSwing.random;
seed = a1->m_playerSwing.seed;
}
return random - seed;
}
switch ( a2 )
{
case Special:
random = a1->m_playerStreak.random;
seed = a1->m_playerStreak.seed;
return random - seed;
case ShipFire:
random = a1->m_playerShipFire.random;
seed = a1->m_playerShipFire.seed;
return random - seed;
case DeathEffect:
random = a1->m_playerDeathEffect.random;
seed = a1->m_playerDeathEffect.seed;
return random - seed;
}
return 0;
}