Author: sveinung Date: Mon Jul 4 16:42:04 2016 New Revision: 33160 URL: http://svn.gna.org/viewcvs/freeciv?rev=33160&view=rev Log: sdl2 client: explicit action probability type.
See patch #7364 Modified: trunk/client/gui-sdl2/action_dialog.c Modified: trunk/client/gui-sdl2/action_dialog.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-sdl2/action_dialog.c?rev=33160&r1=33159&r2=33160&view=diff ============================================================================== --- trunk/client/gui-sdl2/action_dialog.c (original) +++ trunk/client/gui-sdl2/action_dialog.c Mon Jul 4 16:42:04 2016 @@ -1071,7 +1071,7 @@ Add an entry for an action in the action choice dialog. **************************************************************************/ static void action_entry(const enum gen_action act, - const int *action_probabilities, + const action_probability *act_probs, const char *custom, struct unit *act_unit, struct tile *tgt_tile, @@ -1086,7 +1086,7 @@ if (act == ACTION_SPY_SABOTAGE_CITY && action_prob_possible( - action_probabilities[ACTION_SPY_TARGETED_SABOTAGE_CITY])) { + act_probs[ACTION_SPY_TARGETED_SABOTAGE_CITY])) { /* The player can select Sabotage City from the target selection dialog * of Targeted Sabotage City. */ return; @@ -1094,7 +1094,7 @@ if (act == ACTION_SPY_STEAL_TECH && action_prob_possible( - action_probabilities[ACTION_SPY_TARGETED_STEAL_TECH])) { + act_probs[ACTION_SPY_TARGETED_STEAL_TECH])) { /* The player can select Steal Tech from the target selection dialog of * Targeted Steal Tech. */ return; @@ -1107,12 +1107,12 @@ } /* Don't show disabled actions */ - if (!action_prob_possible(action_probabilities[act])) { + if (!action_prob_possible(act_probs[act])) { return; } ui_name = action_prepare_ui_name(act, "", - action_probabilities[act], custom); + act_probs[act], custom); create_active_iconlabel(pBuf, pWindow->dst, pstr, ui_name, af_map[act]); _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits