baalz hack fixup fix...
[aNetHack.git] / include / align.h
blob53e7a4b60e41900139c0b1976e0f8791f7276b9b
1 /* NetHack 3.6 align.h $NHDT-Date: 1432512779 2015/05/25 00:12:59 $ $NHDT-Branch: master $:$NHDT-Revision: 1.8 $ */
2 /* Copyright (c) Mike Stephenson, Izchak Miller 1991. */
3 /* NetHack may be freely redistributed. See license for details. */
5 #ifndef ALIGN_H
6 #define ALIGN_H
8 typedef schar aligntyp; /* basic alignment type */
10 typedef struct align { /* alignment & record */
11 aligntyp type;
12 int record;
13 } align;
15 /* bounds for "record" -- respect initial alignments of 10 */
16 #define ALIGNLIM (10L + (moves / 200L))
18 #define A_NONE (-128) /* the value range of type */
20 #define A_CHAOTIC (-1)
21 #define A_NEUTRAL 0
22 #define A_LAWFUL 1
24 #define A_COALIGNED 1
25 #define A_OPALIGNED (-1)
27 #define AM_NONE 0
28 #define AM_CHAOTIC 1
29 #define AM_NEUTRAL 2
30 #define AM_LAWFUL 4
32 #define AM_MASK 7
34 #define AM_SPLEV_CO 3
35 #define AM_SPLEV_NONCO 7
37 #define Amask2align(x) \
38 ((aligntyp)((!(x)) ? A_NONE : ((x) == AM_LAWFUL) ? A_LAWFUL \
39 : ((int) x) - 2))
40 #define Align2amask(x) \
41 (((x) == A_NONE) ? AM_NONE : ((x) == A_LAWFUL) ? AM_LAWFUL : (x) + 2)
43 #endif /* ALIGN_H */