From 3c5ee78e8aa0b14fe131da597852c73e21d4b899 Mon Sep 17 00:00:00 2001 From: Misa Date: Thu, 25 Mar 2021 17:40:50 -0700 Subject: [PATCH] Add finalmode check to drawfinalmap call This fixes the finalstretch tile shifting persisting if you return to the main dimension and final_colormode isn't reset properly. It's possible to do so in the main game by using a teleporter in finalmode while having the Intermission 1 or 2 companion active. For custom levels, level makers can make a setup that automatically turns on finalstretch, goes to finalmode, and then returns to the main dimension. The only thing being... as a level maker myself, this tile shifting REALLY doesn't seem useful (and no one has ever used it because the setup to do so hadn't really been found or documented until this year). For one, the exact shift is randomized every time (there's an fRandom() call to cycle the colors). For two, it goes away after the player saves and reloads the level. And for three, it doesn't animate like it does in finalmode (this is the biggest reason IMO). Nevertheless, I've decided to keep support for this in custom levels, in case someone in the future does want to use it and is okay with the limitations. --- desktop_version/src/Render.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/desktop_version/src/Render.cpp b/desktop_version/src/Render.cpp index e3edb052..65eb655c 100644 --- a/desktop_version/src/Render.cpp +++ b/desktop_version/src/Render.cpp @@ -1560,7 +1560,7 @@ void gamerender(void) { ClearSurface(graphics.backBuffer); } - if (map.final_colormode) + if ((map.finalmode || map.custommode) && map.final_colormode) { graphics.drawfinalmap(); }