dumplog's saved_plines[]
[aNetHack.git] / include / botl.h
blob061d6c716a61f8ef74d4b57aaff467951d35f9fb
1 /* NetHack 3.6 botl.h $NHDT-Date: 1452660165 2016/01/13 04:42:45 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.15 $ */
2 /* Copyright (c) Michael Allison, 2003 */
3 /* NetHack may be freely redistributed. See license for details. */
5 #ifndef BOTL_H
6 #define BOTL_H
8 /* MAXCO must hold longest uncompressed status line, and must be larger
9 * than COLNO
11 * longest practical second status line at the moment is
12 Astral Plane \GXXXXNNNN:123456 HP:1234(1234) Pw:1234(1234) AC:-127
13 Xp:30/123456789 T:123456 Stone Slime Strngl FoodPois TermIll
14 Satiated Overloaded Blind Deaf Stun Conf Hallu Lev Ride
15 * -- or about 185 characters. '$' gets encoded even when it
16 * could be used as-is. The first five status conditions are fatal
17 * so it's rare to have more than one at a time.
19 * When the full line is wider than the map, the basic status line
20 * formatting will move less important fields to the end, so if/when
21 * truncation is necessary, it will chop off the least significant
22 * information.
24 #if COLNO <= 160
25 #define MAXCO 200
26 #else
27 #define MAXCO (COLNO + 40)
28 #endif
30 #ifdef STATUS_VIA_WINDOWPORT
31 #if 0
32 /* clang-format off */
33 #define BL_FLUSH -1
34 #define BL_TITLE 0
35 #define BL_STR 1
36 #define BL_DX 2
37 #define BL_CO 3
38 #define BL_IN 4
39 #define BL_WI 5
40 #define BL_CH 6
41 #define BL_ALIGN 7
42 #define BL_SCORE 8
43 #define BL_CAP 9
44 #define BL_GOLD 10
45 #define BL_ENE 11
46 #define BL_ENEMAX 12
47 #define BL_XP 13
48 #define BL_AC 14
49 #define BL_HD 15
50 #define BL_TIME 16
51 #define BL_HUNGER 17
52 #define BL_HP 18
53 #define BL_HPMAX 19
54 #define BL_LEVELDESC 20
55 #define BL_EXP 21
56 #define BL_CONDITION 22
57 /* clang-format on */
59 #else
60 enum statusfields { BL_FLUSH = -1, BL_TITLE = 0, BL_STR, BL_DX, BL_CO, BL_IN,
61 BL_WI, BL_CH, BL_ALIGN, BL_SCORE, BL_CAP, BL_GOLD, BL_ENE, BL_ENEMAX,
62 BL_XP, BL_AC, BL_HD, BL_TIME, BL_HUNGER, BL_HP, BL_HPMAX, BL_LEVELDESC,
63 BL_EXP, BL_CONDITION };
64 #endif
65 #define MAXBLSTATS BL_CONDITION+1
67 #define BEFORE 0
68 #define NOW 1
70 /* Boolean condition bits for the condition mask */
72 /* clang-format off */
73 #define BL_MASK_STONE 0x00000001L
74 #define BL_MASK_SLIME 0x00000002L
75 #define BL_MASK_STRNGL 0x00000004L
76 #define BL_MASK_FOODPOIS 0x00000008L
77 #define BL_MASK_TERMILL 0x00000010L
78 #define BL_MASK_BLIND 0x00000020L
79 #define BL_MASK_DEAF 0x00000040L
80 #define BL_MASK_STUN 0x00000080L
81 #define BL_MASK_CONF 0x00000100L
82 #define BL_MASK_HALLU 0x00000200L
83 #define BL_MASK_LEV 0x00000400L
84 #define BL_MASK_FLY 0x00000800L
85 #define BL_MASK_RIDE 0x00001000L
86 /* clang-format on */
88 #define REASSESS_ONLY TRUE
90 #ifdef STATUS_HILITES
91 /* hilite status field behavior - coloridx values */
92 #define BL_HILITE_NONE -1 /* no hilite of this field */
93 #define BL_HILITE_INVERSE -2 /* inverse hilite */
94 #define BL_HILITE_BOLD -3 /* bold hilite */
95 /* or any CLR_ index (0 - 15) */
96 #define BL_TH_NONE 0
97 #define BL_TH_VAL_PERCENTAGE 100 /* threshold is percentage */
98 #define BL_TH_VAL_ABSOLUTE 101 /* threshold is particular value */
99 #define BL_TH_UPDOWN 102 /* threshold is up or down change */
100 #define BL_TH_CONDITION 103 /* threshold is bitmask of conditions */
101 #endif
103 extern const char *status_fieldnames[]; /* in botl.c */
104 #endif
106 #endif /* BOTL_H */