#ifdef MEDIA141_S10EA_S10EB_S11E_S12E_S12G_S13FA_S13FB_S20E_S21E_A20ED_A20E_A20F_A20G_A21E_A22E_A22G_F20E_F20J_X30J_P20JA_P20JB_I34E_I34M_A36M_A31E_A31M_A33M_A35E_A35M_F31E_F31J_X31J_P31J
STATICFUNCTION void F0367_COMMAND_ProcessTypes12To27_ClickInChampionStatusBox(
#endif
#ifdef MEDIA351_G14ED_G20E_G21E
void F0367_COMMAND_ProcessTypes12To27_ClickInChampionStatusBox(
#endif
#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
#ifdef MEDIA009_S10EA_S10EB_S11E_S12E_S12G_S13FA_S13FB_S20E_S21E_G14ED_G20E_G21E_A20ED_A20E_A20F_A20G_A21E_A22E_A22G
P0736_ui_ChampionIndex, P0737_i_X, P0738_i_Y)
#endif
unsigned int16_t P0736_ui_ChampionIndex SEPARATOR
#ifdef MEDIA009_S10EA_S10EB_S11E_S12E_S12G_S13FA_S13FB_S20E_S21E_G14ED_G20E_G21E_A20ED_A20E_A20F_A20G_A21E_A22E_A22G
REGISTER int16_t P0737_i_X              SEPARATOR
REGISTER int16_t P0738_i_Y              FINAL_SEPARATOR
#endif
#ifdef MEDIA529_F20E_F20J_X30J_P20JA_P20JB_I34E_I34M_A36M_A31E_A31M_A33M_A35E_A35M_F31E_F31J_X31J_P31J
int16_t          P0737_i_X              SEPARATOR
int16_t          P0738_i_Y              FINAL_SEPARATOR
#endif
{
        REGISTER unsigned int16_t L1126_ui_Command;


        if (M000_INDEX_TO_ORDINAL(P0736_ui_ChampionIndex) == G0423_i_InventoryChampionOrdinal) {
                F0368_COMMAND_SetLeader(P0736_ui_ChampionIndex);
        } else {
                L1126_ui_Command = F0358_COMMAND_GetCommandFromMouseInput_CPSC(G0455_as_Graphic561_MouseInput_ChampionNamesHands, P0737_i_X, P0738_i_Y, MASK0x0002_MOUSE_LEFT_BUTTON);
                if ((L1126_ui_Command >= C016_COMMAND_SET_LEADER_CHAMPION_0) && (L1126_ui_Command <= C019_COMMAND_SET_LEADER_CHAMPION_3)) {
                        F0368_COMMAND_SetLeader(L1126_ui_Command - C016_COMMAND_SET_LEADER_CHAMPION_0);
                } else {
                        if ((L1126_ui_Command >= C020_COMMAND_CLICK_ON_SLOT_BOX_00_CHAMPION_0_STATUS_BOX_READY_HAND) && (L1126_ui_Command <= C027_COMMAND_CLICK_ON_SLOT_BOX_07_CHAMPION_3_STATUS_BOX_ACTION_HAND)) {
                                F0302_CHAMPION_ProcessCommands28To65_ClickOnSlotBox(L1126_ui_Command - C020_COMMAND_CLICK_ON_SLOT_BOX_00_CHAMPION_0_STATUS_BOX_READY_HAND);
                        }
                }
        }
}

void F0368_COMMAND_SetLeader(
#ifdef MEDIA009_S10EA_S10EB_S11E_S12E_S12G_S13FA_S13FB_S20E_S21E_G14ED_G20E_G21E_A20ED_A20E_A20F_A20G_A21E_A22E_A22G
P0739_i_ChampionIndex)
#endif
REGISTER int16_t P0739_i_ChampionIndex FINAL_SEPARATOR
{
        REGISTER CHAMPION* L1129_ps_Champion;
        REGISTER unsigned int16_t L1127_ui_LeaderIndex;
#ifdef MEDIA009_S10EA_S10EB_S11E_S12E_S12G_S13FA_S13FB_S20E_S21E_G14ED_G20E_G21E_A20ED_A20E_A20F_A20G_A21E_A22E_A22G
        REGISTER int16_t L1128_i_Unreferenced; /* BUG0_00 Useless code */
#endif


        if ((P0739_i_ChampionIndex == G0411_i_LeaderIndex) || ((P0739_i_ChampionIndex != CM1_CHAMPION_NONE) && !M516_CHAMPIONS[P0739_i_ChampionIndex].CurrentHealth)) {
                return;
        }
        if (G0411_i_LeaderIndex != CM1_CHAMPION_NONE) {
                M008_SET(M516_CHAMPIONS[L1127_ui_LeaderIndex = G0411_i_LeaderIndex].Attributes, MASK0x0200_LOAD | MASK0x0080_NAME_TITLE);
                M516_CHAMPIONS[L1127_ui_LeaderIndex].Load -= F0140_DUNGEON_GetObjectWeight(G4055_s_LeaderHandObject.Thing);
                G0411_i_LeaderIndex = CM1_CHAMPION_NONE;
                F0292_CHAMPION_DrawState(L1127_ui_LeaderIndex);
        }
        if (P0739_i_ChampionIndex == CM1_CHAMPION_NONE) {
#ifdef MEDIA029_S10EA_S10EB_S11E_S12E_S12G_S13FA_S13FB_S20E_S21E_G14ED_G20E_G21E_A20ED_A20E_A20F_A20G_A21E_A22E_A22G_F20E_F20J_X30J_P20JA_P20JB_F31E_F31J
                G0411_i_LeaderIndex = CM1_CHAMPION_NONE;
#endif
                return;
        }
        L1129_ps_Champion = &M516_CHAMPIONS[G0411_i_LeaderIndex = P0739_i_ChampionIndex];
        L1129_ps_Champion->Direction = G0308_i_PartyDirection;
        M516_CHAMPIONS[P0739_i_ChampionIndex].Load += F0140_DUNGEON_GetObjectWeight(G4055_s_LeaderHandObject.Thing);
        if (M000_INDEX_TO_ORDINAL(P0739_i_ChampionIndex) != G0299_ui_CandidateChampionOrdinal) {
                M008_SET(L1129_ps_Champion->Attributes, MASK0x0400_ICON | MASK0x0200_LOAD | MASK0x0080_NAME_TITLE);
                F0292_CHAMPION_DrawState(P0739_i_ChampionIndex);
        }
}
#endif
