Ensure oldcutscenebars is updated when cutscenebarspos is

To do this, I've added Graphics::setbars(), to make sure
oldcutscenebarspos always gets assigned when cutscenebarspos is. This
fixes potential deltaframe rendering issues if these two mismatch.
This commit is contained in:
Misa
2021-03-19 23:08:35 -07:00
committed by Ethan Lee
parent 9e2716b253
commit f22756dd99
5 changed files with 15 additions and 14 deletions

View File

@@ -2641,8 +2641,7 @@ void scriptclass::startgamemode( int t )
game.start();
game.jumpheld = true;
graphics.showcutscenebars = true;
graphics.cutscenebarspos = 320;
graphics.oldcutscenebarspos = 320;
graphics.setbars(320);
//set flipmode
if (graphics.setflipmode) graphics.flipmode = true;
@@ -2908,8 +2907,7 @@ void scriptclass::startgamemode( int t )
game.start();
game.jumpheld = true;
graphics.showcutscenebars = true;
graphics.cutscenebarspos = 320;
graphics.oldcutscenebarspos = 320;
graphics.setbars(320);
//set flipmode
if (graphics.setflipmode) graphics.flipmode = true;
@@ -2937,8 +2935,7 @@ void scriptclass::startgamemode( int t )
game.start();
game.jumpheld = true;
graphics.showcutscenebars = true;
graphics.cutscenebarspos = 320;
graphics.oldcutscenebarspos = 320;
graphics.setbars(320);
//set flipmode
if (graphics.setflipmode) graphics.flipmode = true;
@@ -3644,7 +3641,7 @@ void scriptclass::hardreset(void)
graphics.textbox.clear();
graphics.flipmode = false; //This will be reset if needs be elsewhere
graphics.showcutscenebars = false;
graphics.cutscenebarspos = 0;
graphics.setbars(0);
//mapclass
map.warpx = false;