Complete.Org: Mailing Lists: Archives: freeciv-dev: June 2005:
[Freeciv-Dev] Re: (PR#13367) packets.def weirdness
Home

[Freeciv-Dev] Re: (PR#13367) packets.def weirdness

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] Re: (PR#13367) packets.def weirdness
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Tue, 28 Jun 2005 15:11:11 -0700
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=13367 >

On Tue, 28 Jun 2005, Per I. Mathisen wrote:
> The attached patch clears this up.

Found more fixes.

  - Per

Index: common/packets.def
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/packets.def,v
retrieving revision 1.138
diff -u -r1.138 packets.def
--- common/packets.def  27 Jun 2005 14:30:18 -0000      1.138
+++ common/packets.def  28 Jun 2005 22:07:12 -0000
@@ -156,6 +156,7 @@
 type SINT32            = sint32(int)
 type BOOL              = bool8(bool)
 type FLOAT             = float10000(float)
+type FLOAT10x7         = float1000000(float)
 
 # typedefs for arrays/structs
 type MEMORY            = memory(unsigned char)
@@ -187,6 +188,12 @@
 type REQ_TYPE          = uint8(enum req_source_type)
 type REQ_RANGE         = uint8(enum req_range)
 type EFFECT_TYPE       = uint8(enum effect_type)
+type BV_IMPRS          = bitvector(bv_imprs)
+type BV_FLAGS          = bitvector(bv_flags)
+type BV_ROLES          = bitvector(bv_roles)
+type BV_TERRAIN_FLAGS  = bitvector(bv_terrain_flags)
+type DIPLSTATE         = diplstate(struct player_diplstate)
+type VISION            = uint32(unsigned int)
 
 # typedefs for IDs
 type PLAYER            = UINT8
@@ -512,7 +519,7 @@
   
   WORKLIST worklist;
 
-  bitvector(bv_imprs) improvements;
+  BV_IMPRS improvements;
   CITY_MAP city_map[CITY_MAP_SIZE * CITY_MAP_SIZE];
 
   BOOL did_buy, did_sell, was_happy, airlift, diplomat_investigate;
@@ -530,7 +537,7 @@
   UINT8 size;
   BOOL happy;
   BOOL unhappy;
-  bitvector(bv_imprs) improvements;
+  BV_IMPRS improvements;
   BOOL occupied;
   UINT16 tile_trade;
 end
@@ -611,7 +618,7 @@
 PACKET_CITY_SABOTAGE_LIST=37;sc,lsend
   UNIT diplomat_id;
   CITY city_id;
-  bitvector(bv_imprs) improvements;
+  BV_IMPRS improvements;
 end
 
 /************** Player packets **********************/
@@ -639,7 +646,7 @@
   TURN nturns_idle;
   BOOL is_alive;
 
-  diplstate(struct player_diplstate) diplstates[MAX_NUM_PLAYERS + 
MAX_NUM_BARBARIANS];
+  DIPLSTATE diplstates[MAX_NUM_PLAYERS + MAX_NUM_BARBARIANS];
   
   GOLD gold;
   PERCENT tax, science,luxury;
@@ -657,7 +664,7 @@
   BOOL ai;
   UINT8 ai_skill_level;
   UINT8 barbarian_type;
-  uint32(unsigned int) gives_shared_vision;
+  VISION gives_shared_vision;
   BIT_STRING inventions[A_LAST+1];
   SINT16 love[MAX_NUM_PLAYERS + MAX_NUM_BARBARIANS];
 
@@ -945,7 +952,7 @@
 PACKET_CONN_PING_INFO=87; sc,lsend
   UINT8 connections;
   CONNECTION conn_id[MAX_NUM_CONNECTIONS:connections];
-  float1000000(float) ping_time[MAX_NUM_CONNECTIONS:connections];
+  FLOAT10x7 ping_time[MAX_NUM_CONNECTIONS:connections];
 end
 
 PACKET_CONN_PING=88;sc
@@ -1052,8 +1059,8 @@
 
   STRING helptext[MAX_LEN_PACKET];
 
-  bitvector(bv_flags) flags;
-  bitvector(bv_roles) roles;
+  BV_FLAGS flags;
+  BV_ROLES roles;
 end
 
 PACKET_RULESET_GAME=97;sc,lsend
@@ -1201,7 +1208,7 @@
 PACKET_RULESET_TERRAIN=105;sc,lsend
   TERRAIN id;
 
-  bitvector(bv_terrain_flags) flags;
+  BV_TERRAIN_FLAGS flags;
 
   STRING terrain_name[MAX_LEN_NAME];
   STRING graphic_str[MAX_LEN_NAME];

[Prev in Thread] Current Thread [Next in Thread]