1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-23 10:09:43 +01:00

Fix deltaframe tower BG flicker when exiting menu in H/V warp room

To fix this annoying flicker (which, btw, took me WAY too long to do), I
had to introduce yet another kludge variable to signal that the
horizontal/vertical warp background should be re-initialized on the
pause screen.

I think I could technically keep the 'graphics.backgrounddrawn = false;'
in maplogic() and remove the 'graphics.backgrounddrawn = false;' in
Game::returntopausemenu(), but I'm keeping that other one around because
it doesn't hurt and just as a general precaution and safety measure.
This commit is contained in:
Misa 2020-06-22 22:46:29 -07:00 committed by Ethan Lee
parent 16ebb807db
commit 65f84b15f4
3 changed files with 13 additions and 0 deletions

View file

@ -391,6 +391,7 @@ void Game::init(void)
ingame_titlemode = false; ingame_titlemode = false;
kludge_ingametemp = Menu::mainmenu; kludge_ingametemp = Menu::mainmenu;
shouldreturntopausemenu = false;
/* Terry's Patrons... */ /* Terry's Patrons... */
const char* superpatrons_arr[] = { const char* superpatrons_arr[] = {
@ -7766,4 +7767,5 @@ void Game::returntopausemenu()
graphics.backgrounddrawn = false; graphics.backgrounddrawn = false;
game.mapheld = true; game.mapheld = true;
graphics.flipmode = graphics.setflipmode; graphics.flipmode = graphics.setflipmode;
game.shouldreturntopausemenu = true;
} }

View file

@ -408,6 +408,7 @@ public:
bool ingame_titlemode; bool ingame_titlemode;
bool shouldreturntopausemenu;
void returntopausemenu(); void returntopausemenu();
}; };

View file

@ -79,6 +79,16 @@ void maplogic()
graphics.updatetextboxes(); graphics.updatetextboxes();
graphics.updatetitlecolours(); graphics.updatetitlecolours();
if (game.shouldreturntopausemenu)
{
game.shouldreturntopausemenu = false;
graphics.backgrounddrawn = false;
if (map.background == 3 || map.background || 4)
{
graphics.updatebackground(map.background);
}
}
graphics.crewframedelay--; graphics.crewframedelay--;
if (graphics.crewframedelay <= 0) if (graphics.crewframedelay <= 0)
{ {