{"type": "func", "start": 4296188620, "end": 4296188712, "name": "CharacterColorPage::activeColorForMode", "pseudocode": "// \n// CharacterColorPage::activeColorForMode from 0x10012a2cc to 0x10012a328 (92 bytes)\n// \n// 1 xrefs:\n// > CharacterColorPage::onPlayerColor @ 0x10012a104\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 CharacterColorPage::activeColorForMode(CharacterColorPage *a1, int a2)\n{\n  GameManager *v2; // x0\n  int random; // w8\n  int seed; // w9\n  GameManager *v5; // x0\n  GameManager *v6; // x0\n\n  switch ( a2 )\n  {\n    case 2:\n      v6 = GameManager::sharedState();\n      random = v6->m_playerGlowColor.random;\n      seed = v6->m_playerGlowColor.seed;\n      return random - seed;\n    case 1:\n      v5 = GameManager::sharedState();\n      random = v5->m_playerColor2.random;\n      seed = v5->m_playerColor2.seed;\n      return random - seed;\n    case 0:\n      v2 = GameManager::sharedState();\n      random = v2->m_playerColor.random;\n      seed = v2->m_playerColor.seed;\n      return random - seed;\n  }\n  return 0;\n}", "assembly": "; \n; CharacterColorPage::activeColorForMode from 0x10012a2cc to 0x10012a328 (92 bytes)\n; \n; 1 xrefs:\n; > CharacterColorPage::onPlayerColor @ 0x10012a104\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\nSTP             X29, X30, [SP,#-0x10+var_s0]!                          ; +0x0, 0x10012a2cc\nMOV             X29, SP                                                ; +0x4, 0x10012a2d0\nCMP             W1, #2                                                 ; +0x8, 0x10012a2d4\nB.EQ            loc_10012A308                                          ; +0xc, 0x10012a2d8\nCMP             W1, #1                                                 ; +0x10, 0x10012a2dc\nB.EQ            loc_10012A2F8                                          ; +0x14, 0x10012a2e0\nCBNZ            W1, loc_10012A31C                                      ; +0x18, 0x10012a2e4\nBL              GameManager__sharedState                               ; +0x1c, 0x10012a2e8\nLDR             W8, [X0,#0x304]                                        ; +0x20, 0x10012a2ec\nLDR             W9, [X0,#0x308]                                        ; +0x24, 0x10012a2f0\nB               loc_10012A314                                          ; +0x28, 0x10012a2f4\nBL              GameManager__sharedState                               ; +0x2c, 0x10012a2f8\nLDR             W8, [X0,#0x310]                                        ; +0x30, 0x10012a2fc\nLDR             W9, [X0,#0x314]                                        ; +0x34, 0x10012a300\nB               loc_10012A314                                          ; +0x38, 0x10012a304\nBL              GameManager__sharedState                               ; +0x3c, 0x10012a308\nLDR             W8, [X0,#0x31C]                                        ; +0x40, 0x10012a30c\nLDR             W9, [X0,#0x320]                                        ; +0x44, 0x10012a310\nSUB             W0, W8, W9                                             ; +0x48, 0x10012a314\nB               loc_10012A320                                          ; +0x4c, 0x10012a318\nMOV             W0, #0                                                 ; +0x50, 0x10012a31c\nLDP             X29, X30, [SP+var_s0],#0x10                            ; +0x54, 0x10012a320\nRET                                                                    ; +0x58, 0x10012a324", "xrefs": ["CharacterColorPage::onPlayerColor @ 0x10012a104"], "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"}