1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-22 17:49:43 +01:00

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.
This commit is contained in:
Misa 2021-12-20 20:13:36 -08:00
parent 44ebb19d77
commit caebde9e33

View file

@ -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;