From f847ec7c59513d24e7cdcff449e8dd3ad2f26cf7 Mon Sep 17 00:00:00 2001 From: Misa Date: Mon, 2 Nov 2020 10:49:54 -0800 Subject: [PATCH] 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. --- desktop_version/src/Graphics.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/desktop_version/src/Graphics.cpp b/desktop_version/src/Graphics.cpp index 93f57069..aa62202f 100644 --- a/desktop_version/src/Graphics.cpp +++ b/desktop_version/src/Graphics.cpp @@ -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); }