]>
git.gir.st - VIper.git/blob - schemes.h
4 #include "viiper.h" /* for enum items */
12 //#define BORDER(v,h) op.sch->border[BORDER_ ## v][BORDER_ ## h]
13 #define BORDER(v,h) (g.b.a&&g.b.t==BONUS_WRAP?op.sch->permeable:op.sch->border) \
14 [BORDER_ ## v][BORDER_ ## h]
18 char* permeable
[4][3]; /* for wrap-around mode */
20 char* snake
[5][5]; /* [predecessor][successor] */
21 char* color
[3]; /* 0=even, 1=odd, 2=head */
23 char* food
[NUM_FOODS
];
26 /* for en-/disabling e.g. DEC charset: */
30 int cell_width
; /* number of characters per cell */
31 int display_width
; /* how wide a cell appears to be */
34 struct scheme unic0de
= {
48 .snake
= { /* sorted like in the enum directions */
49 /*NOTE: same-to-same direction is for wrap-around*/
82 .color
= {"32", "92", "92;1"},
101 struct scheme vt220_charset
= {
103 {"\033#6\x6c","\x71","\x6b"},
104 {"\033#6\x78"," ","\x78"},
105 {"\033#6\x6d","\x71","\x6a"},
108 .permeable
= {//TODO: ascii-colons?
109 {"\033#6\x6c","\x71","\x6b"},
110 {"\033#6\x78"," ","\x78"},
111 {"\033#6\x6d","\x71","\x6a"},
116 {"@","A",">","V","<"}, //head
117 {"#","#","#","#","#"},
118 {"#","#","#","#","#"},
119 {"#","#","#","#","#"},
120 {"#","#","#","#","#"},
122 .color
= {"0", "0", "1"},
124 .food
= { "$", "%", "&", },
125 .boni
= { "\033Nx", "\033N|", "\033Ns", "\033Nf", "\033Nw", },
127 .init_seq
= "\033(0\033*B\x0f" /* G0=Graphics, G2=ASCII, invoke G0 */
128 "\033[?3l", /* disable 132 column mode (DECCOLM) */
129 .reset_seq
= "\033(B" /* reset to DEC Multinational Character Set */
130 "\033[?3h", /* reenable DECCOLM (WARN: unconditionally!)*/