diff --git a/include/land.h b/include/land.h index a63a6cb2..9e46e61b 100644 --- a/include/land.h +++ b/include/land.h @@ -71,8 +71,8 @@ struct lndstr { u_char lnd_rad_max; /* max radius for this unit */ u_char lnd_scar; /* how experienced the unit is (not used) */ short lnd_item[I_MAX+1]; /* amount of items on board */ - u_short lnd_pstage; /* plague stage */ - u_short lnd_ptime; /* how many etus remain in this stage */ + short lnd_pstage; /* plague stage */ + short lnd_ptime; /* how many etus remain in this stage */ short lnd_land; /* pointer to transporting unit */ u_char lnd_nland; time_t lnd_access; /* Last time mob was updated (MOB_ACCESS) */ diff --git a/include/prototypes.h b/include/prototypes.h index 4162a766..2d93ad01 100644 --- a/include/prototypes.h +++ b/include/prototypes.h @@ -589,7 +589,7 @@ extern s_char *nxtitemp(struct nstr_item *, int); extern struct sctstr *nxtsctp(register struct nstr_sect *); /* plague.c */ extern void do_plague(struct sctstr *, struct natstr *, int); -extern int plague_people(struct natstr *, short *, u_short *, u_short *, int); +extern int plague_people(struct natstr *, short *, int *, int *, int); /* plane.c */ extern int prod_plane(int, int, int *, int); /* populace.c */ diff --git a/include/sect.h b/include/sect.h index 437bea90..7cd4fa1e 100644 --- a/include/sect.h +++ b/include/sect.h @@ -75,8 +75,8 @@ struct sctstr { short sct_del[I_MAX+1]; /* delivieries */ short sct_dist[I_MAX+1]; /* distribution thresholds */ short sct_mines; /* number of mines */ - u_short sct_pstage; /* plague stage */ - u_short sct_ptime; /* how many etus remain in this stage */ + short sct_pstage; /* plague stage */ + short sct_ptime; /* how many etus remain in this stage */ u_char sct_che; /* number of guerrillas */ natid sct_che_target; /* nation targeted by che */ u_short sct_fallout; diff --git a/include/ship.h b/include/ship.h index a66848da..7c4c0e62 100644 --- a/include/ship.h +++ b/include/ship.h @@ -87,8 +87,8 @@ struct shpstr { short shp_lend[TMAX]; /* How much do we pick up at the end */ u_char shp_autonav; /* autonavigation flags */ short shp_item[I_MAX+1]; /* amount of items on board */ - u_short shp_pstage; /* plague stage */ - u_short shp_ptime; /* how many etus remain in this stage */ + short shp_pstage; /* plague stage */ + short shp_ptime; /* how many etus remain in this stage */ time_t shp_access; /* Last time mob was updated (MOB_ACCESS) */ time_t shp_timestamp; /* Last time this ship was touched. */ u_char shp_mobquota; /* mobility quota */ diff --git a/src/lib/global/nsc.c b/src/lib/global/nsc.c index 4d28940a..f31bf228 100644 --- a/src/lib/global/nsc.c +++ b/src/lib/global/nsc.c @@ -103,8 +103,8 @@ struct castr sect_ca[] = { NSC_IVEC(fldoff(sctstr, sct_dist), "_dist"), NSC_IVEC(fldoff(sctstr, sct_del), "_del"), {NSC_SHORT, NSC_DEITY, 0, fldoff(sctstr, sct_mines), "mines"}, - {NSC_USHORT, NSC_DEITY, 0, fldoff(sctstr, sct_pstage), "pstage"}, - {NSC_USHORT, NSC_DEITY, 0, fldoff(sctstr, sct_ptime), "ptime"}, + {NSC_SHORT, NSC_DEITY, 0, fldoff(sctstr, sct_pstage), "pstage"}, + {NSC_SHORT, NSC_DEITY, 0, fldoff(sctstr, sct_ptime), "ptime"}, {NSC_UCHAR, NSC_DEITY, 0, fldoff(sctstr, sct_che), "che"}, {NSC_NATID, NSC_DEITY, 0, fldoff(sctstr, sct_che_target), "che_target"}, {NSC_USHORT, 0, 0, fldoff(sctstr, sct_fallout), "fallout"}, @@ -146,8 +146,8 @@ struct castr ship_ca[] = { {NSC_SHORT, 0, TMAX, fldoff(shpstr, shp_lend), "amtend"}, {NSC_UCHAR, 0, 0, fldoff(shpstr, shp_autonav), "autonav"}, NSC_IVEC(fldoff(shpstr, shp_item), ""), - {NSC_USHORT, NSC_DEITY, 0, fldoff(shpstr, shp_pstage), "pstage"}, - {NSC_USHORT, NSC_DEITY, 0, fldoff(shpstr, shp_ptime), "ptime"}, + {NSC_SHORT, NSC_DEITY, 0, fldoff(shpstr, shp_pstage), "pstage"}, + {NSC_SHORT, NSC_DEITY, 0, fldoff(shpstr, shp_ptime), "ptime"}, {NSC_TIME, 0, 0, fldoff(shpstr, shp_access), "access"}, {NSC_TIME, NSC_EXTRA, 0, fldoff(shpstr, shp_timestamp), "timestamp"}, {NSC_UCHAR, 0, 0, fldoff(shpstr, shp_mobquota), "mobquota"}, @@ -195,8 +195,8 @@ struct castr land_ca[] = { {NSC_STRINGY, 0, RET_LEN, fldoff(lndstr, lnd_rpath), "rpath"}, {NSC_UCHAR, 0, 0, fldoff(lndstr, lnd_rad_max), "react"}, NSC_IVEC(fldoff(lndstr, lnd_item), ""), - {NSC_USHORT, NSC_DEITY, 0, fldoff(lndstr, lnd_pstage), "pstage"}, - {NSC_USHORT, NSC_DEITY, 0, fldoff(lndstr, lnd_ptime), "ptime"}, + {NSC_SHORT, NSC_DEITY, 0, fldoff(lndstr, lnd_pstage), "pstage"}, + {NSC_SHORT, NSC_DEITY, 0, fldoff(lndstr, lnd_ptime), "ptime"}, {NSC_SHORT, 0, 0, fldoff(lndstr, lnd_land), "land"}, {NSC_UCHAR, NSC_EXTRA, 0, fldoff(lndstr, lnd_nland), "nland"}, {NSC_TIME, 0, 0, fldoff(lndstr, lnd_access), "access"}, diff --git a/src/lib/update/land.c b/src/lib/update/land.c index b653ef8b..8c0ff578 100644 --- a/src/lib/update/land.c +++ b/src/lib/update/land.c @@ -115,7 +115,7 @@ upd_land(struct lndstr *lp, int etus, /* build = 1, maintain = 0 */ { struct lchrstr *lcp; - u_short pstage, ptime; + int pstage, ptime; int n; int min = morale_base - (int)np->nat_level[NAT_HLEV]; int mult; diff --git a/src/lib/update/plague.c b/src/lib/update/plague.c index 7165e04b..4fd782c5 100644 --- a/src/lib/update/plague.c +++ b/src/lib/update/plague.c @@ -52,7 +52,7 @@ static int infect_people(struct natstr *, struct sctstr *); void do_plague(struct sctstr *sp, struct natstr *np, int etu) { - u_short pstage, ptime; + int pstage, ptime; int n; if (opt_NO_PLAGUE) /* no plague nothing to do */ @@ -152,7 +152,7 @@ infect_people(struct natstr *np, struct sctstr *sp) */ int plague_people(struct natstr *np, short *vec, - u_short *pstage, u_short *ptime, + int *pstage, int *ptime, int etus) { int stage; diff --git a/src/lib/update/ship.c b/src/lib/update/ship.c index c5c090ef..02328a3b 100644 --- a/src/lib/update/ship.c +++ b/src/lib/update/ship.c @@ -115,7 +115,7 @@ upd_ship(struct shpstr *sp, int etus, { struct sctstr *sectp; struct mchrstr *mp; - u_short pstage, ptime; + int pstage, ptime; int oil_gained; int max_oil; int max_food;