mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03:00
Factor out Secret Lab/Time Trial/NDM conds to function
They are now factored out to an inline function named incompetitive(). This is so their usage can be changed without having to change each individual one in every place. This also clarifies the intent of using these conditionals (they are for when we're in a "competitive" mode).
This commit is contained in:
@@ -6060,8 +6060,8 @@ void Game::createmenu( enum Menu::MenuName t, bool samemenu/*= false*/ )
|
|||||||
#if !defined(MAKEANDPLAY)
|
#if !defined(MAKEANDPLAY)
|
||||||
option("unlock play modes");
|
option("unlock play modes");
|
||||||
#endif
|
#endif
|
||||||
option("invincibility", !ingame_titlemode || (!insecretlab && !intimetrial && !nodeathmode));
|
option("invincibility", !ingame_titlemode || !incompetitive());
|
||||||
option("slowdown", !ingame_titlemode || (!insecretlab && !intimetrial && !nodeathmode));
|
option("slowdown", !ingame_titlemode || !incompetitive());
|
||||||
option("animated backgrounds");
|
option("animated backgrounds");
|
||||||
option("screen effects");
|
option("screen effects");
|
||||||
option("text outline");
|
option("text outline");
|
||||||
@@ -6805,3 +6805,8 @@ int Game::get_timestep(void)
|
|||||||
return 34;
|
return 34;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Game::incompetitive(void)
|
||||||
|
{
|
||||||
|
return insecretlab || intimetrial || nodeathmode;
|
||||||
|
}
|
||||||
|
|||||||
@@ -636,7 +636,7 @@ static void menuactionpress(void)
|
|||||||
#endif
|
#endif
|
||||||
if (game.currentmenuoption == accessibilityoffset + 0) {
|
if (game.currentmenuoption == accessibilityoffset + 0) {
|
||||||
//invincibility
|
//invincibility
|
||||||
if (!game.ingame_titlemode || (!game.insecretlab && !game.intimetrial && !game.nodeathmode))
|
if (!game.ingame_titlemode || !game.incompetitive())
|
||||||
{
|
{
|
||||||
if (!map.invincibility)
|
if (!map.invincibility)
|
||||||
{
|
{
|
||||||
@@ -658,7 +658,7 @@ static void menuactionpress(void)
|
|||||||
}
|
}
|
||||||
else if (game.currentmenuoption == accessibilityoffset + 1) {
|
else if (game.currentmenuoption == accessibilityoffset + 1) {
|
||||||
//change game speed
|
//change game speed
|
||||||
if (!game.ingame_titlemode || (!game.insecretlab && !game.intimetrial && !game.nodeathmode))
|
if (!game.ingame_titlemode || !game.incompetitive())
|
||||||
{
|
{
|
||||||
game.createmenu(Menu::setslowdown);
|
game.createmenu(Menu::setslowdown);
|
||||||
map.nexttowercolour();
|
map.nexttowercolour();
|
||||||
|
|||||||
Reference in New Issue
Block a user