#ifndef BUDG_H
#define BUDG_H
+#define SCT_EFFIC (SCT_TYPE_MAX + 1)
+
void fill_update_array(int *bp, struct sctstr *sp);
int gt_bg_nmbr(int *bp, struct sctstr *sp, i_type comm);
void pt_bg_nmbr(int *bp, struct sctstr *sp, i_type comm, int amount);
#define SCT_BTOWER 33 /* Bridge tower */
#define SCT_MAXDEF 33 /* highest sector type in header files */
-#define SCT_EFFIC 34 /* used in update & budget */
+#define SCT_TYPE_MAX 39
#define getsect(x, y, p) ef_read(EF_SECTOR, sctoff((x), (y)), (p))
#define putsect(p) ef_write(EF_SECTOR, sctoff((p)->sct_x, (p)->sct_y), (p))
/* things relating to sectors */
extern int sctoff(coord x, coord y);
-extern struct dchrstr dchr[SCT_MAXDEF + 2];
+extern struct dchrstr dchr[SCT_TYPE_MAX + 1];
extern struct dchrstr bigcity_dchr;
#define IS_BIG_CITY(type) (dchr[(type)].d_pkg == UPKG)
/*
* Table of sector designations
* Initialized on startup from sect.config and deity custom config (if any).
+ * Terminated by a sentinel with null d_name.
*/
-struct dchrstr dchr[SCT_MAXDEF + 2];
+struct dchrstr dchr[SCT_TYPE_MAX + 1];
/*
* Table of infrastructure types