mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-23 01:59:43 +01:00
De-duplicate activity zone rendering, don't ignore act_fade
This is a follow-up to #421. The game would draw the activity zone if there was one active at all, and would ignore game.act_fade. Normally this wouldn't be a problem, but since #421, it's possible that there could be an active activity zone but game.act_fade would still be 5. This would happen if you entered a new activity zone while a cutscene was running. To fix this, just make it so that the prompt gets drawn on its own and only depends on the state of game.act_fade (or game.prev_act_fade), and won't be unconditionally drawn if there's an active activity zone. As a bonus, this de-duplicates the drawing of the activity prompt, so it's no longer copy-pasted.
This commit is contained in:
parent
cf53de9ed5
commit
c29d7c7d14
1 changed files with 1 additions and 3 deletions
|
@ -1683,10 +1683,8 @@ void gamerender()
|
||||||
game.activity_r = obj.blocks[game.activeactivity].r;
|
game.activity_r = obj.blocks[game.activeactivity].r;
|
||||||
game.activity_g = obj.blocks[game.activeactivity].g;
|
game.activity_g = obj.blocks[game.activeactivity].g;
|
||||||
game.activity_b = obj.blocks[game.activeactivity].b;
|
game.activity_b = obj.blocks[game.activeactivity].b;
|
||||||
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)
|
if(game.act_fade>5 || game.prev_act_fade>5)
|
||||||
{
|
{
|
||||||
graphics.drawtextbox(16, 4, 36, 3, game.activity_r*act_alpha, game.activity_g*act_alpha, game.activity_b*act_alpha);
|
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);
|
graphics.Print(5, 12, game.activity_lastprompt, game.activity_r*act_alpha, game.activity_g*act_alpha, game.activity_b*act_alpha, true);
|
||||||
|
|
Loading…
Reference in a new issue