From caebde9e335e045119ac75f275c7641e4bcde2d4 Mon Sep 17 00:00:00 2001 From: Misa Date: Mon, 20 Dec 2021 20:13:36 -0800 Subject: [PATCH] Fix warp sprites of big sprites sometimes not being drawn I noticed when going frame-by-frame in Vertigo that sometimes the wrapping enemies at the top sometimes just "popped" in frame. This is because the sprite warp code only draws the warping sprite of sprites at the bottom of the screen if they're below y=210. However, the warp point starts at y=232, and warp sprites can be at most 32x32, which is exactly the case with the Vertigo sprites, which are exactly 32x32. So the warp code should start warping sprites if they're below y=200 (232 - 32) instead. Horizontal warping also has this problem; it warps at x=320 and starts drawing warp sprites at x=300, even though it should start drawing at x=288 (320 - 32). I've gone ahead and fixed that as well. --- desktop_version/src/Graphics.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/desktop_version/src/Graphics.cpp b/desktop_version/src/Graphics.cpp index 6e391b1b..ac8072b2 100644 --- a/desktop_version/src/Graphics.cpp +++ b/desktop_version/src/Graphics.cpp @@ -1902,7 +1902,7 @@ void Graphics::drawentity(const int i, const int yoff) wrapX = true; wrappedPoint.x += 320; } - else if (tpoint.x > 300) + else if (tpoint.x > 288) { wrapX = true; wrappedPoint.x -= 320; @@ -1914,7 +1914,7 @@ void Graphics::drawentity(const int i, const int yoff) wrapY = true; wrappedPoint.y += 232; } - else if (tpoint.y > 210) + else if (tpoint.y > 200) { wrapY = true; wrappedPoint.y -= 232;