Author: cazfi
Date: Thu Jun 30 19:48:50 2016
New Revision: 33128

URL: http://svn.gna.org/viewcvs/freeciv?rev=33128&view=rev
Log:
Turned phase_mode to specenum.

See patch #7333

Modified:
    trunk/common/fc_types.h
    trunk/common/networking/packets.def

Modified: trunk/common/fc_types.h
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/fc_types.h?rev=33128&r1=33127&r2=33128&view=diff
==============================================================================
--- trunk/common/fc_types.h     (original)
+++ trunk/common/fc_types.h     Thu Jun 30 19:48:50 2016
@@ -593,11 +593,15 @@
 #include "specenum_gen.h"
 
 /* Used in the network protocol. */
-enum phase_mode_types {
-  PMT_CONCURRENT = 0,
-  PMT_PLAYERS_ALTERNATE,
-  PMT_TEAMS_ALTERNATE
-};
+/* Numerical values used in savegames */
+#define SPECENUM_NAME phase_mode_type
+#define SPECENUM_VALUE0 PMT_CONCURRENT
+#define SPECENUM_VALUE0NAME "Concurrent"
+#define SPECENUM_VALUE1 PMT_PLAYERS_ALTERNATE
+#define SPECENUM_VALUE1NAME "Players Alternate"
+#define SPECENUM_VALUE2 PMT_TEAMS_ALTERNATE
+#define SPECENUM_VALUE2NAME "Teams Alternate"
+#include "specenum_gen.h"
 
 /* Phase mode change has changed meaning of the phase numbers */
 #define PHASE_INVALIDATED -1

Modified: trunk/common/networking/packets.def
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/networking/packets.def?rev=33128&r1=33127&r2=33128&view=diff
==============================================================================
--- trunk/common/networking/packets.def (original)
+++ trunk/common/networking/packets.def Thu Jun 30 19:48:50 2016
@@ -232,7 +232,7 @@
 type KNOWN              = uint8(enum known_type)
 type MOOD               = uint8(enum mood_type)
 type ORDERS             = uint8(enum unit_orders)
-type PHASE_MODE         = uint8(enum phase_mode_types)
+type PHASE_MODE         = uint8(enum phase_mode_type)
 type PLACE_TYPE         = uint8(enum spaceship_place_type)
 type REPORT_TYPE        = uint8(enum report_type)
 type SSET_CLASS         = uint8(enum sset_class)


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to