mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03:00
Smoothly interpolate "[Press ENTER to return to editor]" fadeout
Now it'll be real smooth at 60 FPS. Or above. Or whichever one you want above 30.
This commit is contained in:
@@ -1666,6 +1666,7 @@ void gamelogic()
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if !defined(NO_CUSTOM_LEVELS)
|
#if !defined(NO_CUSTOM_LEVELS)
|
||||||
|
ed.oldreturneditoralpha = ed.returneditoralpha;
|
||||||
if (map.custommode && !map.custommodeforreal && ed.returneditoralpha > 0)
|
if (map.custommode && !map.custommodeforreal && ed.returneditoralpha > 0)
|
||||||
{
|
{
|
||||||
ed.returneditoralpha -= 15;
|
ed.returneditoralpha -= 15;
|
||||||
|
|||||||
@@ -1389,7 +1389,8 @@ void gamerender()
|
|||||||
#if !defined(NO_CUSTOM_LEVELS)
|
#if !defined(NO_CUSTOM_LEVELS)
|
||||||
if(map.custommode && !map.custommodeforreal && !game.advancetext){
|
if(map.custommode && !map.custommodeforreal && !game.advancetext){
|
||||||
//Return to level editor
|
//Return to level editor
|
||||||
graphics.bprintalpha(5, 5, "[Press ENTER to return to editor]", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), ed.returneditoralpha, false);
|
int alpha = graphics.lerp(ed.oldreturneditoralpha, ed.returneditoralpha);
|
||||||
|
graphics.bprintalpha(5, 5, "[Press ENTER to return to editor]", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), alpha, false);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -407,6 +407,7 @@ void editorclass::reset()
|
|||||||
script.customscripts.clear();
|
script.customscripts.clear();
|
||||||
|
|
||||||
returneditoralpha = 0;
|
returneditoralpha = 0;
|
||||||
|
oldreturneditoralpha = 0;
|
||||||
|
|
||||||
ghosts.clear();
|
ghosts.clear();
|
||||||
currentghosts = 0;
|
currentghosts = 0;
|
||||||
@@ -4636,6 +4637,7 @@ void editorinput()
|
|||||||
music.haltdasmusik();
|
music.haltdasmusik();
|
||||||
graphics.backgrounddrawn=false;
|
graphics.backgrounddrawn=false;
|
||||||
ed.returneditoralpha = 1000; // Let's start it higher than 255 since it gets clamped
|
ed.returneditoralpha = 1000; // Let's start it higher than 255 since it gets clamped
|
||||||
|
ed.oldreturneditoralpha = 1000;
|
||||||
script.startgamemode(21);
|
script.startgamemode(21);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -237,6 +237,7 @@ class editorclass{
|
|||||||
int dmtileeditor;
|
int dmtileeditor;
|
||||||
|
|
||||||
int returneditoralpha;
|
int returneditoralpha;
|
||||||
|
int oldreturneditoralpha;
|
||||||
|
|
||||||
std::vector<GhostInfo> ghosts;
|
std::vector<GhostInfo> ghosts;
|
||||||
int currentghosts;
|
int currentghosts;
|
||||||
|
|||||||
Reference in New Issue
Block a user