Delete R_CropFlat

This commit is contained in:
Jaime Passos 2019-06-25 14:41:07 -03:00
parent 02c3710211
commit 0af9e865f9
2 changed files with 0 additions and 37 deletions

View File

@ -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);
}

View File

@ -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;