mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-26 20:11:47 +00:00
Delete R_CropFlat
This commit is contained in:
parent
9cc870931a
commit
48c1fcd731
2 changed files with 0 additions and 37 deletions
33
src/r_data.c
33
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);
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -103,10 +103,6 @@ boolean R_CheckIfPatch(lumpnum_t lump);
|
||||||
|
|
||||||
void R_FlatPatch(patch_t *patch, UINT8 *flat);
|
void R_FlatPatch(patch_t *patch, UINT8 *flat);
|
||||||
void R_FlatTexture(size_t tex, 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;
|
extern INT32 numtextures;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue