Author: sveinung Date: Fri Jun 24 12:30:49 2016 New Revision: 33011 URL: http://svn.gna.org/viewcvs/freeciv?rev=33011&view=rev Log: Move definition of special act prob values.
There is no need to have all the special action probability values in fc_types.h. Move them back to actions.h but keep the documentation with action probability's definition. See patch #7301 Modified: branches/S2_6/common/actions.h branches/S2_6/common/fc_types.h Modified: branches/S2_6/common/actions.h URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/common/actions.h?rev=33011&r1=33010&r2=33011&view=diff ============================================================================== --- branches/S2_6/common/actions.h (original) +++ branches/S2_6/common/actions.h Fri Jun 24 12:30:49 2016 @@ -184,6 +184,13 @@ bool action_prob_possible(action_probability probability); +/* Special action probability values. Documented in fc_types.h's + * definition of action_probability. */ +#define ACTPROB_IMPOSSIBLE 0 +#define ACTPROB_NA 253 +#define ACTPROB_NOT_IMPLEMENTED 254 +#define ACTPROB_NOT_KNOWN 255 + /* Reasoning about actions */ bool action_immune_government(struct government *gov, int act); Modified: branches/S2_6/common/fc_types.h URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/common/fc_types.h?rev=33011&r1=33010&r2=33011&view=diff ============================================================================== --- branches/S2_6/common/fc_types.h (original) +++ branches/S2_6/common/fc_types.h Fri Jun 24 12:30:49 2016 @@ -713,32 +713,20 @@ * internal use is needed please avoid the range from and including 0 up * to and including 255. * + * 0 ACTPROB_IMPOSSIBLE is another way of saying that the probability + * is 0%. It isn't really a special value since it is in range. + * + * 253 ACTPROB_NA indicates that no probability should exist. + * + * 254 ACTPROB_NOT_IMPLEMENTED indicates that support for finding this + * probability currently is missing. + * + * 255 ACTPROB_NOT_KNOWN indicates that the player don't know enough to + * find out. It is caused by the probability depending on a rule that + * depends on game state the player don't have access to. It may be + * possible for the player to later gain access to this game state. */ typedef int action_probability; - -/* - * ACTPROB_IMPOSSIBLE is another way of saying that the probability is 0%. - */ -#define ACTPROB_IMPOSSIBLE 0 - -/* - * The special value ACTPROB_NA indicates that no probability should exist. - */ -#define ACTPROB_NA 253 - -/* - * The special value ACTPROB_NOT_IMPLEMENTED indicates that support - * for finding this probability currently is missing. - */ -#define ACTPROB_NOT_IMPLEMENTED 254 - -/* - * The special value ACTPROB_NOT_KNOWN indicates that the player don't know - * enough to find out. It is caused by the probability depending on a rule - * that depends on game state the player don't have access to. It may be - * possible for the player to later gain access to this game state. - */ -#define ACTPROB_NOT_KNOWN 255 #ifdef __cplusplus } _______________________________________________ Freeciv-commits mailing list Freecivfirstname.lastname@example.org https://mail.gna.org/listinfo/freeciv-commits