mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2025-01-09 18:39:45 +01:00
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:
parent
9e2716b253
commit
f22756dd99
5 changed files with 15 additions and 14 deletions
|
@ -3219,8 +3219,7 @@ void Game::updatestate(void)
|
||||||
map.final_colorframe = 0;
|
map.final_colorframe = 0;
|
||||||
map.finalstretch = false;
|
map.finalstretch = false;
|
||||||
|
|
||||||
graphics.cutscenebarspos = 320;
|
graphics.setbars(320);
|
||||||
graphics.oldcutscenebarspos = 320;
|
|
||||||
|
|
||||||
teleport_to_new_area = true;
|
teleport_to_new_area = true;
|
||||||
teleportscript = "gamecomplete";
|
teleportscript = "gamecomplete";
|
||||||
|
|
|
@ -35,8 +35,7 @@ void Graphics::init(void)
|
||||||
trinketcolset = false;
|
trinketcolset = false;
|
||||||
|
|
||||||
showcutscenebars = false;
|
showcutscenebars = false;
|
||||||
cutscenebarspos = 0;
|
setbars(0);
|
||||||
oldcutscenebarspos = 0;
|
|
||||||
notextoutline = false;
|
notextoutline = false;
|
||||||
|
|
||||||
flipmode = false;
|
flipmode = false;
|
||||||
|
@ -1094,6 +1093,12 @@ void Graphics::cutscenebarstimer(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Graphics::setbars(const int position)
|
||||||
|
{
|
||||||
|
cutscenebarspos = position;
|
||||||
|
oldcutscenebarspos = position;
|
||||||
|
}
|
||||||
|
|
||||||
void Graphics::drawcrewman( int x, int y, int t, bool act, bool noshift /*=false*/ )
|
void Graphics::drawcrewman( int x, int y, int t, bool act, bool noshift /*=false*/ )
|
||||||
{
|
{
|
||||||
if (!act)
|
if (!act)
|
||||||
|
|
|
@ -83,6 +83,7 @@ public:
|
||||||
|
|
||||||
void cutscenebars(void);
|
void cutscenebars(void);
|
||||||
void cutscenebarstimer(void);
|
void cutscenebarstimer(void);
|
||||||
|
void setbars(const int position);
|
||||||
|
|
||||||
void drawpartimage(int t, int xp, int yp, int wp, int hp);
|
void drawpartimage(int t, int xp, int yp, int wp, int hp);
|
||||||
|
|
||||||
|
|
|
@ -71,8 +71,7 @@ void gamecompletelogic(void)
|
||||||
{
|
{
|
||||||
//Fix some graphical things
|
//Fix some graphical things
|
||||||
graphics.showcutscenebars = false;
|
graphics.showcutscenebars = false;
|
||||||
graphics.cutscenebarspos = 0;
|
graphics.setbars(0);
|
||||||
graphics.oldcutscenebarspos = 0;
|
|
||||||
graphics.titlebg.scrolldir = 0;
|
graphics.titlebg.scrolldir = 0;
|
||||||
graphics.titlebg.bypos = 0;
|
graphics.titlebg.bypos = 0;
|
||||||
//Return to game
|
//Return to game
|
||||||
|
@ -104,7 +103,7 @@ void gamecompletelogic2(void)
|
||||||
{
|
{
|
||||||
//Fix some graphical things
|
//Fix some graphical things
|
||||||
graphics.showcutscenebars = false;
|
graphics.showcutscenebars = false;
|
||||||
graphics.cutscenebarspos = 0;
|
graphics.setbars(0);
|
||||||
//Fix the save thingy
|
//Fix the save thingy
|
||||||
game.deletequick();
|
game.deletequick();
|
||||||
int tmp=music.currentsong;
|
int tmp=music.currentsong;
|
||||||
|
|
|
@ -2641,8 +2641,7 @@ void scriptclass::startgamemode( int t )
|
||||||
game.start();
|
game.start();
|
||||||
game.jumpheld = true;
|
game.jumpheld = true;
|
||||||
graphics.showcutscenebars = true;
|
graphics.showcutscenebars = true;
|
||||||
graphics.cutscenebarspos = 320;
|
graphics.setbars(320);
|
||||||
graphics.oldcutscenebarspos = 320;
|
|
||||||
|
|
||||||
//set flipmode
|
//set flipmode
|
||||||
if (graphics.setflipmode) graphics.flipmode = true;
|
if (graphics.setflipmode) graphics.flipmode = true;
|
||||||
|
@ -2908,8 +2907,7 @@ void scriptclass::startgamemode( int t )
|
||||||
game.start();
|
game.start();
|
||||||
game.jumpheld = true;
|
game.jumpheld = true;
|
||||||
graphics.showcutscenebars = true;
|
graphics.showcutscenebars = true;
|
||||||
graphics.cutscenebarspos = 320;
|
graphics.setbars(320);
|
||||||
graphics.oldcutscenebarspos = 320;
|
|
||||||
|
|
||||||
//set flipmode
|
//set flipmode
|
||||||
if (graphics.setflipmode) graphics.flipmode = true;
|
if (graphics.setflipmode) graphics.flipmode = true;
|
||||||
|
@ -2937,8 +2935,7 @@ void scriptclass::startgamemode( int t )
|
||||||
game.start();
|
game.start();
|
||||||
game.jumpheld = true;
|
game.jumpheld = true;
|
||||||
graphics.showcutscenebars = true;
|
graphics.showcutscenebars = true;
|
||||||
graphics.cutscenebarspos = 320;
|
graphics.setbars(320);
|
||||||
graphics.oldcutscenebarspos = 320;
|
|
||||||
|
|
||||||
//set flipmode
|
//set flipmode
|
||||||
if (graphics.setflipmode) graphics.flipmode = true;
|
if (graphics.setflipmode) graphics.flipmode = true;
|
||||||
|
@ -3644,7 +3641,7 @@ void scriptclass::hardreset(void)
|
||||||
graphics.textbox.clear();
|
graphics.textbox.clear();
|
||||||
graphics.flipmode = false; //This will be reset if needs be elsewhere
|
graphics.flipmode = false; //This will be reset if needs be elsewhere
|
||||||
graphics.showcutscenebars = false;
|
graphics.showcutscenebars = false;
|
||||||
graphics.cutscenebarspos = 0;
|
graphics.setbars(0);
|
||||||
|
|
||||||
//mapclass
|
//mapclass
|
||||||
map.warpx = false;
|
map.warpx = false;
|
||||||
|
|
Loading…
Reference in a new issue