core support for status field highlighting (trunk only)
This provides the core support needed for status field highlighting.
This patch doesn't actually perform status field highlighting for any port,
but provides the core hooks for doing so.
The syntax is:
OPTIONS=hilite_status:{fieldname}/{threshold}/{below}/{above}
where {fieldname} is the name of a status field.
{threshold} is the value used as the threshold to trigger a display
change. It can also be set to "updown" to trigger
a display change whenever it rises or whenever it falls.
If you end the threshold value with %, then it signifies
that you want to trigger the display change based on the
percentage of maximum.
{below}, {above}
are the color or display attribute that you want to use when
the field value is underneath the threshold. Supported display
fields are: normal, inverse, bold, black, red, green,
brown, blue, magenta, cyan, gray, orange,
bright-green, yellow, bright-blue, bright-magenta,
bright-cyan, or white.
Valid field names are:
alignment, armor-class, carrying-capacity,
charisma, condition, constitution, dexterity,
dungeon-level, experience-level, experience,
gold, HD, hitpoints-max, hitpoints, hunger,
intelligence, power-max, power, score,
strength, time, title, wisdom
Refer to window.doc for details. Guidebook updates to come later.
This commit is contained in:
@@ -15,14 +15,35 @@ typedef union any {
|
||||
char a_char;
|
||||
schar a_schar;
|
||||
unsigned int a_uint;
|
||||
long a_long;
|
||||
unsigned long a_ulong;
|
||||
int *a_iptr;
|
||||
long *a_lptr;
|
||||
unsigned long *a_ulptr;
|
||||
unsigned *a_uptr;
|
||||
/* add types as needed */
|
||||
} anything;
|
||||
#define ANY_P union any /* avoid typedef in prototypes */
|
||||
/* (buggy old Ultrix compiler) */
|
||||
|
||||
/* symbolic names for the data types housed in anything */
|
||||
#define ANY_VOID 1
|
||||
#define ANY_OBJ 2 /* struct obj */
|
||||
#define ANY_MONST 3 /* struct monst (not used) */
|
||||
#define ANY_INT 4 /* int */
|
||||
#define ANY_CHAR 5 /* char */
|
||||
#define ANY_UCHAR 6 /* unsigned char */
|
||||
#define ANY_SCHAR 7 /* signed char */
|
||||
#define ANY_UINT 8 /* unsigned int */
|
||||
#define ANY_LONG 9 /* long */
|
||||
#define ANY_ULONG 10 /* unsigned long */
|
||||
#define ANY_IPTR 11 /* pointer to int */
|
||||
#define ANY_UPTR 12 /* pointer to unsigned int */
|
||||
#define ANY_LPTR 13 /* pointer to long */
|
||||
#define ANY_ULPTR 14 /* pointer to unsigned long */
|
||||
#define ANY_STR 15 /* pointer to null-terminated char string */
|
||||
#define ANY_MASK32 16 /* mask of 32 bits (stored as unsigned long) */
|
||||
|
||||
/* menu return list */
|
||||
typedef struct mi {
|
||||
anything item; /* identifier */
|
||||
|
||||
Reference in New Issue
Block a user