diff --git a/src/heretic/am_map.c b/src/heretic/am_map.c index 32a3f7b50b..386b6c2b2c 100644 --- a/src/heretic/am_map.c +++ b/src/heretic/am_map.c @@ -1118,6 +1118,7 @@ void AM_clearFB(int color) for (i = 0; i < finit_height; i++) { +#ifndef CRISPY_TRUECOLOR memcpy(I_VideoBuffer + i * finit_width, maplump + j + (MAPBGROUNDWIDTH << crispy->hires) - x3, x3); @@ -1126,7 +1127,30 @@ void AM_clearFB(int color) memcpy(I_VideoBuffer + i * finit_width + x2 + x3, maplump + j, x1); +#else + int z; + pixel_t *dest = I_VideoBuffer + i * finit_width; + byte *src = maplump + j + (MAPBGROUNDWIDTH << crispy->hires) - x3; + + for (z = 0; z < x3; z++) + { + dest[z] = colormaps[src[z]]; + } + dest += x3; + src += x3 - x2; + for (z = 0; z < x2; z++) + { + dest[z] = colormaps[src[z]]; + } + + dest += x2; + src = maplump + j; + for (z = 0; z < x1; z++) + { + dest[z] = colormaps[src[z]]; + } +#endif j += MAPBGROUNDWIDTH << crispy->hires; if (j >= MAPBGROUNDHEIGHT * MAPBGROUNDWIDTH) j = 0;