[Freeciv-Dev] Re: (PR#6941) Mission Orders
[Top] [All Lists]
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
 
<URL: http://rt.freeciv.org/Ticket/Display.html?id=6941 >
Arnstein Lindgard wrote:
>>What about
>>something like
>>
>>struct unit_order {
>>  enum orders_type type;
>>  union {
>>    enum unit_orders order;
>>    enum unit_activity activity;
>>    enum unit_actions action;
>>    enum diplomat_actions diplomat;
>>  };
>>  enum direction8 dir;
>>}
> 
> 
> That's specific to gnu C. The union needs a name to work with C99.
> "type" is server -> client information for sprite purposes, I don't
> think the client will ever need to send that.
Hmm, I think I meant
struct unit_order {
   enum orders_type type;
   union {
     enum unit_orders order;
     enum unit_activity activity;
     enum unit_actions action;
     enum diplomat_actions diplomat;
   } order;
   enum direction8 dir;
}
Is this also illegal?  It does have a name now.
If the type doesn't need to be associated with the union, how do you 
tell which type the union is?  How do you know whether a 0 is the first 
order or the first activity?
jason
 
- [Freeciv-Dev] Re: (PR#6941) Mission Orders, Arnstein Lindgard, 2004/01/07
- [Freeciv-Dev] Re: (PR#6941) Mission Orders, Arnstein Lindgard, 2004/01/09
- [Freeciv-Dev] (PR#6941) Mission Orders 5, Arnstein Lindgard, 2004/01/28
- [Freeciv-Dev] (PR#6941) Mission Orders, Jason Short, 2004/01/28
 
- [Freeciv-Dev] Re: (PR#6941) Mission Orders, Arnstein Lindgard, 2004/01/28
 - [Freeciv-Dev] Re: (PR#6941) Mission Orders,
Jason Short <=
 - [Freeciv-Dev] Re: (PR#6941) Mission Orders, Arnstein Lindgard, 2004/01/28
 - [Freeciv-Dev] (PR#6941) Mission Orders, Guest, 2004/01/28
 
- [Freeciv-Dev] Re: (PR#6941) Mission Orders, Arnstein Lindgard, 2004/01/28
 - [Freeciv-Dev] Re: (PR#6941) Mission Orders, Jason Short, 2004/01/28
 - [Freeciv-Dev] Re: (PR#6941) Mission Orders, Raimar Falke, 2004/01/29
 
  
  
  
 
 
 | 
 |