diff --git a/src/r_data.c b/src/r_data.c index db92c11fe..0e44ec8c7 100644 --- a/src/r_data.c +++ b/src/r_data.c @@ -1770,36 +1770,3 @@ void R_FlatTexture(size_t tex, UINT8 *flat) } } } - -void R_CropFlat(UINT8 *srcflat, UINT8 *destflat, - UINT16 srcwidth, UINT16 srcheight, - UINT16 resizewidth, UINT16 resizeheight, - UINT16 destwidth, UINT16 destheight) -{ - UINT16 y; - UINT16 position = 0; - for (y = 0; y < destheight; y++) - { - if (position > (srcwidth * srcheight)) - break; - if (srcwidth != resizewidth) - { - if (resizewidth > srcwidth) - { - UINT8 *pos2 = srcflat+position; - UINT8 lastpixel = *(pos2-1); - M_Memcpy(destflat, srcflat+position, destwidth); - memset(pos2, lastpixel, resizewidth-srcwidth); - } - else - M_Memcpy(destflat, srcflat+position, resizewidth); - } - else - M_Memcpy(destflat, srcflat+position, destwidth); - destflat += destwidth; - position += srcwidth; - } - - while (y++ < min(resizeheight, srcheight)) - memset(destflat + (y * destwidth), *(destflat - 1), destwidth); -} diff --git a/src/r_data.h b/src/r_data.h index c528fcfe1..9af621142 100644 --- a/src/r_data.h +++ b/src/r_data.h @@ -103,10 +103,6 @@ boolean R_CheckIfPatch(lumpnum_t lump); void R_FlatPatch(patch_t *patch, UINT8 *flat); void R_FlatTexture(size_t tex, UINT8 *flat); -void R_CropFlat(UINT8 *srcflat, UINT8 *destflat, - UINT16 srcwidth, UINT16 srcheight, - UINT16 resizewidth, UINT16 resizeheight, - UINT16 destwidth, UINT16 destheight); extern INT32 numtextures;