{"type": "func", "start": 5372639264, "end": 5372639421, "name": "GJSpecialColorSelect::textForColorIdx", "pseudocode": "// \n// GJSpecialColorSelect::textForColorIdx from 0x1403bf820 to 0x1403bf8bd (157 bytes)\n// \n// 24 xrefs:\n// > ColorSelectLiveOverlay::updateColorLabel @ 0x140126680\n// > ColorSelectPopup::updateTextInputLabel @ 0x14012c392\n// > ColorSelectPopup::colorSelectClosed @ 0x14012c6eb\n// > ColorSelectPopup::colorSelectClosed @ 0x14012c7a0\n// > ColorSelectPopup::updateCopyColorTextInputLabel @ 0x14012cb22\n// > CustomizeObjectLayer::onPaste @ 0x14014220a\n// > CustomizeObjectLayer::colorSetupClosed @ 0x1401424d6\n// > CustomizeObjectLayer::onNextColorChannel @ 0x1401430ad\n// > CustomizeObjectLayer::onSelectMode @ 0x1401432bc\n// > CustomizeObjectLayer::onUpdateCustomColor @ 0x140143762\n// > CustomizeObjectLayer::textChanged @ 0x140143aae\n// > CustomizeObjectLayer::onSelectColor @ 0x140143ea2\n// > EditorUI::updateObjectInfoLabel @ 0x1401af269\n// > EditorUI::updateObjectInfoLabel @ 0x1401af2b7\n// > EditorUI::setIDPopupClosed @ 0x1401b133e\n// > ColorChannelSprite::updateCopyLabel @ 0x140362f9b\n// > SetColorIDPopup::init @ 0x1403a64b9\n// > SetColorIDPopup::colorSelectClosed @ 0x1403a65f6\n// > GJSpecialColorSelect::init @ 0x1403bf467\n// > LevelEditorLayer::updateObjectLabel @ 0x1403f4910\n// > SetupPulsePopup::colorSelectClosed @ 0x1405d11cb\n// > SetupPulsePopup::colorSelectClosed @ 0x1405d1274\n// > SetupPulsePopup::updateTextInputLabel @ 0x1405d26a2\n// > SetupPulsePopup::updateCopyColorTextInputLabel @ 0x1405d27b2\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 11:31:28 +0000\n// \n\nconst char *__fastcall GJSpecialColorSelect::textForColorIdx(int a1)\n{\n  const char *result; // rax\n\n  switch ( a1 )\n  {\n    case 1000:\n      result = \"BG\";\n      break;\n    case 1001:\n      result = \"G1\";\n      break;\n    case 1002:\n      result = \"L\";\n      break;\n    case 1003:\n      result = \"3DL\";\n      break;\n    case 1004:\n      result = \"Obj\";\n      break;\n    case 1005:\n      result = (const char *)&word_1407724A4;\n      break;\n    case 1006:\n      result = (const char *)&word_1407724A0;\n      break;\n    case 1007:\n      result = \"LBG\";\n      break;\n    case 1009:\n      result = \"G2\";\n      break;\n    case 1010:\n      result = \"Black\";\n      break;\n    case 1011:\n      result = \"White\";\n      break;\n    case 1012:\n      result = \"Lighter\";\n      break;\n    case 1013:\n      result = \"MG\";\n      break;\n    case 1014:\n      result = \"MG2\";\n      break;\n    default:\n      result = (const char *)&word_14070E1CC;\n      break;\n  }\n  return result;\n}", "assembly": "; \n; GJSpecialColorSelect::textForColorIdx from 0x1403bf820 to 0x1403bf8bd (157 bytes)\n; \n; 24 xrefs:\n; > ColorSelectLiveOverlay::updateColorLabel @ 0x140126680\n; > ColorSelectPopup::updateTextInputLabel @ 0x14012c392\n; > ColorSelectPopup::colorSelectClosed @ 0x14012c6eb\n; > ColorSelectPopup::colorSelectClosed @ 0x14012c7a0\n; > ColorSelectPopup::updateCopyColorTextInputLabel @ 0x14012cb22\n; > CustomizeObjectLayer::onPaste @ 0x14014220a\n; > CustomizeObjectLayer::colorSetupClosed @ 0x1401424d6\n; > CustomizeObjectLayer::onNextColorChannel @ 0x1401430ad\n; > CustomizeObjectLayer::onSelectMode @ 0x1401432bc\n; > CustomizeObjectLayer::onUpdateCustomColor @ 0x140143762\n; > CustomizeObjectLayer::textChanged @ 0x140143aae\n; > CustomizeObjectLayer::onSelectColor @ 0x140143ea2\n; > EditorUI::updateObjectInfoLabel @ 0x1401af269\n; > EditorUI::updateObjectInfoLabel @ 0x1401af2b7\n; > EditorUI::setIDPopupClosed @ 0x1401b133e\n; > ColorChannelSprite::updateCopyLabel @ 0x140362f9b\n; > SetColorIDPopup::init @ 0x1403a64b9\n; > SetColorIDPopup::colorSelectClosed @ 0x1403a65f6\n; > GJSpecialColorSelect::init @ 0x1403bf467\n; > LevelEditorLayer::updateObjectLabel @ 0x1403f4910\n; > SetupPulsePopup::colorSelectClosed @ 0x1405d11cb\n; > SetupPulsePopup::colorSelectClosed @ 0x1405d1274\n; > SetupPulsePopup::updateTextInputLabel @ 0x1405d26a2\n; > SetupPulsePopup::updateCopyColorTextInputLabel @ 0x1405d27b2\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 11:31:28 +0000\n; \nadd     ecx, 0FFFFFC18h; switch 15 cases                               ; +0x0, 0x1403bf820\ncmp     ecx, 0Eh                                                       ; +0x6, 0x1403bf826\nja      def_1403BF843; jumptable 00000001403BF843 default case, case 1008 ; +0x9, 0x1403bf829\nmovsxd  rax, ecx                                                       ; +0xf, 0x1403bf82f\nlea     rdx, cs:140000000h                                             ; +0x12, 0x1403bf832\nmov     ecx, ds:(jpt_1403BF843 - 140000000h)[rdx+rax*4]                ; +0x19, 0x1403bf839\nadd     rcx, rdx                                                       ; +0x20, 0x1403bf840\njmp     rcx; switch jump                                               ; +0x23, 0x1403bf843\nlea     rax, aBg; jumptable 00000001403BF843 case 1000                 ; +0x25, 0x1403bf845\nretn                                                                   ; +0x2c, 0x1403bf84c\nlea     rax, aG1; jumptable 00000001403BF843 case 1001                 ; +0x2d, 0x1403bf84d\nretn                                                                   ; +0x34, 0x1403bf854\nlea     rax, aG2; jumptable 00000001403BF843 case 1009                 ; +0x35, 0x1403bf855\nretn                                                                   ; +0x3c, 0x1403bf85c\nlea     rax, asc_140754338; jumptable 00000001403BF843 case 1002       ; +0x3d, 0x1403bf85d\nretn                                                                   ; +0x44, 0x1403bf864\nlea     rax, aObj; jumptable 00000001403BF843 case 1004                ; +0x45, 0x1403bf865\nretn                                                                   ; +0x4c, 0x1403bf86c\nlea     rax, a3dl; jumptable 00000001403BF843 case 1003                ; +0x4d, 0x1403bf86d\nretn                                                                   ; +0x54, 0x1403bf874\nlea     rax, word_1407724A4; jumptable 00000001403BF843 case 1005      ; +0x55, 0x1403bf875\nretn                                                                   ; +0x5c, 0x1403bf87c\nlea     rax, word_1407724A0; jumptable 00000001403BF843 case 1006      ; +0x5d, 0x1403bf87d\nretn                                                                   ; +0x64, 0x1403bf884\nlea     rax, aLbg; jumptable 00000001403BF843 case 1007                ; +0x65, 0x1403bf885\nretn                                                                   ; +0x6c, 0x1403bf88c\nlea     rax, aLighter; jumptable 00000001403BF843 case 1012            ; +0x6d, 0x1403bf88d\nretn                                                                   ; +0x74, 0x1403bf894\nlea     rax, aWhite; jumptable 00000001403BF843 case 1011              ; +0x75, 0x1403bf895\nretn                                                                   ; +0x7c, 0x1403bf89c\nlea     rax, aBlack; jumptable 00000001403BF843 case 1010              ; +0x7d, 0x1403bf89d\nretn                                                                   ; +0x84, 0x1403bf8a4\nlea     rax, aMg; jumptable 00000001403BF843 case 1013                 ; +0x85, 0x1403bf8a5\nretn                                                                   ; +0x8c, 0x1403bf8ac\nlea     rax, aMg2; jumptable 00000001403BF843 case 1014                ; +0x8d, 0x1403bf8ad\nretn                                                                   ; +0x94, 0x1403bf8b4\nlea     rax, word_14070E1CC; jumptable 00000001403BF843 default case, case 1008 ; +0x95, 0x1403bf8b5\nretn                                                                   ; +0x9c, 0x1403bf8bc", "xrefs": ["ColorSelectLiveOverlay::updateColorLabel @ 0x140126680", "ColorSelectPopup::updateTextInputLabel @ 0x14012c392", "ColorSelectPopup::colorSelectClosed @ 0x14012c6eb", "ColorSelectPopup::colorSelectClosed @ 0x14012c7a0", "ColorSelectPopup::updateCopyColorTextInputLabel @ 0x14012cb22", "CustomizeObjectLayer::onPaste @ 0x14014220a", "CustomizeObjectLayer::colorSetupClosed @ 0x1401424d6", "CustomizeObjectLayer::onNextColorChannel @ 0x1401430ad", "CustomizeObjectLayer::onSelectMode @ 0x1401432bc", "CustomizeObjectLayer::onUpdateCustomColor @ 0x140143762", "CustomizeObjectLayer::textChanged @ 0x140143aae", "CustomizeObjectLayer::onSelectColor @ 0x140143ea2", "EditorUI::updateObjectInfoLabel @ 0x1401af269", "EditorUI::updateObjectInfoLabel @ 0x1401af2b7", "EditorUI::setIDPopupClosed @ 0x1401b133e", "ColorChannelSprite::updateCopyLabel @ 0x140362f9b", "SetColorIDPopup::init @ 0x1403a64b9", "SetColorIDPopup::colorSelectClosed @ 0x1403a65f6", "GJSpecialColorSelect::init @ 0x1403bf467", "LevelEditorLayer::updateObjectLabel @ 0x1403f4910", "SetupPulsePopup::colorSelectClosed @ 0x1405d11cb", "SetupPulsePopup::colorSelectClosed @ 0x1405d1274", "SetupPulsePopup::updateTextInputLabel @ 0x1405d26a2", "SetupPulsePopup::updateCopyColorTextInputLabel @ 0x1405d27b2"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}