From d8ba1268b455dfb22cd5c4c3de87e46f3a5858c7 Mon Sep 17 00:00:00 2001 From: Ove Kaaven Date: Mon, 15 May 2000 02:34:41 +0000 Subject: [PATCH] Use unsigned int instead of unsigned short in DirectDraw depth-conversion color map. --- dlls/ddraw/convert.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/ddraw/convert.c b/dlls/ddraw/convert.c index 76a6d8d2430..b6d84d9b2f1 100644 --- a/dlls/ddraw/convert.c +++ b/dlls/ddraw/convert.c @@ -12,7 +12,7 @@ static void pixel_convert_16_to_8(void *src, void *dst, DWORD width, DWORD heigh int y; if (palette != NULL) { - const unsigned short * pal = (unsigned short *) palette->screen_palents; + const unsigned int * pal = (unsigned int *) palette->screen_palents; for (y = height; y--; ) { #if defined(__i386__) && defined(__GNUC__) @@ -27,7 +27,7 @@ static void pixel_convert_16_to_8(void *src, void *dst, DWORD width, DWORD heigh "xor %%eax,%%eax\n" "1:\n" " lodsb\n" - " movw (%%edx,%%eax,2),%%ax\n" + " movw (%%edx,%%eax,4),%%ax\n" " stosw\n" " xor %%eax,%%eax\n" " loop 1b\n" @@ -52,7 +52,7 @@ static void palette_convert_16_to_8( LPPALETTEENTRY palent, void *screen_palette, DWORD start, DWORD count ) { int i; - unsigned short *pal = (unsigned short *) screen_palette; + unsigned int *pal = (unsigned int *) screen_palette; for (i = 0; i < count; i++) pal[start + i] = (((((unsigned short) palent[i].peRed) & 0xF8) << 8) | @@ -64,7 +64,7 @@ static void palette_convert_15_to_8( LPPALETTEENTRY palent, void *screen_palette, DWORD start, DWORD count ) { int i; - unsigned short *pal = (unsigned short *) screen_palette; + unsigned int *pal = (unsigned int *) screen_palette; for (i = 0; i < count; i++) pal[start + i] = (((((unsigned short) palent[i].peRed) & 0xF8) << 7) | -- 2.11.4.GIT