mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-30 01:48:15 +03:00
Factor out slowdown/invincibility conds to function
This factors out the slowdown and invincibility conditionals to a function. This means less copy-pasted code, and it also conveys intent (that we don't want to allow competitive options if we have either of these cheats enabled). This function isn't implemented in the header because then we would have to include Map.h for map.invincibility, and transitive includes are evil. Although, map.invincibility ought to be on Game instead (it was only mapclass due to 2.2-and-previous argument passing), but that's a bunch of variable reshuffling that can be done later.
This commit is contained in:
@@ -713,7 +713,7 @@ static void menurender(void)
|
||||
graphics.Print( -1, 65, "Replay any level in the game in", tr, tg, tb, true);
|
||||
graphics.Print( -1, 75, "a competitive time trial mode.", tr, tg, tb, true);
|
||||
|
||||
if (game.slowdown < 30 || map.invincibility)
|
||||
if (game.nocompetitive())
|
||||
{
|
||||
graphics.Print( -1, 105, "Time Trials are not available", tr, tg, tb, true);
|
||||
graphics.Print( -1, 115, "with slowdown or invincibility.", tr, tg, tb, true);
|
||||
@@ -734,7 +734,7 @@ static void menurender(void)
|
||||
graphics.Print( -1, 65, "Play the entire game", tr, tg, tb, true);
|
||||
graphics.Print( -1, 75, "without dying once.", tr, tg, tb, true);
|
||||
|
||||
if (game.slowdown < 30 || map.invincibility)
|
||||
if (game.nocompetitive())
|
||||
{
|
||||
graphics.Print( -1, 105, "No Death Mode is not available", tr, tg, tb, true);
|
||||
graphics.Print( -1, 115, "with slowdown or invincibility.", tr, tg, tb, true);
|
||||
|
||||
Reference in New Issue
Block a user