From 52a84cf3091b2bfd26b8e5505f7c39d0fad3941a Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Thu, 1 Dec 2016 21:43:27 +0000 Subject: [PATCH] Fix negative y offsets for both normal and y-flipped patches --- src/r_data.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/r_data.c b/src/r_data.c index f4910fa00..3e28b8ca2 100644 --- a/src/r_data.c +++ b/src/r_data.c @@ -160,6 +160,7 @@ static inline void R_DrawColumnInCache(column_t *patch, UINT8 *cache, INT32 orig if (position < 0) { count += position; + source -= position; // start further down the column position = 0; } @@ -193,6 +194,7 @@ static inline void R_DrawFlippedColumnInCache(column_t *patch, UINT8 *cache, INT if (position < 0) { count += position; + source += position; // start further UP the column position = 0; }