From 76d71bda926d11eb1315bf1e0fe36fa39d87ec59 Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Fri, 25 Mar 2016 19:43:17 +0000 Subject: [PATCH] destend now scales the added-on patch width properly if needed --- src/v_video.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/v_video.c b/src/v_video.c index df81ac6d..3eb71bb0 100644 --- a/src/v_video.c +++ b/src/v_video.c @@ -477,7 +477,16 @@ void V_DrawFixedPatch(fixed_t x, fixed_t y, fixed_t pscale, INT32 scrn, patch_t } deststart = desttop; - destend = desttop + SHORT(patch->width) * dupx; + if (pscale != FRACUNIT) // scale width properly + { + fixed_t pwidth = SHORT(patch->width)<>= FRACBITS; + destend = desttop + pwidth; + } + else + destend = desttop + SHORT(patch->width) * dupx; for (col = 0; (col>>FRACBITS) < SHORT(patch->width); col += colfrac, ++x, desttop++) {