DOS updates from Daniel Borca

This commit is contained in:
Brian Paul 2003-07-11 16:33:43 +00:00
parent 356959952c
commit 44c699949a
2 changed files with 21 additions and 19 deletions

View file

@ -49,7 +49,7 @@ Available options:
default = no
HAVE_MMX=1 allow MMX specializations, provided your assembler
supports MMX instruction set. However, the true CPU
capabilities are checked at run-time to avoid crashes.
capabilities are checked at run-time to avoid lockups.
default = no
HAVE_SSE=1 (see HAVE_MMX)
default = no
@ -80,8 +80,7 @@ FAQ:
1. Compilation
Q) I tried to run `make' and it exits because `gcc' complains it cannot find
some stupid file.
Q) `make' barfs and exits because it cannot find some stupid file.
A) You need LFN support.
A) When compiling for Glide (FX=1), pay attention to Glide path.
@ -89,10 +88,10 @@ FAQ:
compile some demo.
A) Upgrade to DJGPP 2.04.
A) Add `vsnprintf.c' to the CORE_SOURCES in `src/Makefile.DJ' (untested!).
A) The following hack should be safe in 90% of the cases, but if anything
goes wrong, don't come back to me crying. Anyway, patch `src/imports.c'
with the following line:
A) Patch `src/mesa/main/imports.c' with the following line:
#define vsnprintf(buf, max, fmt, arg) vsprintf(buf, fmt, arg)
This hack should be safe in 90% of the cases, but if anything goes wrong,
don't come back to me crying.
Q) `make' complains about DXE3 or something, yet it builds the libraries.
A) DXE3 refers to the DJGPP dynamic modules. You'll need either the latest

View file

@ -58,9 +58,9 @@ int vl_current_offset, vl_current_delta;
/* These lookup tables are used to extract RGB values in [0,255]
* from 15/16-bit pixel values.
*/
static unsigned char pix15r[0x10000];
static unsigned char pix15g[0x10000];
static unsigned char pix15b[0x10000];
static unsigned char pix15r[0x8000];
static unsigned char pix15g[0x8000];
static unsigned char pix15b[0x8000];
static unsigned char pix16r[0x10000];
static unsigned char pix16g[0x10000];
static unsigned char pix16b[0x10000];
@ -226,6 +226,7 @@ static void v_getrgba15 (unsigned int offset, unsigned char rgba[4])
{
word32 c = ((word16 *)vl_current_read_buffer)[offset];
#if HUGE_LOOKUP
c &= 0x7fff;
rgba[0] = pix15r[c];
rgba[1] = pix15g[c];
rgba[2] = pix15b[c];
@ -378,18 +379,20 @@ void v_init_pixeltables (void)
for (pixel = 0; pixel <= 0xffff; pixel++) {
unsigned int r, g, b;
/* 15bit */
r = (pixel & 0x7c00) >> 8;
g = (pixel & 0x03E0) >> 3;
b = (pixel & 0x001F) << 2;
if (pixel <= 0x7fff) {
/* 15bit */
r = (pixel & 0x7c00) >> 8;
g = (pixel & 0x03E0) >> 3;
b = (pixel & 0x001F) << 2;
r = (unsigned int)(((double)r * 255. / 0x7c) + 0.5);
g = (unsigned int)(((double)g * 255. / 0x7c) + 0.5);
b = (unsigned int)(((double)b * 255. / 0x7c) + 0.5);
r = (unsigned int)(((double)r * 255. / 0x7c) + 0.5);
g = (unsigned int)(((double)g * 255. / 0x7c) + 0.5);
b = (unsigned int)(((double)b * 255. / 0x7c) + 0.5);
pix15r[pixel] = r;
pix15g[pixel] = g;
pix15b[pixel] = b;
pix15r[pixel] = r;
pix15g[pixel] = g;
pix15b[pixel] = b;
}
/* 16bit */
r = (pixel & 0xF800) >> 8;