Author: sveinung
Date: Fri Jun 24 12:29:08 2016
New Revision: 33007

URL: http://svn.gna.org/viewcvs/freeciv?rev=33007&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:
    trunk/common/actions.h
    trunk/common/fc_types.h

Modified: trunk/common/actions.h
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/actions.h?rev=33007&r1=33006&r2=33007&view=diff
==============================================================================
--- trunk/common/actions.h      (original)
+++ trunk/common/actions.h      Fri Jun 24 12:29:08 2016
@@ -375,6 +375,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
+
 bool
 action_actor_utype_hard_reqs_ok(const enum gen_action wanted_action,
                                 const struct unit_type *actor_unittype);

Modified: trunk/common/fc_types.h
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/fc_types.h?rev=33007&r1=33006&r2=33007&view=diff
==============================================================================
--- trunk/common/fc_types.h     (original)
+++ trunk/common/fc_types.h     Fri Jun 24 12:29:08 2016
@@ -758,32 +758,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
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to