mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-22 17:49:43 +01:00
Condense indentation levels of else-if chain in "play" menu
Previously, the code looked something like: else { if (...) {...} else { if (...) {...} else { etc. } } And kept indenting every time there was an else-if. This commit puts all else-ifs on the same indentation level, so it doesn't slowly push the code to the right.
This commit is contained in:
parent
be64d4f704
commit
119d2ad25f
1 changed files with 27 additions and 36 deletions
|
@ -6923,44 +6923,35 @@ void Game::createmenu( std::string t )
|
|||
createmenu("unlocknodeathmode");
|
||||
savemystats = true;
|
||||
}
|
||||
//Alright then! Flip mode?
|
||||
else if (unlock[5] && !unlocknotify[18])
|
||||
{
|
||||
unlock[18] = true;
|
||||
unlocknotify[18] = true;
|
||||
createmenu("unlockflipmode");
|
||||
savemystats = true;
|
||||
}
|
||||
//What about the intermission levels?
|
||||
else if (unlock[7] && !unlocknotify[16])
|
||||
{
|
||||
unlock[16] = true;
|
||||
unlocknotify[16] = true;
|
||||
createmenu("unlockintermission");
|
||||
savemystats = true;
|
||||
}
|
||||
//ok, secret lab! no notification, but test:
|
||||
else if (unlock[8])
|
||||
{
|
||||
createmenu("playsecretlab");
|
||||
}
|
||||
else
|
||||
{
|
||||
//Alright then! Flip mode?
|
||||
if (unlock[5] && !unlocknotify[18])
|
||||
{
|
||||
unlock[18] = true;
|
||||
unlocknotify[18] = true;
|
||||
createmenu("unlockflipmode");
|
||||
savemystats = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
//What about the intermission levels?
|
||||
if (unlock[7] && !unlocknotify[16])
|
||||
{
|
||||
unlock[16] = true;
|
||||
unlocknotify[16] = true;
|
||||
createmenu("unlockintermission");
|
||||
savemystats = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
//ok, secret lab! no notification, but test:
|
||||
if (unlock[8])
|
||||
{
|
||||
createmenu("playsecretlab");
|
||||
}
|
||||
else
|
||||
{
|
||||
option("continue");
|
||||
option("play modes");
|
||||
option("new game");
|
||||
option("return");
|
||||
menuxoff = -20;
|
||||
menuyoff = -40;
|
||||
}
|
||||
}
|
||||
}
|
||||
option("continue");
|
||||
option("play modes");
|
||||
option("new game");
|
||||
option("return");
|
||||
menuxoff = -20;
|
||||
menuyoff = -40;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue