1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-26 06:28:30 +02:00

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.
This commit is contained in:
Misa 2021-04-13 18:26:06 -07:00 committed by Ethan Lee
parent 8b042a5813
commit 7f55b0e887

View File

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