1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-22 20:48:29 +02:00

Interpolate trophy text

Just to make sure it's extra smooth. Not that it will be noticeable, and
you can't access the Secret Lab in slowmode without modifying the game,
but it's nice to have this.
This commit is contained in:
Misa 2020-04-29 16:54:36 -07:00 committed by Ethan Lee
parent a69bb84eaf
commit dcc9520d8f
4 changed files with 8 additions and 3 deletions

View File

@ -62,6 +62,7 @@ void entityclass::init()
customenemy=0;
customwarpmode=false; customwarpmodevon=false; customwarpmodehon=false;
trophytext = 0 ;
oldtrophytext = 0;
trophytype = 0;
altstates = 0;

View File

@ -197,6 +197,7 @@ public:
//Trophy Text
int trophytext, trophytype;
int oldtrophytext;
//Secret lab scripts
int altstates;

View File

@ -1369,9 +1369,10 @@ void Graphics::drawtrophytext()
if (obj.trophytext < 15)
{
temp = (196 * obj.trophytext) / 15;
temp2 = (196 * obj.trophytext) / 15;
temp3 = ((255 - help.glow) * obj.trophytext) / 15;
int usethismult = lerp(obj.oldtrophytext, obj.trophytext);
temp = (196 * usethismult) / 15;
temp2 = (196 * usethismult) / 15;
temp3 = ((255 - help.glow) * usethismult) / 15;
}
else
{

View File

@ -247,6 +247,8 @@ void gamelogic()
obj.upset = 0;
}
obj.oldtrophytext = obj.trophytext;
if (map.towermode)
{
if(!game.completestop)