Sectors need space for items, deliveries and distribution thresholds.

To save space, the ancients invented `variables': a collection of
key-value pairs, missing means zero value, space for `enough' keys.
This complicates the code, as assigning to a `variable' can fail for
lack of space.  Over time, `enough' increased, and for quite some time
now `variables' have been *wasting* space.  This changeset replaces
them, except in struct mchrstr, struct lchrstr and struct pchrstr,
where they are read-only, and will be replaced later.  It is only a
first step; further cleanup is required.  To simplify and minimize
this necessarily huge changeset, the new item[] arrays have an unused
slot 0, and the old variable types V_CIVIL, ... are still defined, but
must have the same values as the item types I_CIVIL, ...
This commit is contained in:
Markus Armbruster 2004-03-03 16:54:22 +00:00
parent ba86513b01
commit eccc5cb7d7
86 changed files with 853 additions and 1226 deletions

View file

@ -40,6 +40,7 @@
#include "queue.h"
#include "misc.h"
#include "retreat.h"
#include "var.h"
#define SHIP_MINEFF 20
@ -61,8 +62,6 @@
#define TMAX 6
#define MAXSHPV 12
#define MAXSHPPATH 28
#define MAXSHPNAMLEN 24
@ -94,9 +93,9 @@ struct shpstr {
short shp_lstart[TMAX]; /* How much do we pick up at the start */
short shp_lend[TMAX]; /* How much do we pick up at the end */
u_char shp_autonav; /* autonavigation flags */
s_char shp_nv; /* current number of variables */
u_char shp_vtype[MAXSHPV];
u_short shp_vamt[MAXSHPV];
u_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 */
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 */