Extend the common header of struct empobj to include uid

Make sure all members of unit empobj_storage share uid in addition to
ef_type.

Add matching uid member to struct gamestr, struct natstr and struct
sctstr, and set them.

Swap struct empobj members uid and own to make that easier, and update
struct comstr, struct lndstr, struct lonstr, struct loststr, struct
nwsstr, struct nukstr, struct plnstr, struct realmstr, struct shpstr,
struct trdstr, struct trtstr accordingly.

Note that the uid isn't properly set for struct nwsstr, struct lonstr,
struct trdstr, struct comstr and struct loststr.  To be fixed.
This commit is contained in:
Markus Armbruster 2008-02-25 08:23:19 +01:00
parent aef790f7f3
commit 49780e2c6c
19 changed files with 32 additions and 17 deletions

View file

@ -44,8 +44,8 @@
struct sctstr {
/* initial part must match struct empobj */
short ef_type;
short sct_uid; /* equals sctoff(sct_x, sct_y) */
natid sct_own; /* owner's country num */
short sct_elev; /* elevation/depth */
coord sct_x; /* x coord of sector */
coord sct_y; /* y coord of sector */
signed char sct_type; /* sector type */
@ -62,7 +62,7 @@ struct sctstr {
coord sct_dist_y;
short sct_avail; /* available workforce for "other things" */
short sct_flags; /* temporary flags */
short sct_fill; /* gunk */
short sct_elev; /* elevation/depth */
unsigned char sct_work; /* pct of civ actually working */
unsigned char sct_coastal; /* is this a coastal sector? */
signed char sct_newtype; /* for changing designations */