1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-17 10:08:29 +02:00

Don't draw activity zone or trophy text when cutscene is running

This fixes a possible graphical issue where the "Press ENTER to activate
terminal" prompt gets drawn on top of the "- Press ACTION to advance
text -" prompt, which looks bad. Trophy text gets drawn on top, too, so
there's a check there as well.

I've also made it so the activity prompt doesn't get drawn if the player
doesn't have control. After all, what use is it to say "press ENTER" if
the player isn't allowed to?
This commit is contained in:
Misa 2020-08-02 19:28:30 -07:00 committed by Ethan Lee
parent 4adcf7013c
commit cec1a99d3b

View File

@ -1675,7 +1675,7 @@ void gamerender()
}
float act_alpha = graphics.lerp(game.prev_act_fade, game.act_fade) / 10.0f;
if (game.activeactivity > -1)
if (game.activeactivity > -1 && game.hascontrol && !script.running)
{
game.activity_lastprompt = obj.blocks[game.activeactivity].prompt;
game.activity_r = obj.blocks[game.activeactivity].r;
@ -1684,13 +1684,13 @@ void gamerender()
graphics.drawtextbox(16, 4, 36, 3, game.activity_r*act_alpha, game.activity_g*act_alpha, game.activity_b*act_alpha);
graphics.Print(5, 12, game.activity_lastprompt, game.activity_r*act_alpha, game.activity_g*act_alpha, game.activity_b*act_alpha, true);
}
else if(game.act_fade>5 || game.prev_act_fade>5)
else if((game.act_fade>5 || game.prev_act_fade>5) && game.hascontrol && !script.running)
{
graphics.drawtextbox(16, 4, 36, 3, game.activity_r*act_alpha, game.activity_g*act_alpha, game.activity_b*act_alpha);
graphics.Print(5, 12, game.activity_lastprompt, game.activity_r*act_alpha, game.activity_g*act_alpha, game.activity_b*act_alpha, true);
}
if (obj.trophytext > 0 || obj.oldtrophytext > 0)
if ((obj.trophytext > 0 || obj.oldtrophytext > 0) && !script.running)
{
graphics.drawtrophytext();
}