]> git.gir.st - minesVIiper.git/blob - schemes.h
cleanup color esc.seq with macro
[minesVIiper.git] / schemes.h
1 /*
2 contains color/monchrome schemes for tty-mines.
3 */
4 #ifndef __SCHEMES_H__
5 #define __SCHEMES_H__
6
7 #define C(color, string) "\033[" #color "m" #string "\033[0m"
8
9 enum e_emoticons {
10 EMOT_SMILE,
11 EMOT_DEAD,
12 EMOT_WON,
13 EMOT_OHH,
14 NUM_EMOT,
15 };
16
17 struct minescheme {
18 char* number[9];
19 char* field_closed;
20 char* field_flagged;
21 char* field_question;
22 char* mouse_highlight;
23 char* mine_normal;
24 char* mine_death;
25 char* mine_wrongf;
26 char* mine_wrongq;
27
28 char* emoticons[NUM_EMOT];
29
30 char* border_top_l;
31 char* border_top_m;
32 char* border_top_r;
33
34 char* border_status_l;
35 //TODO: better define status line
36 char* border_status_r;
37
38 char* border_spacer_l;
39 char* border_spacer_m;
40 char* border_spacer_r;
41
42 char* border_field_l;
43 char* border_field_r;
44
45 char* border_bottom_l;
46 char* border_bottom_m;
47 char* border_bottom_r;
48
49 int cell_width;
50 int flag_offset;
51 char* init_seq;
52 char* reset_seq;
53 };
54
55 struct minescheme symbols_mono = {
56 .number = {" ", "1", "2", "3", "4", "5", "6", "7", "8"},
57 .field_closed = "░░",
58 .field_flagged = "\033[7m!\033[0m",
59 .field_question = "\033[7m?\033[0m",
60 .mouse_highlight = "▓▓",
61 .mine_normal = "*",
62 .mine_death = "#",
63 .mine_wrongf = "/",
64 .mine_wrongq = "\",
65
66 .emoticons = {":)", ":(", ":D", ":o"},
67
68 .border_top_l = "╔═",
69 .border_top_m = "══",
70 .border_top_r = "═╗",
71
72 .border_status_l = "║ ",
73 .border_status_r = " ║",
74
75 .border_spacer_l = "╟─",
76 .border_spacer_m = "──",
77 .border_spacer_r = "─╢",
78
79 .border_field_l = "║ ",
80 .border_field_r = " ║",
81
82 .border_bottom_l = "╚═",
83 .border_bottom_m = "═",
84 .border_bottom_r = "═╝",
85
86 .cell_width = 2,
87 .flag_offset = 4, /* length of the escape sequece infront of .field_flagged and .field_question for cursor highlighting */
88 };
89
90 struct minescheme symbols_col1 = {
91 .number = {" ", C(94,), C(32,), C(31,), C(34,), C(33,), C(36,), C(30,), C(97,)},
92 .field_closed = "░░",
93 .field_flagged = "\033[37m▕\033[91m▀\033[m",
94 .field_question = "?",
95 .mouse_highlight = "▓▓",
96 .mine_normal = "*",
97 .mine_death = C(31,),
98 .mine_wrongf = "/",
99 .mine_wrongq = "\",
100
101 .emoticons = {":)", ":(", ":D", ":o"},
102
103 .border_top_l = "╔═",
104 .border_top_m = "══",
105 .border_top_r = "═╗",
106
107 .border_status_l = "║ ",
108 .border_status_r = " ║",
109
110 .border_spacer_l = "╟─",
111 .border_spacer_m = "──",
112 .border_spacer_r = "─╢",
113
114 .border_field_l = "║ ",
115 .border_field_r = " ║",
116
117 .border_bottom_l = "╚═",
118 .border_bottom_m = "═",
119 .border_bottom_r = "═╝",
120
121 .cell_width = 2,
122 };
123
124 struct minescheme symbols_doublewidth = {
125 /* vt220 multilingual character set,
126 see http://vt100.net/docs/vt220-rm/table2-4.html */
127 .number = {" ", C(1,1), C(1,2), C(1,3), C(1,4), C(1,5), C(1,6), C(1,7), C(1,8)},
128 .field_closed = "\x61",
129 .field_flagged = C(1,!),
130 .field_question = C(1,?),
131 .mouse_highlight = C(5,@),
132 .mine_normal = C(1,*),
133 .mine_death = C(1,#),
134 .mine_wrongf = C(1,/),
135 .mine_wrongq = C(1,\\),
136
137 .emoticons = {":)", ":(", ":D", ":o"},
138
139 .border_top_l = "\033#6\x6c",
140 .border_top_m = "\x71",
141 .border_top_r = "\x6b",
142
143 .border_status_l = "\033#6\x78",
144 .border_status_r = "\x78",
145
146 .border_spacer_l = "\033#6\x74",
147 .border_spacer_m = "\x71",
148 .border_spacer_r = "\x75",
149
150 .border_field_l = "\033#6\x78",
151 .border_field_r = "\x78",
152
153 .border_bottom_l = "\033#6\x6d",
154 .border_bottom_m = "\x71",
155 .border_bottom_r = "\x6a",
156
157 .cell_width = 1,
158 .init_seq = "\033(0", /* enable DEC Special Graphics Character Set */
159 .reset_seq = "\033(B", /* enable DEC Multinational Character Set (TODO: check) */
160 };
161
162 #undef C
163 #endif
Imprint / Impressum