Commit d8ba1268 authored by Ove Kaaven's avatar Ove Kaaven Committed by Alexandre Julliard

Use unsigned int instead of unsigned short in DirectDraw

depth-conversion color map.
parent d34205ef
...@@ -12,7 +12,7 @@ static void pixel_convert_16_to_8(void *src, void *dst, DWORD width, DWORD heigh ...@@ -12,7 +12,7 @@ static void pixel_convert_16_to_8(void *src, void *dst, DWORD width, DWORD heigh
int y; int y;
if (palette != NULL) { 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--; ) { for (y = height; y--; ) {
#if defined(__i386__) && defined(__GNUC__) #if defined(__i386__) && defined(__GNUC__)
...@@ -27,7 +27,7 @@ static void pixel_convert_16_to_8(void *src, void *dst, DWORD width, DWORD heigh ...@@ -27,7 +27,7 @@ static void pixel_convert_16_to_8(void *src, void *dst, DWORD width, DWORD heigh
"xor %%eax,%%eax\n" "xor %%eax,%%eax\n"
"1:\n" "1:\n"
" lodsb\n" " lodsb\n"
" movw (%%edx,%%eax,2),%%ax\n" " movw (%%edx,%%eax,4),%%ax\n"
" stosw\n" " stosw\n"
" xor %%eax,%%eax\n" " xor %%eax,%%eax\n"
" loop 1b\n" " loop 1b\n"
...@@ -52,7 +52,7 @@ static void palette_convert_16_to_8( ...@@ -52,7 +52,7 @@ static void palette_convert_16_to_8(
LPPALETTEENTRY palent, void *screen_palette, DWORD start, DWORD count LPPALETTEENTRY palent, void *screen_palette, DWORD start, DWORD count
) { ) {
int i; int i;
unsigned short *pal = (unsigned short *) screen_palette; unsigned int *pal = (unsigned int *) screen_palette;
for (i = 0; i < count; i++) for (i = 0; i < count; i++)
pal[start + i] = (((((unsigned short) palent[i].peRed) & 0xF8) << 8) | pal[start + i] = (((((unsigned short) palent[i].peRed) & 0xF8) << 8) |
...@@ -64,7 +64,7 @@ static void palette_convert_15_to_8( ...@@ -64,7 +64,7 @@ static void palette_convert_15_to_8(
LPPALETTEENTRY palent, void *screen_palette, DWORD start, DWORD count LPPALETTEENTRY palent, void *screen_palette, DWORD start, DWORD count
) { ) {
int i; int i;
unsigned short *pal = (unsigned short *) screen_palette; unsigned int *pal = (unsigned int *) screen_palette;
for (i = 0; i < count; i++) for (i = 0; i < count; i++)
pal[start + i] = (((((unsigned short) palent[i].peRed) & 0xF8) << 7) | pal[start + i] = (((((unsigned short) palent[i].peRed) & 0xF8) << 7) |
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment