From de2457bb2a3da8c895da4cd4a45f4ad07e4735d2 Mon Sep 17 00:00:00 2001 From: Denis Pauk Date: Wed, 2 Oct 2019 22:07:57 +0300 Subject: [PATCH] Copy drawn lines if picture scalled --- src/client/refresh/soft/sw_draw.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/client/refresh/soft/sw_draw.c b/src/client/refresh/soft/sw_draw.c index c9fe788c..47061881 100644 --- a/src/client/refresh/soft/sw_draw.c +++ b/src/client/refresh/soft/sw_draw.c @@ -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>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); + } } } }