{"type": "func", "start": 4298208832, "end": 4298209104, "name": "GameManager::activeIconForType", "pseudocode": "// \n// GameManager::activeIconForType from 0x100317640 to 0x100317750 (272 bytes)\n// \n// 3 xrefs:\n// > GJGarageLayer::onArrow @ 0x100304a28\n// > GJGarageLayer::setupPage @ 0x100304c10\n// > GJGarageLayer::getItems_1 @ 0x1003058d8\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\nint __fastcall GameManager::activeIconForType(GameManager *a1, IconType a2)\n{\n  int result; // w0\n  int random; // w9\n  int seed; // w8\n\n  result = 0;\n  if ( a2 > Robot )\n  {\n    if ( a2 > 97 )\n    {\n      switch ( a2 )\n      {\n        case DeathEffect:\n          random = a1->m_playerDeathEffect.random;\n          seed = a1->m_playerDeathEffect.seed;\n          break;\n        case Special:\n          random = a1->m_playerStreak.random;\n          seed = a1->m_playerStreak.seed;\n          break;\n        case ShipFire:\n          random = a1->m_playerShipFire.random;\n          seed = a1->m_playerShipFire.seed;\n          break;\n        default:\n          return result;\n      }\n    }\n    else\n    {\n      switch ( a2 )\n      {\n        case Spider:\n          random = a1->m_playerSpider.random;\n          seed = a1->m_playerSpider.seed;\n          break;\n        case Swing:\n          random = a1->m_playerSwing.random;\n          seed = a1->m_playerSwing.seed;\n          break;\n        case Jetpack:\n          random = a1->m_playerJetpack.random;\n          seed = a1->m_playerJetpack.seed;\n          break;\n        default:\n          return result;\n      }\n    }\n  }\n  else if ( a2 > Ball )\n  {\n    if ( a2 == Ufo )\n    {\n      random = a1->m_playerBird.random;\n      seed = a1->m_playerBird.seed;\n    }\n    else if ( a2 == Wave )\n    {\n      random = a1->m_playerDart.random;\n      seed = a1->m_playerDart.seed;\n    }\n    else\n    {\n      random = a1->m_playerRobot.random;\n      seed = a1->m_playerRobot.seed;\n    }\n  }\n  else if ( a2 )\n  {\n    if ( a2 == Ship )\n    {\n      random = a1->m_playerShip.random;\n      seed = a1->m_playerShip.seed;\n    }\n    else\n    {\n      if ( a2 != Ball )\n        return result;\n      random = a1->m_playerBall.random;\n      seed = a1->m_playerBall.seed;\n    }\n  }\n  else\n  {\n    random = a1->m_playerFrame.random;\n    seed = a1->m_playerFrame.seed;\n  }\n  return random - seed;\n}", "assembly": "; \n; GameManager::activeIconForType from 0x100317640 to 0x100317750 (272 bytes)\n; \n; 3 xrefs:\n; > GJGarageLayer::onArrow @ 0x100304a28\n; > GJGarageLayer::setupPage @ 0x100304c10\n; > GJGarageLayer::getItems_1 @ 0x1003058d8\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\nMOV             X8, X0                                                 ; +0x0, 0x100317640\nMOV             W0, #0                                                 ; +0x4, 0x100317644\nCMP             W1, #5                                                 ; +0x8, 0x100317648\nB.GT            loc_100317678                                          ; +0xc, 0x10031764c\nCMP             W1, #2                                                 ; +0x10, 0x100317650\nB.GT            loc_1003176A4                                          ; +0x14, 0x100317654\nCBZ             W1, loc_1003176EC                                      ; +0x18, 0x100317658\nCMP             W1, #1                                                 ; +0x1c, 0x10031765c\nB.EQ            loc_10031771C                                          ; +0x20, 0x100317660\nCMP             W1, #2                                                 ; +0x24, 0x100317664\nB.NE            locret_10031774C                                       ; +0x28, 0x100317668\nLDR             W9, [X8,#0x2BC]                                        ; +0x2c, 0x10031766c\nLDR             W8, [X8,#0x2C0]                                        ; +0x30, 0x100317670\nB               loc_100317748                                          ; +0x34, 0x100317674\nCMP             W1, #0x61 ; 'a'                                        ; +0x38, 0x100317678\nB.GT            loc_1003176C8                                          ; +0x3c, 0x10031767c\nCMP             W1, #6                                                 ; +0x40, 0x100317680\nB.EQ            loc_1003176F8                                          ; +0x44, 0x100317684\nCMP             W1, #7                                                 ; +0x48, 0x100317688\nB.EQ            loc_100317728                                          ; +0x4c, 0x10031768c\nCMP             W1, #8                                                 ; +0x50, 0x100317690\nB.NE            locret_10031774C                                       ; +0x54, 0x100317694\nLDR             W9, [X8,#0x34C]                                        ; +0x58, 0x100317698\nLDR             W8, [X8,#0x350]                                        ; +0x5c, 0x10031769c\nB               loc_100317748                                          ; +0x60, 0x1003176a0\nCMP             W1, #3                                                 ; +0x64, 0x1003176a4\nB.EQ            loc_100317704                                          ; +0x68, 0x1003176a8\nCMP             W1, #4                                                 ; +0x6c, 0x1003176ac\nB.EQ            loc_100317734                                          ; +0x70, 0x1003176b0\nCMP             W1, #5                                                 ; +0x74, 0x1003176b4\nB.NE            locret_10031774C                                       ; +0x78, 0x1003176b8\nLDR             W9, [X8,#0x2E0]                                        ; +0x7c, 0x1003176bc\nLDR             W8, [X8,#0x2E4]                                        ; +0x80, 0x1003176c0\nB               loc_100317748                                          ; +0x84, 0x1003176c4\nCMP             W1, #0x62 ; 'b'                                        ; +0x88, 0x1003176c8\nB.EQ            loc_100317710                                          ; +0x8c, 0x1003176cc\nCMP             W1, #0x63 ; 'c'                                        ; +0x90, 0x1003176d0\nB.EQ            loc_100317740                                          ; +0x94, 0x1003176d4\nCMP             W1, #0x65 ; 'e'                                        ; +0x98, 0x1003176d8\nB.NE            locret_10031774C                                       ; +0x9c, 0x1003176dc\nLDR             W9, [X8,#0x334]                                        ; +0xa0, 0x1003176e0\nLDR             W8, [X8,#0x338]                                        ; +0xa4, 0x1003176e4\nB               loc_100317748                                          ; +0xa8, 0x1003176e8\nLDR             W9, [X8,#0x2A4]                                        ; +0xac, 0x1003176ec\nLDR             W8, [X8,#0x2A8]                                        ; +0xb0, 0x1003176f0\nB               loc_100317748                                          ; +0xb4, 0x1003176f4\nLDR             W9, [X8,#0x2EC]                                        ; +0xb8, 0x1003176f8\nLDR             W8, [X8,#0x2F0]                                        ; +0xbc, 0x1003176fc\nB               loc_100317748                                          ; +0xc0, 0x100317700\nLDR             W9, [X8,#0x2C8]                                        ; +0xc4, 0x100317704\nLDR             W8, [X8,#0x2CC]                                        ; +0xc8, 0x100317708\nB               loc_100317748                                          ; +0xcc, 0x10031770c\nLDR             W9, [X8,#0x340]                                        ; +0xd0, 0x100317710\nLDR             W8, [X8,#0x344]                                        ; +0xd4, 0x100317714\nB               loc_100317748                                          ; +0xd8, 0x100317718\nLDR             W9, [X8,#0x2B0]                                        ; +0xdc, 0x10031771c\nLDR             W8, [X8,#0x2B4]                                        ; +0xe0, 0x100317720\nB               loc_100317748                                          ; +0xe4, 0x100317724\nLDR             W9, [X8,#0x2F8]                                        ; +0xe8, 0x100317728\nLDR             W8, [X8,#0x2FC]                                        ; +0xec, 0x10031772c\nB               loc_100317748                                          ; +0xf0, 0x100317730\nLDR             W9, [X8,#0x2D4]                                        ; +0xf4, 0x100317734\nLDR             W8, [X8,#0x2D8]                                        ; +0xf8, 0x100317738\nB               loc_100317748                                          ; +0xfc, 0x10031773c\nLDR             W9, [X8,#0x328]                                        ; +0x100, 0x100317740\nLDR             W8, [X8,#0x32C]                                        ; +0x104, 0x100317744\nSUB             W0, W9, W8                                             ; +0x108, 0x100317748\nRET                                                                    ; +0x10c, 0x10031774c", "xrefs": ["GJGarageLayer::onArrow @ 0x100304a28", "GJGarageLayer::setupPage @ 0x100304c10", "GJGarageLayer::getItems_1 @ 0x1003058d8"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}