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

Fix tower background interpolation when scrolling from top

On the deltaframes of the tower background, there would be "pixel bleed"
if the tower background would be scrolling from the top. This is because
there wouldn't be any more pixels from above the screen to grab, because
the background rendering functions didn't draw any pixels above the
screen. But they couldn't draw any pixels above the screen, because that
was simply the end of the buffer. But now that the buffer is expanded,
we can now draw above the screen, and fix this glitchy interpolation
rendering.
This commit is contained in:
Misa 2020-11-02 10:49:54 -08:00 committed by Ethan Lee
parent b98c99fd7a
commit f847ec7c59

View File

@ -2507,7 +2507,7 @@ void Graphics::updatetowerbackground()
{
int off = map.scrolldir == 0 ? 0 : map.bscroll;
//Draw the whole thing; needed for every colour cycle!
for (int j = 0; j < 32; j++)
for (int j = -1; j < 32; j++)
{
for (int i = 0; i < 40; i++)
{
@ -2526,6 +2526,8 @@ void Graphics::updatetowerbackground()
{
for (int i = 0; i < 40; i++)
{
temp = map.tower.backat(i, -1, map.bypos);
drawtowertile3(i * 8, -1*8 - (map.bypos % 8), temp, map.colstate);
temp = map.tower.backat(i, 0, map.bypos);
drawtowertile3(i * 8, -(map.bypos % 8), temp, map.colstate);
}