warning and a bit of alignment-related header consolidation
This commit is contained in:
@@ -30,6 +30,8 @@ typedef struct align { /* alignment & record */
|
|||||||
#define AM_LAWFUL 4
|
#define AM_LAWFUL 4
|
||||||
|
|
||||||
#define AM_MASK 7
|
#define AM_MASK 7
|
||||||
|
/* Some altars are considered as shrines, so we need a flag. */
|
||||||
|
#define AM_SHRINE 8
|
||||||
|
|
||||||
#define AM_SPLEV_CO 3
|
#define AM_SPLEV_CO 3
|
||||||
#define AM_SPLEV_NONCO 7
|
#define AM_SPLEV_NONCO 7
|
||||||
@@ -41,4 +43,14 @@ typedef struct align { /* alignment & record */
|
|||||||
#define Align2amask(x) \
|
#define Align2amask(x) \
|
||||||
(((x) == A_NONE) ? AM_NONE : ((x) == A_LAWFUL) ? AM_LAWFUL : (x) + 2)
|
(((x) == A_NONE) ? AM_NONE : ((x) == A_LAWFUL) ? AM_LAWFUL : (x) + 2)
|
||||||
|
|
||||||
|
/* Because clearly Nethack needs more ways to specify alignment.
|
||||||
|
The Amask2msa AM_LAWFUL check needs to mask with AM_MASK to
|
||||||
|
strip off possible AM_SHRINE bit */
|
||||||
|
#define Amask2msa(x) (((x) & AM_MASK) == AM_LAWFUL ? 3 : (x) & AM_MASK)
|
||||||
|
#define Msa2amask(x) ((x) == 3 ? AM_LAWFUL : (x))
|
||||||
|
#define MSA_NONE 0 /* unaligned or multiple alignments */
|
||||||
|
#define MSA_LAWFUL 1
|
||||||
|
#define MSA_NEUTRAL 2
|
||||||
|
#define MSA_CHAOTIC 3
|
||||||
|
|
||||||
#endif /* ALIGN_H */
|
#endif /* ALIGN_H */
|
||||||
|
|||||||
@@ -182,14 +182,6 @@ struct linfo {
|
|||||||
* fountains"). This makes it also subject to player conditions (amnesia).
|
* fountains"). This makes it also subject to player conditions (amnesia).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Because clearly Nethack needs more ways to specify alignment */
|
|
||||||
#define Amask2msa(x) ((x) == 4 ? 3 : (x) &AM_MASK)
|
|
||||||
#define Msa2amask(x) ((x) == 3 ? 4 : (x))
|
|
||||||
#define MSA_NONE 0 /* unaligned or multiple alignments */
|
|
||||||
#define MSA_LAWFUL 1
|
|
||||||
#define MSA_NEUTRAL 2
|
|
||||||
#define MSA_CHAOTIC 3
|
|
||||||
|
|
||||||
/* what the player knows about a single dungeon level */
|
/* what the player knows about a single dungeon level */
|
||||||
/* initialized in mklev() */
|
/* initialized in mklev() */
|
||||||
typedef struct mapseen {
|
typedef struct mapseen {
|
||||||
|
|||||||
@@ -335,11 +335,6 @@ extern const struct symdef def_warnsyms[WARNCOUNT];
|
|||||||
#define D_TRAPPED 16
|
#define D_TRAPPED 16
|
||||||
#define D_SECRET 32 /* only used by sp_lev.c, NOT in rm-struct */
|
#define D_SECRET 32 /* only used by sp_lev.c, NOT in rm-struct */
|
||||||
|
|
||||||
/*
|
|
||||||
* Some altars are considered as shrines, so we need a flag.
|
|
||||||
*/
|
|
||||||
#define AM_SHRINE 8
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Thrones should only be looted once.
|
* Thrones should only be looted once.
|
||||||
*/
|
*/
|
||||||
|
|||||||
+2
-2
@@ -2672,8 +2672,8 @@ recalc_mapseen()
|
|||||||
struct monst *mtmp;
|
struct monst *mtmp;
|
||||||
struct cemetery *bp, **bonesaddr;
|
struct cemetery *bp, **bonesaddr;
|
||||||
struct trap *t;
|
struct trap *t;
|
||||||
unsigned i, ridx;
|
unsigned i, ridx, atmp;
|
||||||
int x, y, ltyp, count, atmp;
|
int x, y, ltyp, count;
|
||||||
|
|
||||||
/* Should not happen in general, but possible if in the process
|
/* Should not happen in general, but possible if in the process
|
||||||
* of being booted from the quest. The mapseen object gets
|
* of being booted from the quest. The mapseen object gets
|
||||||
|
|||||||
Reference in New Issue
Block a user