mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-10 07:12:07 +00:00
Copy drawn lines if picture scalled
This commit is contained in:
parent
70a94f759f
commit
de2457bb2a
1 changed files with 18 additions and 0 deletions
|
@ -209,6 +209,9 @@ RE_Draw_StretchPicImplementation (int x, int y, int w, int h, const image_t *pic
|
|||
else
|
||||
{
|
||||
int v;
|
||||
// size of screen tile to pic pixel
|
||||
int picupscale = h / pic->height;
|
||||
|
||||
for (v=0 ; v<height ; v++, dest += vid.width)
|
||||
{
|
||||
int f, fstep, u;
|
||||
|
@ -221,6 +224,21 @@ RE_Draw_StretchPicImplementation (int x, int y, int w, int h, const image_t *pic
|
|||
dest[u] = source[f>>16];
|
||||
f += fstep;
|
||||
}
|
||||
if (picupscale > 1)
|
||||
{
|
||||
int i;
|
||||
pixel_t *dest_orig = dest;
|
||||
|
||||
// copy first line to fill whole sector
|
||||
for (i=1; i < picupscale; i++)
|
||||
{
|
||||
// go to next line
|
||||
dest += vid.width;
|
||||
memcpy (dest, dest_orig, w);
|
||||
}
|
||||
// skip updated lines
|
||||
v += (picupscale - 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue