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:
parent
ba86513b01
commit
eccc5cb7d7
86 changed files with 853 additions and 1226 deletions
|
@ -101,6 +101,7 @@ extern void land_damage(struct lndstr *, int);
|
|||
extern void planedamage(struct plnstr *, int);
|
||||
extern int nukedamage(struct nchrstr *, int, int);
|
||||
extern int effdamage(register int, int);
|
||||
extern void item_damage(int, u_short *);
|
||||
extern int commdamage(register int, int, int);
|
||||
/* check.c */
|
||||
extern int check_sect_ok(struct sctstr *);
|
||||
|
@ -116,9 +117,7 @@ extern int blksize(int);
|
|||
extern time_t fdate(int);
|
||||
extern void filetruncate(s_char *);
|
||||
/* getvar.c */
|
||||
extern int getvar(int, s_char *, int);
|
||||
extern int getvec(int, int *, s_char *, int);
|
||||
extern int putvar(int, int, s_char *, int);
|
||||
extern int putvec(int, int *, s_char *, int);
|
||||
/* hap_fact.c */
|
||||
extern double hap_fact(struct natstr *, struct natstr *);
|
||||
|
@ -588,8 +587,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 *, register int *, register int *,
|
||||
int);
|
||||
extern int plague_people(struct natstr *, int *, u_short *, u_short *, int);
|
||||
/* plane.c */
|
||||
extern int prod_plane(int, int, int *, int);
|
||||
/* populace.c */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue