mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2025-01-19 16:00:56 +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
|
else
|
||||||
{
|
{
|
||||||
int v;
|
int v;
|
||||||
|
// size of screen tile to pic pixel
|
||||||
|
int picupscale = h / pic->height;
|
||||||
|
|
||||||
for (v=0 ; v<height ; v++, dest += vid.width)
|
for (v=0 ; v<height ; v++, dest += vid.width)
|
||||||
{
|
{
|
||||||
int f, fstep, u;
|
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];
|
dest[u] = source[f>>16];
|
||||||
f += fstep;
|
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