1 /*	SCCS Id: @(#)color.h	3.4	1992/02/02	*/
2 /* Copyright (c) Steve Linhart, Eric Raymond, 1989. */
3 /* NetHack may be freely redistributed.  See license for details. */
4 
5 #ifndef COLOR_H
6 #define COLOR_H
7 
8 /*
9  * The color scheme used is tailored for an IBM PC.  It consists of the
10  * standard 8 colors, folowed by their bright counterparts.  There are
11  * exceptions, these are listed below.  Bright black doesn't mean very
12  * much, so it is used as the "default" foreground color of the screen.
13  */
14 
15 #ifndef VIDEOSHADES
16 # define CLR_BLACK		0
17 #else
18 # define CLR_BLACK		8
19 #endif
20 #define CLR_RED			1
21 #define CLR_GREEN		2
22 #define CLR_BROWN		3 /* on IBM, low-intensity yellow is brown */
23 #define CLR_BLUE		4
24 #define CLR_MAGENTA		5
25 #define CLR_CYAN		6
26 #define CLR_GRAY		7 /* low-intensity white */
27 #ifndef VIDEOSHADES
28 # define NO_COLOR		8
29 #else
30 # define NO_COLOR		0
31 #endif
32 #define CLR_ORANGE		9
33 #define CLR_BRIGHT_GREEN	10
34 #define CLR_YELLOW		11
35 #define CLR_BRIGHT_BLUE		12
36 #define CLR_BRIGHT_MAGENTA	13
37 #define CLR_BRIGHT_CYAN		14
38 #define CLR_WHITE		15
39 #define CLR_MAX			16
40 
41 /* The "half-way" point for tty based color systems.  This is used in */
42 /* the tty color setup code.  (IMHO, it should be removed - dean).    */
43 #define BRIGHT		8
44 
45 /* these can be configured */
46 #define HI_OBJ		CLR_MAGENTA
47 #define HI_METAL	CLR_CYAN
48 #define HI_COPPER	CLR_YELLOW
49 #define HI_SILVER	CLR_GRAY
50 #define HI_GOLD		CLR_YELLOW
51 #define HI_LEATHER	CLR_BROWN
52 #define HI_CLOTH	CLR_BROWN
53 #define HI_ORGANIC	CLR_BROWN
54 #define HI_WOOD		CLR_BROWN
55 #define HI_PAPER	CLR_WHITE
56 #define HI_GLASS	CLR_BRIGHT_CYAN
57 #define HI_MINERAL	CLR_GRAY
58 #define DRAGON_SILVER	CLR_BRIGHT_CYAN
59 #define HI_ZAP		CLR_BRIGHT_BLUE
60 
61 #ifdef MENU_COLOR
62 struct menucoloring {
63 #ifdef USE_REGEX_MATCH
64 # ifdef GNU_REGEX
65    struct re_pattern_buffer match;
66 # else
67 #  ifdef POSIX_REGEX
68    regex_t match;
69 #  endif
70 # endif
71 #else
72    char *match;
73 #endif
74    int color, attr;
75    struct menucoloring *next;
76 };
77 #endif
78 
79 #if defined(VIDEOSHADES) && !defined(MSDOS)
80 extern char ttycolors[CLR_MAX];
81 #endif
82 
83 #endif /* COLOR_H */
84