Wikia

Wikihack

Source:SLASH'EM 0.0.7E7F2/color.h

2,032pages on
this wiki
Talk0

Below is the full text to color.h from the source code of SLASH'EM 0.0.7E7F2. To link to a particular line, write [[SLASH'EM 0.0.7E7F2/color.h#line123]], for example.

The latest source code for vanilla NetHack is at Source code.


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

Around Wikia's network

Random Wiki