1 diff -Nrup rubix-1.0.5/fillpoly.c rubix-1.0.5-avr32/fillpoly.c
2 --- rubix-1.0.5/fillpoly.c 2003-10-12 15:41:43.000000000 -0400
3 +++ rubix-1.0.5-avr32/fillpoly.c 2008-02-29 12:39:51.000000000 -0500
4 @@ -435,7 +435,7 @@ void fill_lines(device *d, int thecol)
8 - } else if (d->depth==16) { /* here 16bpp */
9 + } else if ((d->depth==16) | (d->depth==15)) { /* here 16bpp */
13 diff -Nrup rubix-1.0.5/line.c rubix-1.0.5-avr32/line.c
14 --- rubix-1.0.5/line.c 2003-10-12 14:15:19.000000000 -0400
15 +++ rubix-1.0.5-avr32/line.c 2008-02-29 12:39:51.000000000 -0500
16 @@ -1317,7 +1317,7 @@ void drawline(device *d, line *l)
20 - else if (d->depth==16)
21 + else if ((d->depth==16) | (d->depth==15))
23 else if (d->depth==24)
25 diff -Nrup rubix-1.0.5/Makefile rubix-1.0.5-avr32/Makefile
26 --- rubix-1.0.5/Makefile 2003-12-04 14:27:58.000000000 -0500
27 +++ rubix-1.0.5-avr32/Makefile 2008-02-29 12:58:30.000000000 -0500
29 # Customize to fit your needs (especially if it does not work for now).
34 #architecture=-DPC_ARCHI
40 CFLAGS=-Wall -O3 -fomit-frame-pointer -ffast-math \
41 -DGAMESDIR="\"$(GAMESDIR)\"" \
42 -D$(LANGUAGE) $(architecture)
44 #CFLAGS=-Wall -g -ffast-math -Iplayer $(architecture)
45 -XINC=-I/usr/X11R6/include
46 -XLIB=-L/usr/X11R6/lib -lX11
48 #the following should not be changed.
50 @@ -37,7 +33,7 @@ rubix : $(OBJ)
54 - install -c -s rubix $(GAMESDIR)
55 + install -c rubix $(GAMESDIR)
58 rm -f *.o *~ core *.bak *.dat gmon.out
59 diff -Nrup rubix-1.0.5/screen.c rubix-1.0.5-avr32/screen.c
60 --- rubix-1.0.5/screen.c 2004-04-26 04:26:05.000000000 -0400
61 +++ rubix-1.0.5-avr32/screen.c 2008-02-29 12:39:51.000000000 -0500
62 @@ -80,11 +80,17 @@ void error_statement(SCREEN *s)
64 int reset_data_buffers(SCREEN *s)
70 + if (s->depth == 15) {
76 - s->buffer=(char *)malloc(((SCREEN_X+7)/8)*SCREEN_Y*s->depth);
77 + s->buffer=(char *)malloc(((SCREEN_X+7)/8)*SCREEN_Y*temp);
81 @@ -106,7 +112,7 @@ int reset_data_buffers(SCREEN *s)
83 /* Sed - december 2003 - no it has to be 8 */
84 s->im=XCreateImage(s->d, DefaultVisual(s->d, DefaultScreen(s->d)),
85 - s->depth==32?24:s->depth, ZPixmap,
87 0, s->buffer, SCREEN_X, SCREEN_Y, 8, 0);
90 @@ -139,8 +145,8 @@ int init_screen(SCREEN *s)
92 s->depth=DefaultDepth(s->d, DefaultScreen(s->d));
94 - if (s->depth!=8 && s->depth!=16 && s->depth!=24) {
95 - fprintf(stderr, "screen depth not supported (only 8, 16 and 24bpp (which means 32bpp too) handled\n");
96 + if (s->depth!=8 && s->depth!=15 && s->depth!=16 && s->depth!=24) {
97 + fprintf(stderr, "screen depth not supported (only 8, 15, 16 and 24bpp (which means 32bpp too) handled\n");
101 @@ -182,10 +188,10 @@ int init_screen(SCREEN *s)
103 /* let's create and map our window */
104 s->w=XCreateWindow(s->d, DefaultRootWindow(s->d), 0, 0,
105 - SCREEN_X, SCREEN_Y, 3, s->depth==32?24:s->depth,
106 + SCREEN_X, SCREEN_Y, 3, s->depth,
107 CopyFromParent, CopyFromParent, 0, NULL);
108 s->h=XCreateWindow(s->d, DefaultRootWindow(s->d), 0, 0,
109 - HELP_X, HELP_Y, 3, s->depth==32?24:s->depth,
110 + HELP_X, HELP_Y, 3, s->depth,
111 CopyFromParent, CopyFromParent, 0, NULL);
113 xch.res_name = "rubix";
114 @@ -946,13 +952,18 @@ void close_screen(SCREEN *s)
115 void clear_screen(SCREEN *s)
117 /* fill s->im with pixel[10], avoid XPutPixel which is rather slow... */
119 + int i, w, dw, temp;
120 + if (s->depth == 15) {
128 XPutPixel(s->im, 0, 0, pixel[10]);
129 for (i=1; i<8*w; i++)
130 memcpy(s->buffer + i*dw, s->buffer, dw);
133 for (i=1; i<SCREEN_Y; i++)
134 memcpy(s->buffer + i*w, s->buffer, w);