#define AM_LAWFUL 4
#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_NONCO 7
#define Align2amask(x) \
(((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 */
* 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 */
/* initialized in mklev() */
typedef struct mapseen {
#define D_TRAPPED 16
#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.
*/
struct monst *mtmp;
struct cemetery *bp, **bonesaddr;
struct trap *t;
- unsigned i, ridx;
- int x, y, ltyp, count, atmp;
+ unsigned i, ridx, atmp;
+ int x, y, ltyp, count;
/* Should not happen in general, but possible if in the process
* of being booted from the quest. The mapseen object gets