*** grx23/include/grdriver.h.orig Tue May 4 10:07:47 1999 --- grx23/include/grdriver.h Tue May 4 10:29:13 1999 *************** *** 51,59 **** _GrFrameDriverSVGA32H_LFB, /* Super VGA 16M color padded #2 */ #endif #else ! _GrFrameDriverXWIN8, /* X 8 bpp */ ! _GrFrameDriverXWIN16, /* X 16 bpp */ ! _GrFrameDriverXWIN24, /* X 24 bpp */ #endif _GrFrameDriverRAM1, /* mono */ _GrFrameDriverRAM4, /* 16 color planar */ --- 51,61 ---- _GrFrameDriverSVGA32H_LFB, /* Super VGA 16M color padded #2 */ #endif #else ! _GrFrameDriverXWIN8, /* X 8 bpp */ ! _GrFrameDriverXWIN16, /* X 16 bpp */ ! _GrFrameDriverXWIN24, /* X 24 bpp */ ! _GrFrameDriverXWIN32L, /* X 32 bpp padded #1 */ ! _GrFrameDriverXWIN32H, /* X 32 bpp padded #2 */ #endif _GrFrameDriverRAM1, /* mono */ _GrFrameDriverRAM4, /* 16 color planar */ *** grx23/src/fdrivers/fd_xwin.c.orig Sun May 24 21:37:40 1998 --- grx23/src/fdrivers/fd_xwin.c Wed May 5 11:02:45 1999 *************** *** 653,658 **** --- 653,659 ---- ); else { XImage ximage; + Visual *visual = DefaultVisual(_XGrDisplay,_XGrScreen); ximage.width = src->gf_lineoffset; ximage.height = sy + h; *************** *** 660,674 **** ximage.format = ZPixmap; ximage.data = src->gf_baseaddr[0]; ximage.byte_order = LSBFirst; ! ximage.bitmap_unit = _XGrBitsPerPixel; ! ximage.bitmap_bit_order = MSBFirst; ! ximage.bitmap_pad = _XGrBitsPerPixel; ximage.depth = _XGrDepth; ximage.bytes_per_line = src->gf_lineoffset; ximage.bits_per_pixel = _XGrBitsPerPixel; ! ximage.red_mask = 0L; ! ximage.green_mask = 0L; ! ximage.blue_mask = 0L; ximage.obdata = NULL; sttzero(&ximage.f); --- 661,675 ---- ximage.format = ZPixmap; ximage.data = src->gf_baseaddr[0]; ximage.byte_order = LSBFirst; ! ximage.bitmap_unit = BitmapUnit(_XGrDisplay); ! ximage.bitmap_bit_order = BitmapBitOrder(_XGrDisplay); ! ximage.bitmap_pad = BitmapPad(_XGrDisplay); ximage.depth = _XGrDepth; ximage.bytes_per_line = src->gf_lineoffset; ximage.bits_per_pixel = _XGrBitsPerPixel; ! ximage.red_mask = visual->red_mask; ! ximage.green_mask = visual->green_mask; ! ximage.blue_mask = visual->blue_mask; ximage.obdata = NULL; sttzero(&ximage.f); *************** *** 778,784 **** 1, /* number of planes */ 16, /* bits per pixel */ 16*16*1024L*1024L, /* max plane size the code can handle */ ! NULL, readpixel, drawpixel, drawline, --- 779,785 ---- 1, /* number of planes */ 16, /* bits per pixel */ 16*16*1024L*1024L, /* max plane size the code can handle */ ! init, readpixel, drawpixel, drawline, *************** *** 802,808 **** 1, /* number of planes */ 24, /* bits per pixel */ 24*16*1024L*1024L, /* max plane size the code can handle */ ! NULL, readpixel, drawpixel, drawline, --- 803,809 ---- 1, /* number of planes */ 24, /* bits per pixel */ 24*16*1024L*1024L, /* max plane size the code can handle */ ! init, readpixel, drawpixel, drawline, *************** *** 818,820 **** --- 819,868 ---- _GrFrDrvGenericPutScanline }; + GrFrameDriver _GrFrameDriverXWIN32L = { + GR_frameXWIN32L, /* frame mode */ + GR_frameRAM32L, /* compatible RAM frame mode */ + TRUE, /* onscreen */ + 4, /* line width alignment */ + 1, /* number of planes */ + 32, /* bits per pixel */ + 32*16*1024L*1024L, /* max plane size the code can handle */ + init, + readpixel, + drawpixel, + drawline, + drawhline, + drawvline, + drawblock, + drawbitmap, + drawpattern, + bitblt, + bltv2r, + bltr2v, + _GrFrDrvGenericGetIndexedScanline, + _GrFrDrvGenericPutScanline + }; + + GrFrameDriver _GrFrameDriverXWIN32H = { + GR_frameXWIN32H, /* frame mode */ + GR_frameRAM32H, /* compatible RAM frame mode */ + TRUE, /* onscreen */ + 4, /* line width alignment */ + 1, /* number of planes */ + 32, /* bits per pixel */ + 32*16*1024L*1024L, /* max plane size the code can handle */ + init, + readpixel, + drawpixel, + drawline, + drawhline, + drawvline, + drawblock, + drawbitmap, + drawpattern, + bitblt, + bltv2r, + bltr2v, + _GrFrDrvGenericGetIndexedScanline, + _GrFrDrvGenericPutScanline + }; *** grx23/src/fdrivers/ftable.c.orig Tue May 4 10:29:51 1999 --- grx23/src/fdrivers/ftable.c Wed May 5 11:49:20 1999 *************** *** 39,44 **** --- 39,46 ---- &_GrFrameDriverXWIN8, &_GrFrameDriverXWIN16, &_GrFrameDriverXWIN24, + &_GrFrameDriverXWIN32L, + &_GrFrameDriverXWIN32H, #endif /* now the drivers for RAM based context */ &_GrFrameDriverRAM1, *************** *** 49,56 **** &_GrFrameDriverRAM3x8, #else &_GrFrameDriverRAM24, - #endif - #if !defined(__XWIN__) && !defined(GRX_USE_RAM3x8) &_GrFrameDriverRAM32L, &_GrFrameDriverRAM32H, #endif --- 51,56 ---- *** grx23/src/pattern/patfbox.c.orig Tue Apr 28 21:30:54 1998 --- grx23/src/pattern/patfbox.c Tue Aug 25 14:37:02 1998 *************** *** 18,23 **** --- 18,25 ---- mouse_block(CURC,x1,y1,x2,y2); width = x2 - x1 + 1; height = y2 - y1 + 1; + x1 += CURC->gc_xoffset; + y1 += CURC->gc_yoffset; if(!p->gp_ispixmap) while(--height >= 0) _GrFillPattern(x1,y1++,width,p); else { *** grx23/src/vdrivers/vd_xwin.c.orig Tue May 4 09:34:28 1999 --- grx23/src/vdrivers/vd_xwin.c Tue May 4 16:22:39 1999 *************** *** 26,31 **** --- 26,32 ---- unsigned int _XGrColorOper; unsigned int _XGrDepth; unsigned int _XGrBitsPerPixel; + unsigned int _XGrScanlinePad; unsigned long _XGrColorPlanes[8]; unsigned int _XGrColorNumPlanes; *************** *** 61,68 **** static int setmode(GrVideoMode *mp,int noclear) { char name[100], *window_name, *icon_name; - int nc; - char *cu; int res; GRX_ENTER(); --- 62,67 ---- *************** *** 75,86 **** XResizeWindow (_XGrDisplay, _XGrWindow, mp->width, mp->height); ! cu = ""; ! nc = 1 << mp->bpp; ! if ((nc % 1024) == 0) nc >>= 10, cu = "K"; ! if ((nc % 1024) == 0) nc >>= 10, cu = "M"; ! ! sprintf (name, "grx %dx%dx%d%s", mp->width, mp->height, nc, cu); window_name = name; icon_name = name; --- 74,80 ---- XResizeWindow (_XGrDisplay, _XGrWindow, mp->width, mp->height); ! sprintf (name, "grx %dx%dx%d", mp->width, mp->height, mp->bpp); window_name = name; icon_name = name; *************** *** 227,237 **** XSetWindowAttributes attr; unsigned long mask; Visual *visual; GrVideoMode *mp; ! unsigned int depth, bpp; int private_colormap; int i, j, res; GRX_ENTER(); res = FALSE; private_colormap = FALSE; --- 221,234 ---- XSetWindowAttributes attr; unsigned long mask; Visual *visual; + XPixmapFormatValues *pfmt; + int pfmt_count; GrVideoMode *mp; ! unsigned int depth, bpp, pad; int private_colormap; int i, j, res; + GRX_ENTER(); res = FALSE; private_colormap = FALSE; *************** *** 373,399 **** grxwinext.frame = (char far *) _XGrWindow; ! bpp = depth; switch (depth) { case 1: grxwinext.mode = GR_frameXWIN1; break; case 4: grxwinext.mode = GR_frameXWIN4; break; case 8: grxwinext.mode = GR_frameXWIN8; break; ! case 15: bpp++; case 16: grxwinext.mode = GR_frameXWIN16; break; ! case 24: grxwinext.mode = GR_frameXWIN24; break; } _XGrBitsPerPixel = bpp; /* fixed size modes */ for (mp = &modes[1]; mp < &modes[itemsof(modes)-1]; mp++) { mp->present = TRUE; ! mp->bpp = depth; mp->lineoffset = (mp->width * bpp) / 8; } /* this is the variable size mode */ mp->present = FALSE; ! mp->bpp = depth; mp->lineoffset = 0; res = TRUE; done: --- 370,426 ---- grxwinext.frame = (char far *) _XGrWindow; ! pfmt = XListPixmapFormats (_XGrDisplay, &pfmt_count); ! if (!pfmt || pfmt_count <= 0) { ! XCloseDisplay (_XGrDisplay); ! fprintf (stderr, "GRX init: cannot list pixmap formats\n"); ! exit (1); ! } ! ! bpp = 0; ! pad = 0; ! for (i = 0; i < pfmt_count; i++) { ! if (pfmt[i].depth == depth) ! { ! bpp = pfmt[i].bits_per_pixel; ! pad = pfmt[i].scanline_pad; ! break; ! } ! } ! XFree (pfmt); ! if (!bpp) { ! XCloseDisplay (_XGrDisplay); ! fprintf (stderr, "GRX init: cannot find pixmap format\n"); ! exit (1); ! } ! switch (depth) { case 1: grxwinext.mode = GR_frameXWIN1; break; case 4: grxwinext.mode = GR_frameXWIN4; break; case 8: grxwinext.mode = GR_frameXWIN8; break; ! case 15: case 16: grxwinext.mode = GR_frameXWIN16; break; ! case 24: ! switch (bpp) { ! case 24: grxwinext.mode = GR_frameXWIN24; break; ! case 32: grxwinext.mode = ! (visual->red_mask & 0xff000000) ? GR_frameXWIN32H : GR_frameXWIN32L; break; ! } ! break; } _XGrBitsPerPixel = bpp; + _XGrScanlinePad = pad; /* fixed size modes */ for (mp = &modes[1]; mp < &modes[itemsof(modes)-1]; mp++) { mp->present = TRUE; ! mp->bpp = bpp; mp->lineoffset = (mp->width * bpp) / 8; } /* this is the variable size mode */ mp->present = FALSE; ! mp->bpp = bpp; mp->lineoffset = 0; res = TRUE; done: *** grx23/src/makefile.x11.orig Wed May 5 11:22:17 1999 --- grx23/src/makefile.x11 Wed May 5 11:22:32 1999 *************** *** 57,62 **** --- 57,64 ---- O= $(STD_O) $(ADDON_O) \ fdrivers/fd_xwin.o \ fdrivers/ram24.o \ + fdrivers/ram32l.o \ + fdrivers/ram32h.o \ fonts/fdv_xwin.o \ mouse/xwininp.o \ mouse/xwinkeys.o \