miscellaneous objects[] macros
Replace FIRST_GEM and LAST_GEM with FIRST_REAL_GEM, LAST_REAL_GEM, FIRST_GLASS_GEM, and LAST_GLASS_GEM and define those along with objects[] rather than separately. Do the latter for FIRST_AMULET and LAST_AMULET too. Also new FIRST_SPELL and LAST_SPELL used to compute MAXSPELLS. (That value looks wrong to me, but this defines it with the same value as before. If it gets fixed, EDITLEVEL will need to be incremented.) This started as just proof of concept that extra information could be collected as objects[] gets initialized at compile time.
This commit is contained in:
@@ -529,11 +529,6 @@ struct entity {
|
||||
int ex, ey;
|
||||
};
|
||||
|
||||
/* these probably ought to be generated by makedefs, like LAST_GEM */
|
||||
#define FIRST_GEM DILITHIUM_CRYSTAL
|
||||
#define FIRST_AMULET AMULET_OF_ESP
|
||||
#define LAST_AMULET AMULET_OF_YENDOR
|
||||
|
||||
struct valuable_data {
|
||||
long count;
|
||||
int typ;
|
||||
@@ -651,7 +646,7 @@ struct repo { /* repossession context */
|
||||
|
||||
#define NUM_ROLES (13)
|
||||
struct role_filter {
|
||||
boolean roles[NUM_ROLES+1];
|
||||
boolean roles[NUM_ROLES + 1];
|
||||
short mask;
|
||||
};
|
||||
|
||||
@@ -977,7 +972,8 @@ struct instance_globals_g {
|
||||
const char *gate_str;
|
||||
|
||||
/* end.c */
|
||||
struct valuable_data gems[LAST_GEM + 1 - FIRST_GEM + 1]; /* +1 for glass */
|
||||
/* 1st +1: subtracting first from last, 2nd +1: one slot for all glass */
|
||||
struct valuable_data gems[LAST_REAL_GEM + 1 - FIRST_REAL_GEM + 1];
|
||||
|
||||
/* invent.c */
|
||||
long glyph_reset_timestamp;
|
||||
|
||||
Reference in New Issue
Block a user