From ccd6cfab7fec5f28fdb2db013bf4cd8ff3a826d2 Mon Sep 17 00:00:00 2001 From: Misa Date: Mon, 22 Jun 2020 20:49:16 -0700 Subject: [PATCH] Round map.colstate to nearest 5 when entering options menus Also set map.tdrawback to true when leaving the menu. This is to fix the interpolated color of the tower background persisting, as well as making sure the menu background doesn't persist when exiting. --- desktop_version/src/Game.cpp | 1 + desktop_version/src/Input.cpp | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/desktop_version/src/Game.cpp b/desktop_version/src/Game.cpp index b717e264..b2e25066 100644 --- a/desktop_version/src/Game.cpp +++ b/desktop_version/src/Game.cpp @@ -7762,4 +7762,5 @@ void Game::returntopausemenu() returntomenu(kludge_ingametemp); gamestate = MAPMODE; map.kludge_to_bg(); + map.tdrawback = true; } diff --git a/desktop_version/src/Input.cpp b/desktop_version/src/Input.cpp index 891de481..81f251e2 100644 --- a/desktop_version/src/Input.cpp +++ b/desktop_version/src/Input.cpp @@ -2143,8 +2143,9 @@ void mapmenuactionpress() map.bg_to_kludge(); game.kludge_ingametemp = game.currentmenuname; - map.nexttowercolour(); map.scrolldir = 0; + map.colstate = ((int) (map.colstate / 5)) * 5; + map.nexttowercolour(); // Fix delta rendering glitch graphics.updatetowerbackground();