mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-23 10:09:43 +01:00
Interpolate "- Press ENTER to Teleport -" prompt
This is only really noticeable in slowmode, but if you're playing in slowmode it'll be pretty smooth.
This commit is contained in:
parent
dcc9520d8f
commit
1d669dffeb
4 changed files with 6 additions and 2 deletions
|
@ -168,6 +168,7 @@ void Game::init(void)
|
||||||
|
|
||||||
activetele = false;
|
activetele = false;
|
||||||
readytotele = 0;
|
readytotele = 0;
|
||||||
|
oldreadytotele = 0;
|
||||||
activity_lastprompt = "";
|
activity_lastprompt = "";
|
||||||
activity_r = 0;
|
activity_r = 0;
|
||||||
activity_g = 0;
|
activity_g = 0;
|
||||||
|
|
|
@ -318,6 +318,7 @@ public:
|
||||||
SDL_Rect teleblock;
|
SDL_Rect teleblock;
|
||||||
bool activetele;
|
bool activetele;
|
||||||
int readytotele;
|
int readytotele;
|
||||||
|
int oldreadytotele;
|
||||||
int activity_r, activity_g, activity_b;
|
int activity_r, activity_g, activity_b;
|
||||||
std::string activity_lastprompt;
|
std::string activity_lastprompt;
|
||||||
|
|
||||||
|
|
|
@ -1490,6 +1490,7 @@ void gamelogic()
|
||||||
|
|
||||||
game.activeactivity = obj.checkactivity();
|
game.activeactivity = obj.checkactivity();
|
||||||
|
|
||||||
|
game.oldreadytotele = game.readytotele;
|
||||||
if (game.activetele)
|
if (game.activetele)
|
||||||
{
|
{
|
||||||
int i = obj.getplayer();
|
int i = obj.getplayer();
|
||||||
|
|
|
@ -1441,13 +1441,14 @@ void gamerender()
|
||||||
|
|
||||||
if (game.readytotele > 100 && !game.advancetext && game.hascontrol && !script.running && !game.intimetrial)
|
if (game.readytotele > 100 && !game.advancetext && game.hascontrol && !script.running && !game.intimetrial)
|
||||||
{
|
{
|
||||||
|
int alpha = graphics.lerp(game.oldreadytotele, game.readytotele);
|
||||||
if(graphics.flipmode)
|
if(graphics.flipmode)
|
||||||
{
|
{
|
||||||
graphics.bprint(5, 20, "- Press ENTER to Teleport -", game.readytotele - 20 - (help.glow / 2), game.readytotele - 20 - (help.glow / 2), game.readytotele, true);
|
graphics.bprint(5, 20, "- Press ENTER to Teleport -", alpha - 20 - (help.glow / 2), alpha - 20 - (help.glow / 2), alpha, true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
graphics.bprint(5, 210, "- Press ENTER to Teleport -", game.readytotele - 20 - (help.glow / 2), game.readytotele - 20 - (help.glow / 2), game.readytotele, true);
|
graphics.bprint(5, 210, "- Press ENTER to Teleport -", alpha - 20 - (help.glow / 2), alpha - 20 - (help.glow / 2), alpha, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue