Use int instead of long for flags

As long as symbol_by_value(), show_capab() and togg() support only
int, flags need to fit into int.

Not a problem in practice, because no machine capable of running
Empire has int narrower than 32 bits, and 32 bits suffice.

Some flags members are long instead of int: struct lchrstr member
l_flags, struct natstr member nat_flags, struct mchrstr member m_flags
are long.  Waste of space on machines with long wider than int.
Change them to int.

Rearrange struct lchrstr and struct natstr to avoid holes.
This commit is contained in:
Markus Armbruster 2013-01-13 14:11:43 +01:00
parent 77f8846273
commit e51b3fb842
9 changed files with 379 additions and 379 deletions

View file

@ -31,7 +31,7 @@
* Thomas Ruschak, 1992
* Ken Stevens, 1995
* Steve McClure, 1998
* Markus Armbruster, 2004-2010
* Markus Armbruster, 2004-2013
*/
#ifndef SHIP_H
@ -116,7 +116,7 @@ struct mchrstr {
char *m_name; /* full name of type of ship */
int m_tech; /* tech required to build */
int m_cost; /* how much it costs to build */
long m_flags; /* what special things can this ship do */
int m_flags; /* what special things can this ship do */
unsigned char m_nplanes; /* maximum number of planes this ship holds */
unsigned char m_nland; /* maximum number of units this ship holds */
signed char m_type; /* index in mchr[] */