From 7f55b0e887ffc0280c88d8e7bd1d794d816b5938 Mon Sep 17 00:00:00 2001 From: Misa Date: Tue, 13 Apr 2021 18:26:06 -0700 Subject: [PATCH] Increase threshold for drawing top entities at bottom of screen In a vertically-warping room, the 'height' of the room becomes 232 pixels, regardless of if you have a room name or not. So the remaining 8 rows of pixels at the bottom of the screen corresponds with the first 8 rows of pixels at the top of the screen, and entities in the bottom 8 rows of pixels get teleported to the top of the screen. The screen wrapping drawing code doesn't draw entities in the top 8 rows of pixels at the bottom, leading to a discontinuous effect where it looks like vertically-warping entities don't neatly change from the bottom to the top or vice versa - this is especially noticeable with enemies. To fix this, just increase the threshold for drawing top entities at the bottom of the screen by 8 pixels. --- desktop_version/src/Graphics.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/desktop_version/src/Graphics.cpp b/desktop_version/src/Graphics.cpp index 6e8087f9..e10af945 100644 --- a/desktop_version/src/Graphics.cpp +++ b/desktop_version/src/Graphics.cpp @@ -1798,7 +1798,7 @@ void Graphics::drawentity(const int i, const int yoff) } wrappedPoint.y = tpoint.y; - if (tpoint.y < 0) + if (tpoint.y < 8) { wrapY = true; wrappedPoint.y += 232;