#ifdef MEDIA042_S10EA_S10EB_S11E_S12E_S12G_S13FA_S13FB_S20E_S21E_G14ED_G20E_G21E_A20ED_A20E_A20F_A20G_A21E_A22E_A22G_F20E_F20J_X30J_P20JA_P20JB_I34E_I34M_A36M_A31E_A31M_A33M_A35E_A35M_F31E_F31J_X31J_P31J
void F0393_MENUS_DrawSpellAreaControls(
#ifdef MEDIA009_S10EA_S10EB_S11E_S12E_S12G_S13FA_S13FB_S20E_S21E_G14ED_G20E_G21E_A20ED_A20E_A20F_A20G_A21E_A22E_A22G
P0764_ui_ChampionIndex)
#endif
unsigned int16_t P0764_ui_ChampionIndex FINAL_SEPARATOR
{
#ifdef MEDIA009_S10EA_S10EB_S11E_S12E_S12G_S13FA_S13FB_S20E_S21E_G14ED_G20E_G21E_A20ED_A20E_A20F_A20G_A21E_A22E_A22G
        register CHAMPION* L1205_ps_Champion;
        int16_t L1206_i_Champion0CurrentHealth;
        int16_t L1207_i_Champion1CurrentHealth;
        int16_t L1208_i_Champion2CurrentHealth;
        int16_t L1209_i_Champion3CurrentHealth;
#endif
#ifdef MEDIA529_F20E_F20J_X30J_P20JA_P20JB_I34E_I34M_A36M_A31E_A31M_A33M_A35E_A35M_F31E_F31J_X31J_P31J
        REGISTER int16_t L3018_i_ZoneIndex;
        REGISTER int16_t L3019_i_ChampionIndex;
#endif


#ifdef MEDIA009_S10EA_S10EB_S11E_S12E_S12G_S13FA_S13FB_S20E_S21E_G14ED_G20E_G21E_A20ED_A20E_A20F_A20G_A21E_A22E_A22G
        L1205_ps_Champion = &M516_CHAMPIONS[P0764_ui_ChampionIndex];
        G0578_B_UseByteBoxCoordinates = C0_FALSE;
        L1206_i_Champion0CurrentHealth = M516_CHAMPIONS[0].CurrentHealth;
        L1207_i_Champion1CurrentHealth = M516_CHAMPIONS[1].CurrentHealth;
        L1208_i_Champion2CurrentHealth = M516_CHAMPIONS[2].CurrentHealth;
        L1209_i_Champion3CurrentHealth = M516_CHAMPIONS[3].CurrentHealth;
#endif
        F0077_MOUSE_EnableScreenUpdate_CPSE();
#ifdef MEDIA009_S10EA_S10EB_S11E_S12E_S12G_S13FA_S13FB_S20E_S21E_G14ED_G20E_G21E_A20ED_A20E_A20F_A20G_A21E_A22E_A22G
        M524_FillScreenBox(G0504_ai_Graphic560_Box_SpellAreaControls, C00_COLOR_BLACK);
        switch (P0764_ui_ChampionIndex) {
                case 0:
                        F0006_MAIN_HighlightScreenBox(233, 277, 42, 49);
                        F0053_TEXT_PrintToLogicalScreen(235, 48, C00_COLOR_BLACK, C04_COLOR_CYAN, L1205_ps_Champion);
                        if (G0305_ui_PartyChampionCount > 1) {
                                if (L1207_i_Champion1CurrentHealth) {
                                        F0006_MAIN_HighlightScreenBox(280, 291, 42, 48);
                                }
                                T0393002:
                                if (G0305_ui_PartyChampionCount > 2) {
                                        if (L1208_i_Champion2CurrentHealth) {
                                                F0006_MAIN_HighlightScreenBox(294, 305, 42, 48);
                                        }
                                        T0393003:
                                        if (G0305_ui_PartyChampionCount > 3) {
                                                if (L1209_i_Champion3CurrentHealth) {
                                                        F0006_MAIN_HighlightScreenBox(308, 319, 42, 48);
                                                }
                                        }
                                }
                        }
                        break;
                case 1:
                        if (L1206_i_Champion0CurrentHealth) {
                                F0006_MAIN_HighlightScreenBox(233, 244, 42, 48);
                        }
                        F0006_MAIN_HighlightScreenBox(247, 291, 42, 49);
                        F0053_TEXT_PrintToLogicalScreen(249, 48, C00_COLOR_BLACK, C04_COLOR_CYAN, L1205_ps_Champion);
                        goto T0393002;
                case 2:
                        if (L1206_i_Champion0CurrentHealth) {
                                F0006_MAIN_HighlightScreenBox(233, 244, 42, 48);
                        }
                        if (L1207_i_Champion1CurrentHealth) {
                                F0006_MAIN_HighlightScreenBox(247, 258, 42, 48);
                        }
                        F0006_MAIN_HighlightScreenBox(261, 305, 42, 49);
                        F0053_TEXT_PrintToLogicalScreen(263, 48, C00_COLOR_BLACK, C04_COLOR_CYAN, L1205_ps_Champion);
                        goto T0393003;
                case 3:
                        if (L1206_i_Champion0CurrentHealth) {
                                F0006_MAIN_HighlightScreenBox(233, 244, 42, 48);
                        }
                        if (L1207_i_Champion1CurrentHealth) {
                                F0006_MAIN_HighlightScreenBox(247, 258, 42, 48);
                        }
                        if (L1208_i_Champion2CurrentHealth) {
                                F0006_MAIN_HighlightScreenBox(261, 272, 42, 48);
                        }
                        F0006_MAIN_HighlightScreenBox(275, 319, 42, 49);
                        F0053_TEXT_PrintToLogicalScreen(277, 48, C00_COLOR_BLACK, C04_COLOR_CYAN, L1205_ps_Champion);
                        break;
        }
#endif
#ifdef MEDIA529_F20E_F20J_X30J_P20JA_P20JB_I34E_I34M_A36M_A31E_A31M_A33M_A35E_A35M_F31E_F31J_X31J_P31J
        F0733_FillZoneByIndex(C221_ZONE_SPELL_AREA_SET_MAGIC_CASTER, C00_COLOR_BLACK);
        L3018_i_ZoneIndex = (P0764_ui_ChampionIndex * 5) + C224_ZONE_SPELL_AREA_MAGIC_CASTER_TAB; /* 4 sets of 5 Zones: 4 for tabs, 1 for the name of the magic caster */
        for (L3019_i_ChampionIndex = C00_CHAMPION_FIRST; L3019_i_ChampionIndex < 4; L3019_i_ChampionIndex++) {
                if (M516_CHAMPIONS[L3019_i_ChampionIndex].CurrentHealth && (G0305_ui_PartyChampionCount > L3019_i_ChampionIndex)) {
                        F0731_InvertZone(L3018_i_ZoneIndex + L3019_i_ChampionIndex);
                }
        }
        F0650_PrintCenteredTextToScreenZone(L3018_i_ZoneIndex + 4, C00_COLOR_BLACK, C04_COLOR_CYAN, M516_CHAMPIONS[P0764_ui_ChampionIndex].Name);
#endif
        F0078_MOUSE_DisableScreenUpdate();
}
#endif
