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:
parent
77f8846273
commit
e51b3fb842
9 changed files with 379 additions and 379 deletions
|
@ -30,7 +30,7 @@
|
|||
* Thomas Ruschak, 1992
|
||||
* Ken Stevens, 1995
|
||||
* Steve McClure, 1998
|
||||
* Markus Armbruster, 2004-2010
|
||||
* Markus Armbruster, 2004-2013
|
||||
*/
|
||||
|
||||
#ifndef LAND_H
|
||||
|
@ -100,10 +100,10 @@ struct lchrstr {
|
|||
int l_dam; /* # of guns firing */
|
||||
int l_ammo; /* firing ammu used per shot */
|
||||
int l_aaf; /* aa fire */
|
||||
int l_flags; /* what special things can this unit do */
|
||||
unsigned char l_nxlight; /* maximum number of xlight planes */
|
||||
unsigned char l_nland; /* maximum number of units */
|
||||
signed char l_type; /* index in lchr[] */
|
||||
long l_flags; /* what special things can this unit do */
|
||||
};
|
||||
|
||||
/* Land unit ability flags */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue