mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2025-01-08 18:09:45 +01:00
Interpolate end picture reveal scroll
This is so it looks smooth at framerates above 30.
This commit is contained in:
parent
4641b53603
commit
90280b0f92
4 changed files with 7 additions and 0 deletions
|
@ -162,6 +162,7 @@ void Game::init(void)
|
|||
creditposx = 0;
|
||||
creditposy = 0;
|
||||
creditposdelay = 0;
|
||||
oldcreditposx = 0;
|
||||
|
||||
useteleporter = false;
|
||||
teleport_to_teleporter = 0;
|
||||
|
|
|
@ -232,6 +232,7 @@ public:
|
|||
enum Menu::MenuName menudest;
|
||||
|
||||
int creditposx, creditposy, creditposdelay;
|
||||
int oldcreditposx;
|
||||
|
||||
|
||||
//Sine Wave Ninja Minigame
|
||||
|
|
|
@ -2220,10 +2220,13 @@ void gamecompleteinput2()
|
|||
game.press_action = false;
|
||||
game.press_map = false;
|
||||
|
||||
//Do this here because input comes first
|
||||
game.oldcreditposx = game.creditposx;
|
||||
|
||||
if (key.isDown(KEYBOARD_z) || key.isDown(KEYBOARD_SPACE) || key.isDown(KEYBOARD_v) || key.isDown(game.controllerButton_flip))
|
||||
{
|
||||
game.creditposx++;
|
||||
game.oldcreditposx++;
|
||||
if (game.creditposy >= 30)
|
||||
{
|
||||
if(graphics.fademode==0)
|
||||
|
|
|
@ -1272,6 +1272,8 @@ void gamecompleterender2()
|
|||
}
|
||||
}
|
||||
|
||||
FillRect(graphics.backBuffer, graphics.lerp(game.oldcreditposx * 8, game.creditposx * 8) + 8, game.creditposy * 8, 8, 8, 0, 0, 0);
|
||||
|
||||
graphics.drawfade();
|
||||
|
||||
graphics.render();
|
||||
|
|
Loading…
Reference in a new issue