Bug#47972: Please add this 16 bit patch
Package: mandelspawn
Version: 0.07pl2-1
Severity: wishlist
Please add this patch to support 16 Bit direct "iteration to colour"
mapping.
May the Source be with you.
Goswin
--------------------------------------------------------------------------
diff -Nurd mandelspawn-0.07pl2/xms/Ms.c mandelspawn-0.07pl2.mrvn/xms/Ms.c
--- mandelspawn-0.07pl2/xms/Ms.c Tue Aug 24 20:52:59 1993
+++ mandelspawn-0.07pl2.mrvn/xms/Ms.c Thu Oct 21 19:25:37 1999
@@ -72,6 +72,7 @@
#define DISP_8plane 6 /* typical 8-plane framebuffer */
#define DISP_32plane 8 /* typical 24/32-plane framebuffer */
#define DISP_generic 10 /* none of the above */
+#define DISP_16plane32 12 /* typical 16-plane framebuffer */
/* Magic for finding out the machine's byte order */
@@ -367,6 +368,10 @@
w->ms.rectbuffer->bitmap_unit == 32)
w->ms.type=DISP_32plane;
else
+ if(w->ms.rectbuffer->bits_per_pixel == 16 &&
+ w->ms.rectbuffer->bitmap_unit == 32)
+ w->ms.type=DISP_16plane32;
+ else
{ w->ms.type=DISP_generic;
XtAppWarning(thisApp,
"No special case support for this display type;\n\
@@ -872,6 +877,32 @@
w->ms.rectbuffer->data + (w->ms.rectbuffer->bytes_per_line * j);
for(i=0; i<width; i++)
{ *bufp++ = pixels[*datap++];
+ }
+ }
+ }
+ break;
+ case ITER_BYTE|DISP_16plane32:
+ /* Quick-and-dirty drawing of 8-bit values on 16-plane displays */
+ { unsigned char *datap = (unsigned char *) data;
+ for(j=0; j<height; j++)
+ { unsigned short *bufp= (unsigned long *) ((unsigned char *)
+ w->ms.rectbuffer->data + (w->ms.rectbuffer->bytes_per_line * j));
+ for(i=0; i<width; i++)
+ { /* *bufp++ = pixels[*datap++] + pixels[*datap++] << 16; */
+ *bufp++ = (*datap++);
+ }
+ }
+ }
+ break;
+ case ITER_WORD|DISP_16plane32:
+ /* Quick-and-dirty drawing of 16-bit values on 16-plane displays */
+ { unsigned short *datap = (unsigned short *) data;
+ for(j=0; j<height; j++)
+ { unsigned short *bufp= (unsigned long *) ((unsigned char *)
+ w->ms.rectbuffer->data + (w->ms.rectbuffer->bytes_per_line * j));
+ for(i=0; i<width; i++)
+ { /* *bufp++ = pixels[*datap++] + pixels[*datap++] << 16; */
+ *bufp++ = (*datap++);
}
}
}
-------------------------------------------------------------------------------
-- System Information
Debian Release: potato
Architecture: i386
Kernel: Linux mrvnbook 2.2.12 #8 Thu Sep 30 17:00:39 CEST 1999 i686
Versions of packages mandelspawn depends on:
ii libc6 2.1.2-5 GNU C Library: Shared libraries an
ii xlib6g 3.3.5-1 shared libraries required by X cli
Reply to: