mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-11-18 00:49:42 +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:
parent
0e51dc48de
commit
0aa76cde56
1 changed files with 2 additions and 2 deletions
|
@ -1938,7 +1938,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;
|
||||
|
@ -1950,7 +1950,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;
|
||||
|
|
Loading…
Reference in a new issue