1 /* Copyright (C) 1993, 1992 Nathan Sidwell */
2 /* additional sprites by Stefan Gustavson <stefang@isy.liu.se> */
3 /* common define file for xmris and xmred, included from defmris or defmred */
4 /* RCS $Id: defcom.c,v 4.27 1995/12/14 13:53:27 nathan Exp $ */
5 /*{{{  some sprite info*/
6 /* you can add your own sprites, if you like, but you have to be careful
7  * to make sure that they look ok with both -swap and -noswap, and also
8  * fiddle the colour definitions, as there are checks to make sure that
9  * we don't allocate colours which aren't used */
10 /*}}}*/
11 /*{{{  bitmaps*/
12 /*{{{  bitmaps/bitmaps*/
13 #include "bitmaps/bitmaps/oblong.h"
14 #include "bitmaps/bitmaps/rect.h"
15 #include "bitmaps/bitmaps/edge.h"
16 #include "bitmaps/bitmaps/fill0.h"
17 #include "bitmaps/bitmaps/fill1.h"
18 #include "bitmaps/bitmaps/fill2.h"
19 #include "bitmaps/bitmaps/fill3.h"
20 #ifndef XMRED
21 #include "bitmaps/bitmaps/mris.h"
22 #include "bitmaps/bitmaps/msit.h"
23 #include "bitmaps/bitmaps/ghosting.h"
24 #else
25 #include "bitmaps/bitmaps/mred.h"
26 #endif /* XMRED */
27 /*}}}*/
28 /*{{{  bitmaps/icon/.*/
29 #ifndef XMRED
30 #include "bitmaps/icon/solidm.h"
31 #include "bitmaps/icon/solidr.h"
32 #include "bitmaps/icon/solidi.h"
33 #include "bitmaps/icon/solids.h"
34 #include "bitmaps/icon/solidt.h"
35 #include "bitmaps/icon/shellm.h"
36 #include "bitmaps/icon/shellr.h"
37 #include "bitmaps/icon/shelli.h"
38 #include "bitmaps/icon/shells.h"
39 #include "bitmaps/icon/shellt.h"
40 #endif /* XMRED */
41 /*}}}*/
42 /*{{{  bitmaps/board/.*/
43 #include "bitmaps/board/cherry.h"
44 #ifndef XMRED
45 #include "bitmaps/board/ball.h"
46 #include "bitmaps/board/digits.h"
47 #include "bitmaps/board/seat.h"
48 #endif /* XMRED */
49 /*}}}*/
50 /*{{{  bitmaps/apple/.*/
51 #include "bitmaps/apple/aplnorm.h"
52 #ifndef XMRED
53 #include "bitmaps/apple/aplrock.h"
54 #include "bitmaps/apple/aplspl.h"
55 #include "bitmaps/apple/apldcy.h"
56 #include "bitmaps/apple/aplrot.h"
57 #include "bitmaps/apple/gstnorm.h"
58 #include "bitmaps/apple/gstrock.h"
59 #else
60 #include "bitmaps/apple/aplsmall.h"
61 #include "bitmaps/apple/bigedge.h"
62 #include "bitmaps/apple/smledge.h"
63 #endif /* XMRED */
64 /*}}}*/
65 /*{{{  bitmaps/player/.*/
66 #include "bitmaps/player/hplyrw1.h"
67 #include "bitmaps/player/splyrw1.h"
68 #ifndef XMRED
69 #include "bitmaps/player/hplyrw2.h"
70 #include "bitmaps/player/hplyrs1.h"
71 #include "bitmaps/player/hplyrs2.h"
72 #include "bitmaps/player/hplyrf.h"
73 #include "bitmaps/player/hplyrp1.h"
74 #include "bitmaps/player/hplyrp2.h"
75 #include "bitmaps/player/hplyrh1.h"
76 #include "bitmaps/player/hplyrh2.h"
77 #include "bitmaps/player/splyrw2.h"
78 #include "bitmaps/player/splyrs1.h"
79 #include "bitmaps/player/splyrs2.h"
80 #include "bitmaps/player/splyrf.h"
81 #include "bitmaps/player/splyrp1.h"
82 #include "bitmaps/player/splyrp2.h"
83 #include "bitmaps/player/splyrd1.h"
84 #include "bitmaps/player/splyrd2.h"
85 #include "bitmaps/player/splyrh1.h"
86 #include "bitmaps/player/splyrh2.h"
87 #endif /* XMRED */
88 /*}}}*/
89 /*{{{  bitmaps/normal/.*/
90 #include "bitmaps/normal/hden.h"
91 #include "bitmaps/normal/sden.h"
92 #ifndef XMRED
93 #include "bitmaps/normal/hnormw1.h"
94 #include "bitmaps/normal/hnormw2.h"
95 #include "bitmaps/normal/hnormf.h"
96 #include "bitmaps/normal/snormw1.h"
97 #include "bitmaps/normal/snormw2.h"
98 #include "bitmaps/normal/snormf.h"
99 #endif /* XMRED */
100 /*}}}*/
101 /*{{{  bitmaps/munch/.*/
102 #ifndef XMRED
103 #include "bitmaps/munch/hmnchw1.h"
104 #include "bitmaps/munch/hmnchw2.h"
105 #include "bitmaps/munch/hmnchf.h"
106 #include "bitmaps/munch/smnchw1.h"
107 #include "bitmaps/munch/smnchw2.h"
108 #include "bitmaps/munch/smnchf.h"
109 #endif /* XMRED */
110 /*}}}*/
111 /*{{{  bitmaps/xtra/.*/
112 #ifndef XMRED
113 #include "bitmaps/xtra/hxtraw1.h"
114 #include "bitmaps/xtra/hxtraw2.h"
115 #include "bitmaps/xtra/hxtraf.h"
116 #include "bitmaps/xtra/sxtraw1.h"
117 #include "bitmaps/xtra/sxtraw2.h"
118 #include "bitmaps/xtra/sxtraf.h"
119 #include "bitmaps/xtra/xtrfaint.h"
120 #endif /* XMRED */
121 #include "bitmaps/xtra/xtrbold.h"
122 /*}}}*/
123 /*{{{  bitmaps/drone/.*/
124 #ifndef XMRED
125 #include "bitmaps/drone/hdronw1.h"
126 #include "bitmaps/drone/hdronw2.h"
127 #include "bitmaps/drone/hdronf.h"
128 #include "bitmaps/drone/sdronw1.h"
129 #include "bitmaps/drone/sdronw2.h"
130 #include "bitmaps/drone/sdronf.h"
131 #endif /* XMRED */
132 /*}}}*/
133 /*{{{  bitmaps/chomp/.*/
134 #ifndef XMRED
135 #include "bitmaps/chomp/hchmpo.h"
136 #include "bitmaps/chomp/hchmpc.h"
137 #include "bitmaps/chomp/schmpo.h"
138 #include "bitmaps/chomp/schmpc.h"
139 #endif /* XMRED */
140 /*}}}*/
141 /*{{{  bitmaps/prize/.*/
142 #ifndef XMRED
143 #include "bitmaps/prize/cake.h"
144 #include "bitmaps/prize/spanner.h"
145 #include "bitmaps/prize/brolly.h"
146 #include "bitmaps/prize/mushrm.h"
147 #include "bitmaps/prize/clock.h"
148 #include "bitmaps/prize/gem1.h"
149 #include "bitmaps/prize/gem2.h"
150 #include "bitmaps/prize/gem3.h"
151 #endif /* XMRED */
152 /*}}}*/
153 /*{{{  bitmaps/edit/.*/
154 #ifdef XMRED
155 #include "bitmaps/edit/bigearw.h"
156 #include "bitmaps/edit/smlearw.h"
157 #include "bitmaps/edit/bigsarw.h"
158 #include "bitmaps/edit/smlsarw.h"
159 #include "bitmaps/edit/path.h"
160 #include "bitmaps/edit/red.h"
161 #include "bitmaps/edit/green.h"
162 #include "bitmaps/edit/blue.h"
163 #include "bitmaps/edit/include.h"
164 #include "bitmaps/edit/iconi.h"
165 #include "bitmaps/edit/boardi.h"
166 #include "bitmaps/edit/warnon.h"
167 #include "bitmaps/edit/warnoff.h"
168 #endif /* XMRED */
169 /*}}}*/
170 /*}}}*/
171 /*{{{  some sprite sizes*/
172 #define DECAY_WIDTH     apldcy_width
173 #define DECAY_HEIGHT    (apldcy_height / apldcy_depth)
174 #define ROT_WIDTH       aplrot_width
175 #define ROT_HEIGHT      (aplrot_height / aplrot_depth)
176 /*}}}*/
177 unsigned long color_zero = 0;
178 unsigned long color_one = ~0;
179 Boolean  default_gender = False;
180 static int CONST negone = -1;
181 /*{{{  create tables*/
182 /*{{{  extern CommandOptionDesc command_options[] =*/
183 CommandOptionDesc command_options[] =
184 {
185   {"-help",    0,  XtOffsetOf(DATA, help)},
186   {"-colors",  0,  XtOffsetOf(DATA, colors)},
187   {"-colours", 0,  XtOffsetOf(DATA, colors)},
188 #ifndef XMRED
189   {"-scores",  0,  XtOffsetOf(DATA, scores)},
190   {"-sprites", 0,  XtOffsetOf(DATA, sprites)},
191   {"-format",  1,  XtOffsetOf(DATA, format)},
192   {"-expire",  1,  XtOffsetOf(DATA, expire)},
193   {"-remove",  1,  XtOffsetOf(DATA, remove)},
194   {"-nodisplay",0, XtOffsetOf(DATA, nodisplay)},
195   {"+display", 0,  XtOffsetOf(DATA, nodisplay)},
196   {"-dir",     1,  XtOffsetOf(DATA, dir)},
197 #endif /* XMRED */
198   {NULL}
199 };
200 /*}}}*/
201 /*{{{  extern XrmOptionDescRec options[] =*/
202 XrmOptionDescRec options[] =
203 {
204   {"-monochrome",".monochrome", XrmoptionNoArg, (XtPointer)XtEyes},
205   {"-noswap",  "*reverseVideo", XrmoptionNoArg, (XtPointer)XtEno},
206   {"+swap",    "*reverseVideo", XrmoptionNoArg, (XtPointer)XtEno},
207   {"-swap",    "*reverseVideo", XrmoptionNoArg, (XtPointer)XtEyes},
208   {"-mris",    ".gender",       XrmoptionNoArg, (XtPointer)"mris"},
209   {"-msit",    ".gender",       XrmoptionNoArg, (XtPointer)"msit"},
210   {"-gender",  ".gender",       XrmoptionSepArg,(XtPointer)NULL},
211   {"-private", ".private",      XrmoptionNoArg, (XtPointer)XtEyes},
212   {"-depth",   "*depth",        XrmoptionSepArg,(XtPointer)NULL},
213   {"-visual",  "*visual",       XrmoptionSepArg,(XtPointer)NULL},
214   {"-distinct",".distinct",     XrmoptionSepArg,(XtPointer)NULL},
215 #ifndef XMRED
216   {"-random",  ".random",       XrmoptionNoArg, (XtPointer)XtEyes},
217   {"+random",  ".random",       XrmoptionNoArg, (XtPointer)XtEno},
218   {"-gardens", ".gardens",      XrmoptionSepArg,(XtPointer)NULL},
219   {"-username",".username",     XrmoptionNoArg, (XtPointer)XtEyes},
220   {"-realname",".username",     XrmoptionNoArg, (XtPointer)XtEno},
221   {"-static",  ".static",       XrmoptionNoArg, (XtPointer)XtEyes},
222 #ifndef TRANSPUTER
223   {"-busywait", ".busywait",    XrmoptionNoArg, (XtPointer)XtEyes},
224 #endif /* TRANSPUTER */
225 #endif /* XMRED */
226   {NULL}
227 };
228 /*}}}*/
229 /*{{{  extern XtResource resources[] =*/
230 XtResource resources[] =
231 {
232 #ifndef XMRED
233   /* dir must be first */
234   {"dir", "Dir", XtRString, sizeof(String),
235       XtOffsetOf(DATA, dir), XtRString, (XtPointer)SCORE_DIR},
236   {"up", "Up", XtRKeySym, sizeof(KeySym),
237       XtOffsetOf(DATA, keysyms[0]), XtRString, (XtPointer)"apostrophe"},
238   {"down", "Down", XtRKeySym, sizeof(KeySym),
239       XtOffsetOf(DATA, keysyms[1]), XtRString, (XtPointer)"slash"},
240   {"left", "Left", XtRKeySym, sizeof(KeySym),
241       XtOffsetOf(DATA, keysyms[2]), XtRString, (XtPointer)"z"},
242   {"right", "Right", XtRKeySym, sizeof(KeySym),
243       XtOffsetOf(DATA, keysyms[3]), XtRString, (XtPointer)"x"},
244   {"throw", "Throw", XtRKeySym, sizeof(KeySym),
245       XtOffsetOf(DATA, keysyms[KEY_THROW]), XtRString, (XtPointer)"space"},
246   {"pause", "Pause", XtRKeySym, sizeof(KeySym),
247       XtOffsetOf(DATA, keysyms[KEY_PAUSE]), XtRString, (XtPointer)"p"},
248   {"quit", "Quit", XtRKeySym, sizeof(KeySym),
249       XtOffsetOf(DATA, keysyms[KEY_QUIT]), XtRString, (XtPointer)"q"},
250   {"iconize", "Iconize", XtRKeySym, sizeof(KeySym),
251       XtOffsetOf(DATA, keysyms[KEY_ICONIZE]), XtRString, (XtPointer)"i"},
252   {"keyboard", "Keyboard", XtRKeySym, sizeof(KeySym),
253       XtOffsetOf(DATA, keysyms[KEY_KEYBOARD]), XtRString, (XtPointer)"k"},
254   {"random", "Random", XtRBoolean, sizeof(Boolean),
255       XtOffsetOf(DATA, random), XtRImmediate, (XtPointer)False},
256   {"gardens", "Gardens", XtRString, sizeof(String),
257       XtOffsetOf(DATA, boards), XtRImmediate, (XtPointer)NULL},
258   {"userName", "UserName", XtRBoolean, sizeof(Boolean),
259       XtOffsetOf(DATA, username), XtRImmediate, (XtPointer)False},
260   {"static", "Static", XtRBoolean, sizeof(Boolean),
261       XtOffsetOf(DATA, nodynamic), XtRImmediate, (XtPointer)False},
262 #ifndef TRANSPUTER
263   {"busywait", "Busywait", XtRBoolean, sizeof(Boolean),
264       XtOffsetOf(DATA, busywait), XtRImmediate, (XtPointer)False},
265 #endif /* TRANSPUTER */
266 #endif /* XMRED */
267   {XtNfont, XtCFont, XtRFont, sizeof(Font),
268       XtOffsetOf(DATA, font), XtRImmediate, (XtPointer)FONT_NAME},
269   {XtNreverseVideo, XtCReverseVideo, XtRBoolean, sizeof(Boolean),
270       XtOffsetOf(DATA, swap), XtRImmediate, (XtPointer)False},
271   {"monochrome", "Monochrome", XtRBoolean, sizeof(Boolean),
272       XtOffsetOf(DATA, mono), XtRImmediate, (XtPointer)False},
273   {"gender", "Gender", XtRGender, sizeof(Boolean),
274       XtOffsetOf(DATA, gender), XtRGender, (XtPointer)&default_gender},
275   {"private", "Private", XtRBoolean, sizeof(Boolean),
276       XtOffsetOf(DATA, private), XtRImmediate, (XtPointer)False},
277   {"distinct", "Distinct", XtRInt, sizeof(int),
278       XtOffsetOf(DATA, distinct), XtRInt, (XtPointer)&negone},
279   {NULL}
280 };
281 /*}}}*/
282 /*{{{  extern COLOR_DEF color_names[] =*/
283 COLOR_DEF color_names[] =
284 {
285   {"White",       15, {NULL}, 2},
286   {"Black",       15, {NULL}, 2},
287   {"GreenBack",   31, {"#77BB77", "#BBFFBB", "#77BB77", "#BBFFBB"}},
288   {"GreenFore",   31, {"#007700", "#00BB00", "#007700", "#00BB00"}},
289   {"RedBack",     31, {"#BB7777", "#FFBBBB", "#BB7777", "#FFBBBB"}},
290   {"RedFore",     31, {"#770000", "#BB0000", "#770000", "#BB0000"}},
291   {"BlueBack",    31, {"#7777BB", "#BBBBFF", "#7777BB", "#BBBBFF"}},
292   {"BlueFore",    31, {"#000077", "#0000BB", "#000077", "#0000BB"}},
293   {"Background",  15, {"#FFFFFF", "#000000"}},
294   {"Foreground",  15, {"#000000", "#FFFFFF"}},
295   {"BorderColor", 15, {"#000000", "#FFFFFF"}},
296   {"Cherry",      15, {"#EE0000"}},
297   {"CherryStalk", 10, {"#DD9955", "#EEAA66"}},
298   {"Apple1",      15, {"#EEDD00"}},
299   {"Apple2",      15, {"#DD3300"}},
300   {"AppleFaint",
301 #ifndef XMRED
302    5, {"#BBBBBB"}
303 #else
304    15, {"#CCCCCC", "#FFFFFF"}
305 #endif /* XMRED */
306    },
307   {"Player",      15, {"#0000DD", "#6666FF", "#6666FF"}},
308   {"PlayerBobble",15, {"#FFFFFF"}},
309   {"PlayerSkin",  15, {"#FFCCCC", "#FFDDDD"}},
310   {"PlayerBoot",  14, {"#DD9955", "#EEAA66", "#773322", "#DD9955"}},
311   {"Normal",      15, {"#EE0000"}},
312   {"LetterGot",   15, {"#000000", "#FFFFFF"}},
313 #ifndef XMRED
314   {"LetterNotGot", 15, {"#BBBBBB"}},
315   {"Ball",        15, {"#FFFF77", NULL, "#FF00FF", "#FF00FF"}},
316   {"DroneBack",   51, {"#AA3333", "#FF6666", "#AA3333", "#FF6666"}},
317   {"DroneFore",   51, {"#992222", "#FF2222", "#992222", "#FF2222"}},
318   {"Gem1",        15, {"#DDDDDD"}},
319   {"Gem2",        15, {"#BBBBBB"}},
320   {"Munch1",      15, {"#FFFF00", NULL, "#FFFF00"}},
321   {"Munch2",      15, {"#CCCCCC", NULL, "#FFFF00"}},
322   {"Drone",       15, {"#0000DD", "#6666FF", "#00FF00"}},
323   {"DroneTongue", 12, {"#EE0000"}},
324   {"Extra",       15, {"#EEFF00"}},
325   {"Chomp",       15, {"#FFFFFF", NULL, "#CCFF00"}},
326   {"ChompLip",     3, {"#77FFFF"}},
327   {"ChompTongue", 12, {"#EE0000"}},
328   {"Seat",        15, {"#EE0000"}},
329   {"Cake",        15, {"#FFFF77"}},
330   {"CakeIcing",   15, {"#DD9955", "#EEAA66"}},
331   {"CakeJam",     15, {"#EE0000"}},
332   {"Spanner",     15, {"#AAAAAA", "#DDDDDD"}},
333   {"SpannerShadow", 15, {"#000000"}},
334   {"Brolly1",     15, {"#FFFFFF"}},
335   {"Brolly2",     15, {"#EE0000"}},
336   {"BrollyHandle", 15, {"#DD9955", "#EEAA66"}},
337   {"MushroomStalk", 15, {"#FFFFFF"}},
338   {"MushroomCap", 15, {"#EE0000"}},
339   {"ClockFace",   15, {"#FFFFFF"}},
340   {"ClockBell",   15, {"#00DD00"}},
341   {"ClockRim",    15, {"#0000DD", "#00DD00", "#00DD00", "#00DD00"}},
342   {"DynamicBack", 32, {NULL}, 2},  /*  dynamic backgrounds */
343   {"DynamicFore", 32, {NULL}, 2},
344 #endif
345 };
346 /*}}}*/
347 /*{{{  extern CONTEXT gcsdefine[GCS] =*/
348 CONTEXT gcsdefine[GCS] =
349 {
350     {GXcopy,        &color_one,       &color_zero},     /* GC_COPY */
351     {GXcopy,        &display.white,   &color_zero},     /* GC_CLEAR */
352     {GXcopy,        &display.black,   &color_zero},     /* GC_SET */
353     {GXandInverted, &color_one,       &color_zero},     /* GC_MASK */
354     {GXor,          &color_one,       &color_zero},     /* GC_OR */
355     {GXcopy,        &display.black,   &display.white},  /* GC_TEXT */
356     {GXand,         &color_one,       &color_zero},     /* GC_AND */
357     {GXcopy,        &display.black,   &display.white},  /* GC_BOARD */
358     {GXcopy,        &display.border,  &display.white},  /* GC_BORDER */
359 #ifndef XMRED
360     {GXxor,         &display.xor,     &color_zero},     /* GC_LOAD */
361 #endif /* XMRED */
362 };
363 /*}}}*/
364 /*{{{  extern HELP CONST help[] =*/
365 HELP CONST help[] =
366 {
367   {"List colour resource classes",  "-help",      "", "-colours"},
368 #ifndef XMRED
369   {"List high scores",              "-scores",    "", ""},
370 #endif /* XMRED */
371   {"Swap colours",                  "-swap",      "ReverseVideo:yes", ""},
372   {"Don't swap colours",            "+swap",    "ReverseVideo:no", ""},
373   {"Force black and white",         "-mono",      "Mono:yes", ""},
374   {"Classic sprites",               "-mris",      "Gender:he", ""},
375   {"Modern sprites",                "-msit",      "Gender:she", ""},
376 #ifndef XMRED
377   {"Random apples",                 "-random",    "Random:yes", ""},
378   {"High score directory",          "-dir",       "Dir:", "<directory>"},
379   {"Use username in score",         "-username",  "UserName:yes", ""},
380   {"Use realname in score",         "-realname",  "UserName:no", ""},
381 #endif /* XMRED */
382   {"Show colour allocation",        "-colours",   "", ""},
383 #ifndef XMRED
384   {"Show all sprites",              "-sprites",   "", ""},
385 #endif /* XMRED */
386   {"Private colour map",            "-private",   "Private:yes", ""},
387   {"Visual class",                  "-visual",    "Visual:", "<class>"},
388   {"Visual depth",                  "-depth",     "Depth:",  "<n>"},
389   {"Distinct colour limit",         "-distinct",  "Distinct:", "<n>"},
390 #ifndef XMRED
391   {"Do not use dynamic colors",     "-static",    "Static:yes", ""},
392   {"User defined gardens",          "-gardens",   "Gardens:", "<file>"},
393   {"Expire own scores",             "-expire",    "", "<date>"},
394   {"Remove user's scores",          "-remove",    "", "<name>"},
395   {"Do not open display",           "+display", "", ""},
396   {"Store date format change",      "-format",    "", ""},
397 #ifndef TRANSPUTER
398   {"Force busywaiting",             "-busywait",  "Busywait:yes", ""},
399 #endif /* TRANSPUTER */
400 #endif /* XMRED */
401   {NULL}
402 };
403 /*}}}*/
404 /*{{{  extern SPRITE_DEF CONST icons[] =*/
405 SPRITE_DEF CONST icons[] =
406 {
407 #ifndef XMRED
408   {(unsigned char *)mris_bits, 0, {NULL, NULL}, {mris_width, mris_height}},
409   {(unsigned char *)msit_bits, 0, {NULL, NULL}, {msit_width, msit_height}},
410 #else
411   {(unsigned char *)mred_bits, 0, {NULL, NULL}, {mred_width, mred_height}},
412 #endif /* XMRED */
413 };
414 /*}}}*/
415 /*{{{  extern SPRITE_DEF CONST she_nadger[] =*/
416 SPRITE_DEF CONST she_nadger[] =
417 {
418   {sden_bits, sden_depth, {sden_noswap, sden_swap},
419       {sden_width, sden_height}, {0, 0},
420       SPRITE_DEN, BORDER_HALO_MASK},
421   {splyrw1_bits, splyrw1_depth, {splyrw1_noswap, splyrw1_swap},
422       {splyrw1_width, splyrw1_height}, {0, 0},
423       SPRITE_PLAYER
424 #ifndef XMRED
425 		    + 6
426 #endif /* XMRED */
427 		       , BORDER_HALO_MASK},
428 #ifndef XMRED
429   {solids_bits, solids_depth, {solids_noswap, solids_swap},
430       {solids_width, solids_height}, {0, 0},
431       SPRITE_MRIS + 1, BORDER_HALO_MASK},
432   {shells_bits, shells_depth, {shells_noswap, shells_swap},
433       {shells_width, shells_height}, {0, 0},
434       SPRITE_MRIS + 5, BORDER_HALO_MASK},
435   {solidt_bits, solidt_depth, {solidt_noswap, solidt_swap},
436       {solidt_width, solidt_height}, {0, 0},
437       SPRITE_MRIS + 3, BORDER_HALO_MASK},
438   {shellt_bits, shellt_depth, {shellt_noswap, shellt_swap},
439       {shellt_width, shellt_height}, {0, 0},
440       SPRITE_MRIS + 7, BORDER_HALO_MASK},
441   {snormw1_bits, snormw1_depth, {snormw1_noswap, snormw1_swap},
442       {snormw1_width, snormw1_height}, {0, 0},
443       SPRITE_NORMAL + 6, BORDER_HALO_MASK},
444   {snormw2_bits, snormw2_depth, {snormw2_noswap, snormw2_swap},
445       {snormw2_width, snormw2_height}, {0, 0},
446       SPRITE_NORMAL + 7, BORDER_HALO_MASK},
447   {snormf_bits, snormf_depth, {snormf_noswap, snormf_swap},
448       {snormf_width, snormf_height}, {0, 0},
449       SPRITE_SQUISHED + 1, BORDER_HALO_MASK},
450   {smnchw1_bits, smnchw1_depth, {smnchw1_noswap, smnchw1_swap},
451       {smnchw1_width, smnchw1_height}, {0, 0}, SPRITE_MUNCHER + 6, 0},
452   {smnchw2_bits, smnchw2_depth, {smnchw2_noswap, smnchw2_swap},
453       {smnchw2_width, smnchw2_height}, {0, 0}, SPRITE_MUNCHER + 7, 0},
454   {smnchf_bits, smnchf_depth, {smnchf_noswap, smnchf_swap},
455       {smnchf_width,  smnchf_height}, {0, 0},
456       SPRITE_SQUISHED + 3, BORDER_HALO_MASK},
457   {sxtraw1_bits, sxtraw1_depth, {sxtraw1_noswap, sxtraw1_swap},
458       {sxtraw1_width, sxtraw1_height}, {0, 0},
459       SPRITE_XTRA_SOURCE + 0, BORDER_HALO_MASK},
460   {sxtraw2_bits, sxtraw2_depth, {sxtraw2_noswap, sxtraw2_swap},
461       {sxtraw2_width, sxtraw2_height}, {0, 0},
462       SPRITE_XTRA_SOURCE + 1, BORDER_HALO_MASK},
463   {sxtraf_bits, sxtraf_depth, {sxtraf_noswap, sxtraf_swap},
464       {sxtraf_width, sxtraf_height}, {0, 0},
465       SPRITE_SQUISHED + 5, BORDER_HALO_MASK},
466   {sdronw1_bits, sdronw1_depth, {sdronw1_noswap, sdronw1_swap},
467       {sdronw1_width, sdronw1_height}, {0, 0},
468       SPRITE_DRONE + 6, BORDER_HALO_MASK},
469   {sdronw2_bits, sdronw2_depth, {sdronw2_noswap, sdronw2_swap},
470       {sdronw2_width, sdronw2_height}, {0, 0},
471       SPRITE_DRONE + 7, BORDER_HALO_MASK},
472   {schmpo_bits, schmpo_depth, {schmpo_noswap, schmpo_swap},
473       {schmpo_width,  schmpo_height}, {0, 0},
474       SPRITE_CHOMP + 0, BORDER_HALO_MASK},
475   {schmpc_bits, schmpc_depth, {schmpc_noswap, schmpc_swap},
476       {schmpc_width,  schmpc_height}, {0, 0},
477       SPRITE_CHOMP + 1, BORDER_HALO_MASK},
478   {sdronf_bits, sdronf_depth, {sdronf_noswap, sdronf_swap},
479       {sdronf_width, sdronf_height}, {0, 0},
480       SPRITE_SQUISHED + 7, BORDER_HALO_MASK},
481   {splyrw2_bits, splyrw2_depth, {splyrw2_noswap, splyrw2_swap},
482       {splyrw2_width, splyrw2_height}, {0, 0},
483       SPRITE_PLAYER + 7, BORDER_HALO_MASK},
484   {splyrf_bits, splyrf_depth, {splyrf_noswap, splyrf_swap},
485       {splyrf_width, splyrf_height}, {0, 0},
486       SPRITE_SQUISHED + 9, BORDER_HALO_MASK},
487   {splyrs1_bits, splyrs1_depth, {splyrs1_noswap, splyrs1_swap},
488       {splyrs1_width, splyrs1_height}, {0, 0},
489       SPRITE_PLAYER_PUSH + 2, BORDER_HALO_MASK},
490   {splyrs2_bits, splyrs2_depth, {splyrs2_noswap, splyrs2_swap},
491       {splyrs2_width, splyrs2_height}, {0, 0},
492       SPRITE_PLAYER_PUSH + 3, BORDER_HALO_MASK},
493   {splyrp1_bits, splyrp1_depth, {splyrp1_noswap, splyrp1_swap},
494       {splyrp1_width, splyrp1_height}, {0, 0},
495       SPRITE_PLAYER_REST + 2, BORDER_HALO_MASK},
496   {splyrp2_bits, splyrp2_depth, {splyrp2_noswap, splyrp2_swap},
497       {splyrp2_width, splyrp2_height}, {0, 0},
498       SPRITE_PLAYER_REST + 3, BORDER_HALO_MASK},
499   {splyrd1_bits, splyrd1_depth, {splyrd1_noswap, splyrd1_swap},
500       {splyrd1_width, splyrd1_height}, {0, 0},
501       SPRITE_PLAYER_DEAD + 0, BORDER_HALO_MASK},
502   {splyrd2_bits, splyrd2_depth, {splyrd2_noswap, splyrd2_swap},
503       {splyrd2_width, splyrd2_height}, {0, 0},
504       SPRITE_PLAYER_DEAD + 1, BORDER_HALO_MASK},
505   {NULL, SPRITE_PLAYER_DEAD + 10, {NULL, NULL}, {0, 0}, {0, 0},
506       SPRITE_PLAYER_DEAD + 2, REFLECT_VERTICAL},
507   {NULL, SPRITE_PLAYER_DEAD + 11, {NULL, NULL}, {0, 0}, {0, 0},
508       SPRITE_PLAYER_DEAD + 3, REFLECT_VERTICAL},
509   {NULL, SPRITE_PLAYER_DEAD + 12, {NULL, NULL}, {0, 0}, {0, 0},
510       SPRITE_PLAYER_DEAD + 4, REFLECT_VERTICAL},
511   {NULL, SPRITE_PLAYER_DEAD + 13, {NULL, NULL}, {0, 0}, {0, 0},
512       SPRITE_PLAYER_DEAD + 5, REFLECT_VERTICAL},
513   {NULL, SPRITE_PLAYER_DEAD + 10, {NULL, NULL}, {0, 0}, {0, 0},
514       SPRITE_PLAYER_DEAD + 6, REFLECT_HORIZONTAL},
515   {NULL, SPRITE_PLAYER_DEAD + 11, {NULL, NULL}, {0, 0}, {0, 0},
516       SPRITE_PLAYER_DEAD + 7, REFLECT_HORIZONTAL},
517   {NULL, SPRITE_PLAYER_DEAD + 0, {NULL, NULL}, {0, 0}, {0, 0},
518       SPRITE_PLAYER_DEAD + 8, REFLECT_VERTICAL},
519   {NULL, SPRITE_PLAYER_DEAD + 1, {NULL, NULL}, {0, 0}, {0, 0},
520       SPRITE_PLAYER_DEAD + 9, REFLECT_VERTICAL},
521   {NULL, SPRITE_PLAYER_DEAD + 0, {NULL, NULL}, {0, 0}, {0, 0},
522       SPRITE_PLAYER_DEAD + 10, REFLECT_DIAGONAL},
523   {NULL, SPRITE_PLAYER_DEAD + 1, {NULL, NULL}, {0, 0}, {0, 0},
524       SPRITE_PLAYER_DEAD + 11, REFLECT_DIAGONAL},
525   {NULL, SPRITE_PLAYER_DEAD + 0, {NULL, NULL}, {0, 0}, {0, 0},
526       SPRITE_PLAYER_DEAD + 12, REFLECT_HORIZONTAL},
527   {NULL, SPRITE_PLAYER_DEAD + 1, {NULL, NULL}, {0, 0}, {0, 0},
528       SPRITE_PLAYER_DEAD + 13, REFLECT_HORIZONTAL},
529   {NULL, SPRITE_PLAYER_DEAD + 2, {NULL, NULL}, {0, 0}, {0, 0},
530       SPRITE_PLAYER_DEAD + 14, REFLECT_HORIZONTAL},
531   {NULL, SPRITE_PLAYER_DEAD + 3, {NULL, NULL}, {0, 0}, {0, 0},
532       SPRITE_PLAYER_DEAD + 15, REFLECT_HORIZONTAL},
533   {splyrh1_bits, splyrh1_depth, {splyrh1_noswap, splyrh1_swap},
534       {splyrh1_width, splyrh1_height}, {0, 0},
535       SPRITE_PLAYER_HAPPY + 0, BORDER_HALO_MASK},
536   {splyrh2_bits, splyrh2_depth, {splyrh2_noswap, splyrh2_swap},
537       {splyrh2_width, splyrh2_height}, {0, 0},
538       SPRITE_PLAYER_HAPPY + 1, BORDER_HALO_MASK},
539 #endif /* XMRED */
540   {NULL}
541 };
542 /*}}}*/
543 /*{{{  extern SPRITE_DEF sprites_def[SPRITES] =*/
544 SPRITE_DEF sprites_def[SPRITES] =
545 {
546   /*{{{  2:center masks (oblong, rect)*/
547   {(unsigned char *)oblong_bits, 1, {NULL},
548       {oblong_width, oblong_height}, {CELL_WIDTH, CELL_HEIGHT}},
549   {(unsigned char *)rect_bits, 1, {NULL},
550       {rect_width, rect_height}, {CELL_WIDTH, CELL_HEIGHT}},
551   /*}}}*/
552   /*{{{  2:edge masks (lr, tb)*/
553   {(unsigned char *)edge_bits, 1, {NULL},
554       {edge_width, edge_height}, {GAP_WIDTH * 8, EDGE_HEIGHT}},
555   {NULL, 0, {NULL}, {0, 0}, {EDGE_WIDTH, GAP_HEIGHT * 8},
556       SPRITE_EDGE_BASE, REFLECT_DIAGONAL},
557   /*}}}*/
558 #ifndef XMRED
559   /*{{{  1:digits (0,1,2,3,4,5,6,7,8,9,' ')*/
560   {digits_bits, digits_depth, {digits_noswap, digits_swap},
561       {digits_width, digits_height}, {DIGIT_WIDTH * 11, DIGIT_HEIGHT},
562       0, 0},
563   /*}}}*/
564 #else
565   /*{{{  1:path*/
566   {path_bits, path_depth, {path_noswap, path_swap},
567       {path_width, path_height}, {CELL_WIDTH, CELL_HEIGHT}, 0, 0},
568   /*}}}*/
569 #endif /* XMRED */
570   /*{{{  1:den*/
571   {hden_bits, hden_depth, {hden_noswap,  hden_swap},
572       {hden_width, hden_height}, {CELL_WIDTH, CELL_HEIGHT},
573       0, BORDER_HALO_MASK},
574   /*}}}*/
575 #ifndef XMRED
576   /*{{{  1:ball*/
577   {ball_bits, ball_depth, {ball_noswap, ball_swap},
578       {ball_width, ball_height}, {BALL_WIDTH, BALL_HEIGHT},
579       0, 0},
580   /*}}}*/
581 #endif /* XMRED */
582   /*{{{  1:cherry*/
583   {cherry_bits, cherry_depth, {cherry_noswap, cherry_swap},
584       {cherry_width, cherry_height}, {CELL_WIDTH, CELL_HEIGHT},
585       0, BORDER_HALO_MASK | BORDER_MONOSWAP_EDGE_MASK},
586   /*}}}*/
587 #ifndef XMRED
588   /*{{{  6:apples (normal, rock, apple, split, decay, rot)*/
589   {aplnorm_bits, aplnorm_depth, {aplnorm_noswap, aplnorm_swap},
590       {aplnorm_width, aplnorm_height}, {CELL_WIDTH, CELL_HEIGHT},
591       0, 0},
592   {aplrock_bits, aplrock_depth, {aplrock_noswap, aplrock_swap},
593       {aplrock_width, aplrock_height}, {CELL_WIDTH, CELL_HEIGHT},
594       0, 0},
595   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_APPLE, REFLECT_ALIAS},
596   {aplspl_bits,  aplspl_depth, {aplspl_noswap, aplspl_swap},
597       {aplspl_width,  aplspl_height},  {CELL_WIDTH, CELL_HEIGHT},
598       0, 0},
599   {apldcy_bits,  apldcy_depth, {apldcy_noswap, apldcy_swap},
600       {apldcy_width,  apldcy_height},  {DECAY_WIDTH, DECAY_HEIGHT},
601       0, 0},
602   {aplrot_bits,  aplrot_depth, {aplrot_noswap, aplrot_swap},
603       {aplrot_width,  aplrot_height},  {ROT_WIDTH, ROT_HEIGHT},
604       0, 0},
605   /*}}}*/
606   /*{{{  3:apple ghosts*/
607   {gstnorm_bits, gstnorm_depth, {gstnorm_noswap, gstnorm_swap},
608       {gstnorm_width, gstnorm_height}, {CELL_WIDTH, CELL_HEIGHT},
609       0, 0},
610   {gstrock_bits, gstrock_depth, {gstrock_noswap, gstrock_swap},
611       {gstrock_width, gstrock_height}, {CELL_WIDTH, CELL_HEIGHT},
612       0, 0},
613   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_GHOST, REFLECT_ALIAS},
614   /*}}}*/
615   /*{{{  3:diamond*/
616   {gem1_bits, gem1_depth, {gem1_noswap, gem1_swap},
617       {gem1_width, gem1_height}, {CELL_WIDTH, CELL_HEIGHT},
618       0, BORDER_HALO_MASK},
619   {gem2_bits, gem2_depth, {gem2_noswap, gem2_swap},
620       {gem2_width, gem2_height}, {CELL_WIDTH, CELL_HEIGHT},
621       0, BORDER_HALO_MASK},
622   {gem3_bits, gem3_depth, {gem3_noswap, gem3_swap},
623       {gem3_width, gem3_height}, {CELL_WIDTH, CELL_HEIGHT},
624       0, BORDER_HALO_MASK},
625   /*}}}*/
626 #else
627   /*{{{  2:big apples (normal, edge)*/
628   {aplnorm_bits, aplnorm_depth, {aplnorm_noswap, aplnorm_swap},
629       {aplnorm_width, aplnorm_height}, {CELL_WIDTH, CELL_HEIGHT},
630       0, 0},
631   {bigedge_bits, bigedge_depth, {bigedge_noswap, bigedge_swap},
632       {bigedge_width, bigedge_height}, {CELL_WIDTH, CELL_HEIGHT},
633       0, 0},
634   /*}}}*/
635   /*{{{  2:big arrows (solid, edge)*/
636   {bigsarw_bits, bigsarw_depth, {bigsarw_noswap, bigsarw_swap},
637       {bigsarw_width, bigsarw_height}, {CELL_WIDTH, CELL_HEIGHT},
638       0, 0},
639   {bigearw_bits, bigearw_depth, {bigearw_noswap, bigearw_swap},
640       {bigearw_width, bigearw_height}, {CELL_WIDTH, CELL_HEIGHT},
641       0, 0},
642   /*}}}*/
643   /*{{{  2:small apples (normal, edge)*/
644   {aplsmall_bits, aplsmall_depth, {aplsmall_noswap, aplsmall_swap},
645       {aplsmall_width, aplsmall_height}, {CELL_WIDTH / 2, CELL_HEIGHT / 2},
646       0, 0},
647   {smledge_bits, smledge_depth, {smledge_noswap, smledge_swap},
648       {smledge_width, smledge_height}, {CELL_WIDTH / 2, CELL_HEIGHT / 2},
649       0, 0},
650   /*}}}*/
651   /*{{{  2:small arrows (solid, edge)*/
652   {smlsarw_bits, smlsarw_depth, {smlsarw_noswap, smlsarw_swap},
653       {smlsarw_width, smlsarw_height}, {CELL_WIDTH / 2, CELL_HEIGHT / 2},
654       0, 0},
655   {smlearw_bits, smlearw_depth, {smlearw_noswap, smlearw_swap},
656       {smlearw_width, smlearw_height}, {CELL_WIDTH / 2, CELL_HEIGHT / 2},
657       0, 0},
658   /*}}}*/
659 #endif /* XMRED */
660   /*{{{  1:extra bold*/
661   {xtrbold_bits,  xtrbold_depth, {xtrbold_noswap, xtrbold_swap},
662       {xtrbold_width,  xtrbold_height},
663       {CELL_WIDTH / 2 * 5, CELL_HEIGHT / 2}, 0, 0},
664   /*}}}*/
665 #ifndef XMRED
666   /*{{{  1:extra faint*/
667   {xtrfaint_bits, xtrfaint_depth, {xtrfaint_noswap, xtrfaint_swap},
668       {xtrfaint_width, xtrfaint_height},
669       {CELL_WIDTH / 2 * 5, CELL_HEIGHT / 2}, 0, 0},
670   /*}}}*/
671   /*{{{  2:xtra source*/
672   {hxtraw1_bits, hxtraw1_depth, {hxtraw1_noswap, hxtraw1_swap},
673       {hxtraw1_width, hxtraw1_height}, {CELL_WIDTH, CELL_HEIGHT},
674       0, BORDER_HALO_MASK},
675   {hxtraw2_bits, hxtraw2_depth, {hxtraw2_noswap, hxtraw2_swap},
676       {hxtraw2_width, hxtraw2_height}, {CELL_WIDTH, CELL_HEIGHT},
677       0, BORDER_HALO_MASK},
678   /*}}}*/
679   /*{{{  12:normal (ul, dr, l, r, ur, dl)*/
680   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_NORMAL + 8, REFLECT_VERTICAL},
681   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_NORMAL + 9, REFLECT_VERTICAL},
682   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_NORMAL + 6, REFLECT_DIAGONAL},
683   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_NORMAL + 7, REFLECT_DIAGONAL},
684   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_NORMAL + 6, REFLECT_VERTICAL},
685   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_NORMAL + 7, REFLECT_VERTICAL},
686   {hnormw1_bits, hnormw1_depth, {hnormw1_noswap, hnormw1_swap},
687       {hnormw1_width, hnormw1_height}, {CELL_WIDTH, CELL_HEIGHT},
688       0, BORDER_HALO_MASK},
689   {hnormw2_bits, hnormw2_depth, {hnormw2_noswap, hnormw2_swap},
690       {hnormw2_width, hnormw2_height}, {CELL_WIDTH, CELL_HEIGHT},
691       0, BORDER_HALO_MASK},
692   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_NORMAL + 2, REFLECT_HORIZONTAL},
693   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_NORMAL + 3, REFLECT_HORIZONTAL},
694   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_NORMAL + 2, REFLECT_VERTICAL},
695   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_NORMAL + 3, REFLECT_VERTICAL},
696   /*}}}*/
697   /*{{{  12:muncher (ul, dr, l, r, ur, dl)*/
698   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_MUNCHER + 8, REFLECT_VERTICAL},
699   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_MUNCHER + 9, REFLECT_VERTICAL},
700   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_MUNCHER + 6, REFLECT_DIAGONAL},
701   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_MUNCHER + 7, REFLECT_DIAGONAL},
702   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_MUNCHER + 6, REFLECT_VERTICAL},
703   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_MUNCHER + 7, REFLECT_VERTICAL},
704   {hmnchw1_bits, hmnchw1_depth, {hmnchw1_noswap, hmnchw1_swap},
705       {hmnchw1_width, hmnchw1_height}, {CELL_WIDTH, CELL_HEIGHT},
706       0, BORDER_HALO_MASK},
707   {hmnchw2_bits, hmnchw2_depth, {hmnchw2_noswap, hmnchw2_swap},
708       {hmnchw2_width, hmnchw2_height}, {CELL_WIDTH, CELL_HEIGHT},
709       0, BORDER_HALO_MASK},
710   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_MUNCHER + 2, REFLECT_HORIZONTAL},
711   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_MUNCHER + 3, REFLECT_HORIZONTAL},
712   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_MUNCHER + 2, REFLECT_VERTICAL},
713   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_MUNCHER + 3, REFLECT_VERTICAL},
714   /*}}}*/
715   /*{{{  12:xtra (ul, dr, l, r, ur, dl)*/
716   {hxtraw1_bits, hxtraw1_depth, {hxtraw1_noswap, hxtraw1_swap},
717       {hxtraw1_width, hxtraw1_height}, {CELL_WIDTH, CELL_HEIGHT},
718       0, BORDER_HALO_MASK},
719   {hxtraw2_bits, hxtraw2_depth, {hxtraw2_noswap, hxtraw2_swap},
720       {hxtraw2_width, hxtraw2_height}, {CELL_WIDTH, CELL_HEIGHT},
721       0, BORDER_HALO_MASK},
722   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_XTRA + 0, REFLECT_ALIAS},
723   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_XTRA + 1, REFLECT_ALIAS},
724   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_XTRA + 0, REFLECT_ALIAS},
725   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_XTRA + 1, REFLECT_ALIAS},
726   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_XTRA + 0, REFLECT_ALIAS},
727   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_XTRA + 1, REFLECT_ALIAS},
728   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_XTRA + 0, REFLECT_ALIAS},
729   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_XTRA + 1, REFLECT_ALIAS},
730   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_XTRA + 0, REFLECT_ALIAS},
731   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_XTRA + 1, REFLECT_ALIAS},
732   /*}}}*/
733   /*{{{  12:drone (ul, dr, l, r, ur, dl)*/
734   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_DRONE + 8, REFLECT_VERTICAL},
735   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_DRONE + 9, REFLECT_VERTICAL},
736   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_DRONE + 6, REFLECT_DIAGONAL},
737   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_DRONE + 7, REFLECT_DIAGONAL},
738   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_DRONE + 6, REFLECT_VERTICAL},
739   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_DRONE + 7, REFLECT_VERTICAL},
740   {hdronw1_bits, hdronw1_depth, {hdronw1_noswap, hdronw1_swap},
741       {hdronw1_width, hdronw1_height}, {CELL_WIDTH, CELL_HEIGHT},
742       0, BORDER_HALO_MASK},
743   {hdronw2_bits, hdronw2_depth, {hdronw2_noswap, hdronw2_swap},
744       {hdronw2_width, hdronw2_height}, {CELL_WIDTH, CELL_HEIGHT},
745       0, BORDER_HALO_MASK},
746   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_DRONE + 2, REFLECT_HORIZONTAL},
747   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_DRONE + 3, REFLECT_HORIZONTAL},
748   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_DRONE + 2, REFLECT_VERTICAL},
749   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_DRONE + 3, REFLECT_VERTICAL},
750   /*}}}*/
751   /*{{{  6:player (ul, dr, l)*/
752   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_PLAYER + 8, REFLECT_VERTICAL},
753   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_PLAYER + 9, REFLECT_VERTICAL},
754   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_PLAYER + 6, REFLECT_DIAGONAL},
755   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_PLAYER + 7, REFLECT_DIAGONAL},
756   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_PLAYER + 6, REFLECT_VERTICAL},
757   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_PLAYER + 7, REFLECT_VERTICAL},
758   /*}}}*/
759 #endif /* XMRED */
760   {hplyrw1_bits, hplyrw1_depth, {hplyrw1_noswap, hplyrw1_swap},
761       {hplyrw1_width, hplyrw1_height}, {CELL_WIDTH, CELL_HEIGHT},
762       0, BORDER_HALO_MASK},
763 #ifndef XMRED
764   {hplyrw2_bits, hplyrw2_depth, {hplyrw2_noswap, hplyrw2_swap},
765       {hplyrw2_width, hplyrw2_height}, {CELL_WIDTH, CELL_HEIGHT},
766       0, BORDER_HALO_MASK},
767   /*{{{  4:player (ur, dl)*/
768   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_PLAYER + 2, REFLECT_HORIZONTAL},
769   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_PLAYER + 3, REFLECT_HORIZONTAL},
770   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_PLAYER + 2, REFLECT_VERTICAL},
771   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_PLAYER + 3, REFLECT_VERTICAL},
772   /*}}}*/
773   /*{{{  4:player push (l, r)*/
774   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_PLAYER_PUSH + 2, REFLECT_VERTICAL},
775   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_PLAYER_PUSH + 3, REFLECT_VERTICAL},
776   {hplyrs1_bits, hplyrs1_depth, {hplyrs1_noswap, hplyrs1_swap},
777       {hplyrs1_width, hplyrs1_height}, {CELL_WIDTH, CELL_HEIGHT},
778       0, BORDER_HALO_MASK},
779   {hplyrs2_bits, hplyrs2_depth, {hplyrs2_noswap, hplyrs2_swap},
780       {hplyrs2_width, hplyrs2_height}, {CELL_WIDTH, CELL_HEIGHT},
781       0, BORDER_HALO_MASK},
782   /*}}}*/
783   /*{{{  4:player rest (l, r)*/
784   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_PLAYER_REST + 2, REFLECT_VERTICAL},
785   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_PLAYER_REST + 3, REFLECT_VERTICAL},
786   {hplyrp1_bits, hplyrp1_depth, {hplyrp1_noswap, hplyrp1_swap},
787       {hplyrp1_width, hplyrp1_height}, {CELL_WIDTH, CELL_HEIGHT},
788       0, BORDER_HALO_MASK},
789   {hplyrp2_bits, hplyrp2_depth, {hplyrp2_noswap, hplyrp2_swap},
790       {hplyrp2_width, hplyrp2_height}, {CELL_WIDTH, CELL_HEIGHT},
791       0, BORDER_HALO_MASK},
792   /*}}}*/
793   /*{{{  2:player happy*/
794   {hplyrh1_bits, hplyrh1_depth, {hplyrh1_noswap, hplyrh1_swap},
795       {hplyrh1_width, hplyrh1_height}, {CELL_WIDTH, CELL_HEIGHT},
796       0, BORDER_HALO_MASK},
797   {hplyrh2_bits, hplyrh2_depth, {hplyrh2_noswap, hplyrh2_swap},
798       {hplyrh2_width, hplyrh2_height}, {CELL_WIDTH, CELL_HEIGHT},
799       0, BORDER_HALO_MASK},
800   /*}}}*/
801   /*{{{  16:player dead*/
802   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_PLAYER + 6, REFLECT_ALIAS},
803   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_PLAYER_DEAD + 0, REFLECT_ALIAS},
804   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_PLAYER + 10, REFLECT_ALIAS},
805   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_PLAYER_DEAD + 2, REFLECT_ALIAS},
806   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_PLAYER + 4, REFLECT_HORIZONTAL},
807   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_PLAYER_DEAD + 4, REFLECT_ALIAS},
808   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_PLAYER + 8, REFLECT_ALIAS},
809   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_PLAYER_DEAD + 6, REFLECT_ALIAS},
810   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_PLAYER + 4, REFLECT_ALIAS},
811   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_PLAYER_DEAD + 8, REFLECT_ALIAS},
812   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_PLAYER + 2, REFLECT_ALIAS},
813   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_PLAYER_DEAD + 10, REFLECT_ALIAS},
814   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_PLAYER + 6, REFLECT_HORIZONTAL},
815   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_PLAYER_DEAD + 12, REFLECT_ALIAS},
816   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_PLAYER + 0, REFLECT_ALIAS},
817   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_PLAYER_DEAD + 14, REFLECT_ALIAS},
818   /*}}}*/
819   /*{{{  10:squished*/
820   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_SQUISHED + 1, REFLECT_VERTICAL},
821   {hnormf_bits, hnormf_depth, {hnormf_noswap, hnormf_swap},
822       {hnormf_width, hnormf_height}, {CELL_WIDTH, CELL_HEIGHT / 4},
823       0, BORDER_HALO_MASK},
824   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_SQUISHED + 3, REFLECT_VERTICAL},
825   {hmnchf_bits, hmnchf_depth, {hmnchf_noswap, hmnchf_swap},
826       {hmnchf_width, hmnchf_height}, {CELL_WIDTH, CELL_HEIGHT / 4},
827       0, BORDER_HALO_MASK},
828   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_SQUISHED + 5, REFLECT_VERTICAL},
829   {hxtraf_bits, hxtraf_depth, {hxtraf_noswap, hxtraf_swap},
830       {hxtraf_width, hxtraf_height}, {CELL_WIDTH, CELL_HEIGHT / 4},
831       0, BORDER_HALO_MASK},
832   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_SQUISHED + 7, REFLECT_VERTICAL},
833   {hdronf_bits, hdronf_depth, {hdronf_noswap, hdronf_swap},
834       {hdronf_width, hdronf_height}, {CELL_WIDTH, CELL_HEIGHT / 4},
835       0, BORDER_HALO_MASK},
836   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_SQUISHED + 9, REFLECT_VERTICAL},
837   {hplyrf_bits, hplyrf_depth, {hplyrf_noswap, hplyrf_swap},
838       {hplyrf_width, hplyrf_height}, {CELL_WIDTH, CELL_HEIGHT / 4},
839       0, BORDER_HALO_MASK},
840   /*}}}*/
841   /*{{{  2:chomp (open, closed)*/
842   {hchmpo_bits, hchmpo_depth, {hchmpo_noswap, hchmpo_swap},
843       {hchmpo_width, hchmpo_height}, {CELL_WIDTH, CELL_HEIGHT},
844       0, BORDER_HALO_MASK},
845   {hchmpc_bits, hchmpc_depth, {hchmpc_noswap, hchmpc_swap},
846       {hchmpc_width, hchmpc_height}, {CELL_WIDTH, CELL_HEIGHT},
847       0, BORDER_HALO_MASK},
848   /*}}}*/
849   /*{{{  8:m r i s*/
850   {solidm_bits, solidm_depth, {solidm_noswap, solidm_swap},
851       {solidm_width, solidm_height}, {CELL_WIDTH, CELL_HEIGHT},
852       0, BORDER_HALO_MASK},
853   {solidr_bits, solidr_depth, {solidr_noswap, solidr_swap},
854       {solidr_width, solidr_height}, {CELL_WIDTH, CELL_HEIGHT},
855       0, BORDER_HALO_MASK},
856   {solidi_bits, solidi_depth, {solidi_noswap, solidi_swap},
857       {solidi_width, solidi_height}, {CELL_WIDTH, CELL_HEIGHT},
858       0, BORDER_HALO_MASK},
859   {solids_bits, solids_depth, {solids_noswap, solids_swap},
860       {solids_width, solids_height}, {CELL_WIDTH, CELL_HEIGHT},
861       0, BORDER_HALO_MASK},
862   {shellm_bits, shellm_depth, {shellm_noswap, shellm_swap},
863       {shellm_width, shellm_height}, {CELL_WIDTH, CELL_HEIGHT},
864       0, BORDER_HALO_MASK},
865   {shellr_bits, shellr_depth, {shellr_noswap, shellr_swap},
866       {shellr_width, shellr_height}, {CELL_WIDTH, CELL_HEIGHT},
867       0, BORDER_HALO_MASK},
868   {shelli_bits, shelli_depth, {shelli_noswap, shelli_swap},
869       {shelli_width, shelli_height}, {CELL_WIDTH, CELL_HEIGHT},
870       0, BORDER_HALO_MASK},
871   {shells_bits, shells_depth, {shells_noswap, shells_swap},
872       {shells_width, shells_height}, {CELL_WIDTH, CELL_HEIGHT},
873       0, BORDER_HALO_MASK},
874   /*}}}*/
875   /*{{{  1:seat*/
876   {seat_bits, seat_depth, {seat_noswap, seat_swap},
877       {seat_width, seat_height}, {CELL_WIDTH, 0}, 0, BORDER_HALO_MASK},
878   /*}}}*/
879   /*{{{  1:ghosting*/
880   {(unsigned char *)ghosting_bits, 1, {NULL},
881       {ghosting_width, ghosting_height}, {GHOSTING_WIDTH, GHOSTING_HEIGHT}},
882   /*}}}*/
883   /*{{{  5:prizes*/
884   {cake_bits, cake_depth, {cake_noswap, cake_swap},
885       {cake_width, cake_height}, {CELL_WIDTH, CELL_HEIGHT},
886       0, BORDER_HALO_MASK | BORDER_MONOSWAP_EDGE_MASK},
887   {spanner_bits, spanner_depth, {spanner_noswap, spanner_swap},
888       {spanner_width, spanner_height}, {CELL_WIDTH, CELL_HEIGHT},
889       0, BORDER_HALO_MASK | BORDER_MONOSWAP_EDGE_MASK},
890   {brolly_bits, brolly_depth, {brolly_noswap, brolly_swap},
891       {brolly_width, brolly_height}, {CELL_WIDTH, CELL_HEIGHT},
892       0, BORDER_HALO_MASK | BORDER_MONOSWAP_EDGE_MASK},
893   {mushrm_bits, mushrm_depth, {mushrm_noswap, mushrm_swap},
894       {mushrm_width, mushrm_height}, {CELL_WIDTH, CELL_HEIGHT},
895       0, BORDER_HALO_MASK | BORDER_MONOSWAP_EDGE_MASK},
896   {clock_bits, clock_depth, {clock_noswap, clock_swap},
897       {clock_width, clock_height}, {CELL_WIDTH, CELL_HEIGHT},
898       0, BORDER_HALO_MASK | BORDER_MONOSWAP_EDGE_MASK},
899   /*}}}*/
900 #else
901   /*{{{  3:red, green, blue*/
902   {red_bits, red_depth, {red_noswap, red_swap},
903       {red_width, red_height}, {CELL_WIDTH, CELL_HEIGHT},
904       0, BORDER_WHITE_EDGE_MASK | BORDER_HALO_MASK},
905   {green_bits, green_depth, {green_noswap, green_swap},
906       {green_width, green_height}, {CELL_WIDTH, CELL_HEIGHT},
907       0, BORDER_WHITE_EDGE_MASK | BORDER_HALO_MASK},
908   {blue_bits, blue_depth, {blue_noswap, blue_swap},
909       {blue_width, blue_height}, {CELL_WIDTH, CELL_HEIGHT},
910       0, BORDER_WHITE_EDGE_MASK | BORDER_HALO_MASK},
911   /*}}}*/
912   /*{{{  5:apples*/
913   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_CHERRY, REFLECT_HORIZONTAL},
914   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_CHERRY, REFLECT_HORIZONTAL},
915   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_CHERRY, REFLECT_HORIZONTAL},
916   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_CHERRY, REFLECT_HORIZONTAL},
917   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_CHERRY, REFLECT_HORIZONTAL},
918   /*}}}*/
919   /*{{{  1:apple drop*/
920   {NULL, 0, {NULL}, {0, 0}, {0, 0}, SPRITE_BIG_APPLE, REFLECT_HORIZONTAL},
921   /*}}}*/
922   /*{{{  1:include*/
923   {include_bits, include_depth, {include_noswap, include_swap},
924       {include_width, include_height}, {ICON_WIDTH, ICON_HEIGHT}, 0, 0},
925   /*}}}*/
926   /*{{{  2:iconi, boardi*/
927   {iconi_bits, iconi_depth, {iconi_noswap, iconi_swap},
928       {iconi_width, iconi_height}, {CELL_WIDTH, CELL_HEIGHT}, 0, 0},
929   {boardi_bits, boardi_depth, {boardi_noswap, boardi_swap},
930       {boardi_width, boardi_height}, {ICON_WIDTH, ICON_HEIGHT}, 0, 0},
931   /*}}}*/
932   /*{{{  2:flagoff, flagon*/
933   {warnoff_bits, warnoff_depth, {warnoff_noswap, warnoff_swap},
934       {warnoff_width, warnoff_height}, {WARNING_WIDTH, WARNING_HEIGHT}, 0, 0},
935   {warnon_bits, warnon_depth, {warnon_noswap, warnon_swap},
936       {warnon_width, warnon_height}, {WARNING_WIDTH, WARNING_HEIGHT}, 0, 0},
937   /*}}}*/
938 #endif /* XMRED */
939 };
940 /*}}}*/
941 /*{{{  extern SPRITE_DEF fills_def[FILLS] =*/
942 SPRITE_DEF fills_def[FILLS] =
943 {
944   {(unsigned char *)fill0_bits, 0, {NULL}, {fill0_width, fill0_height}},
945   {(unsigned char *)fill1_bits, 0, {NULL}, {fill1_width, fill1_height}},
946   {(unsigned char *)fill2_bits, 0, {NULL}, {fill2_width, fill2_height}},
947   {(unsigned char *)fill3_bits, 0, {NULL}, {fill3_width, fill3_height}},
948 };
949 /*}}}*/
950 /*{{{  extern VISUAL_CLASS CONST visual_class[] =*/
951 VISUAL_CLASS CONST visual_class[] =
952 {
953   {"PseudoColor", PseudoColor},
954   {"StaticColor", StaticColor},
955   {"GrayScale", GrayScale},
956   {"StaticGray", StaticGray},
957   {"DirectColor", DirectColor},
958   {"TrueColor", TrueColor},
959   {NULL}
960 };
961 /*}}}*/
962 /*}}}*/
963 /*{{{  public tables*/
964 /*{{{  unsigned backgrounds[][2] =*/
965 unsigned CONST backgrounds[][2] =
966 {
967   {COLOR_RED_BACK, COLOR_RED_FORE},
968   {COLOR_GREEN_BACK, COLOR_GREEN_FORE},
969   {COLOR_BLUE_BACK, COLOR_BLUE_FORE},
970 #ifndef XMRED
971   {COLOR_DRONE_BACK, COLOR_DRONE_FORE},
972 #endif /* XMRED */
973 };
974 /*}}}*/
975 /*}}}*/
976