Angband
z-color.h
Go to the documentation of this file.
1 
12 #ifndef INCLUDED_Z_COLOR_H
13 #define INCLUDED_Z_COLOR_H
14 
15 #include "h-basic.h"
16 
23 #define COLOUR_DARK 0 /* d */ /* 0 0 0 */
24 #define COLOUR_WHITE 1 /* w */ /* 4 4 4 */
25 #define COLOUR_SLATE 2 /* s */ /* 2 2 2 */
26 #define COLOUR_ORANGE 3 /* o */ /* 4 2 0 */
27 #define COLOUR_RED 4 /* r */ /* 3 0 0 */
28 #define COLOUR_GREEN 5 /* g */ /* 0 2 1 */
29 #define COLOUR_BLUE 6 /* b */ /* 0 0 4 */
30 #define COLOUR_UMBER 7 /* u */ /* 2 1 0 */
31 #define COLOUR_L_DARK 8 /* D */ /* 1 1 1 */
32 #define COLOUR_L_WHITE 9 /* W */ /* 3 3 3 */
33 #define COLOUR_L_PURPLE 10 /* P */ /* ? ? ? */
34 #define COLOUR_YELLOW 11 /* y */ /* 4 4 0 */
35 #define COLOUR_L_RED 12 /* R */ /* 4 0 0 */
36 #define COLOUR_L_GREEN 13 /* G */ /* 0 4 0 */
37 #define COLOUR_L_BLUE 14 /* B */ /* 0 4 4 */
38 #define COLOUR_L_UMBER 15 /* U */ /* 3 2 1 */
39 
40 #define COLOUR_PURPLE 16 /* p */
41 #define COLOUR_VIOLET 17 /* v */
42 #define COLOUR_TEAL 18 /* t */
43 #define COLOUR_MUD 19 /* m */
44 #define COLOUR_L_YELLOW 20 /* Y */
45 #define COLOUR_MAGENTA 21 /* i */
46 #define COLOUR_L_TEAL 22 /* T */
47 #define COLOUR_L_VIOLET 23 /* V */
48 #define COLOUR_L_PINK 24 /* I */
49 #define COLOUR_MUSTARD 25 /* M */
50 #define COLOUR_BLUE_SLATE 26 /* z */
51 #define COLOUR_DEEP_L_BLUE 27 /* Z */
52 #define COLOUR_SHADE 28 /* for shaded backgrounds */
53 
59 #define ATTR_FULL 0 /* full color translation */
60 #define ATTR_MONO 1 /* mono color translation */
61 #define ATTR_VGA 2 /* 16 color translation */
62 #define ATTR_BLIND 3 /* "Blind" color translation */
63 #define ATTR_LIGHT 4 /* "Torchlit" color translation */
64 #define ATTR_DARK 5 /* "Dark" color translation */
65 #define ATTR_HIGH 6 /* "Highlight" color translation */
66 #define ATTR_METAL 7 /* "Metallic" color translation */
67 #define ATTR_MISC 8 /* "Miscellaneous" - see misc_to_attr */
68 
69 #define MAX_ATTR 9
70 
74 #define MAX_COLORS 256
75 #define BASIC_COLORS 29
76 #define BG_BLACK 0 /* The set number for the black-background glyphs */
77 #define BG_SAME 1 /* The set number for the same-background glyphs */
78 #define BG_DARK 2 /* The set number for the dark-background glyphs */
79 #define BG_MAX 3 /* The max number of backgrounds */
80 
84 typedef struct color_type color_type;
85 struct color_type
86 {
87  char index_char; /* Character index: 'r' = red, etc. */
88  char name[32]; /* Color name */
89  byte color_translate[MAX_ATTR]; /* Index for various in-game translations */
90 };
91 
94 
95 extern int color_char_to_attr(char c);
96 extern int color_text_to_attr(const char *name);
97 extern const char *attr_to_text(byte a);
98 
99 extern void build_gamma_table(int gamma);
100 extern byte gamma_table[256];
101 
102 #endif /* INCLUDED_Z_COLOR_H */
103