Eliminate magic numbers from C side of condition handling.

This commit is contained in:
Eric S. Raymond 2017-07-07 09:36:43 -04:00
parent 2bdf9e2803
commit 1cbc3d827b
4 changed files with 51 additions and 18 deletions

View file

@ -12,7 +12,6 @@
#define DALTLC LOC_NUGGET // alternate dwarf location
#define INVLIMIT 7 // inverntory limit (# of objects)
#define INTRANSITIVE -1 // illegal object number
#define SPECIALBASE 300 // base number of special rooms
#define GAMELIMIT 330 // base limit of turns
#define NOVICELIMIT 1000 // limit of turns for novice
#define WARNTIME 30 // late game starts at game.limit-this
@ -65,7 +64,6 @@
#define PCT(N) (randrange(100) < (N))
#define GSTONE(OBJ) ((OBJ) == EMERALD || (OBJ) == RUBY || (OBJ) == AMBER || (OBJ) == SAPPH)
#define FOREST(LOC) CNDBIT(LOC, COND_FOREST)
#define SPECIAL(LOC) ((LOC) > SPECIALBASE)
#define OUTSID(LOC) (CNDBIT(LOC, COND_ABOVE) || FOREST(LOC))
#define INDEEP(LOC) ((LOC) >= LOC_MISTHALL && !OUTSID(LOC))
#define BUG(x) bug(x, #x)