mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03: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:
@@ -6923,44 +6923,35 @@ void Game::createmenu( std::string t )
|
|||||||
createmenu("unlocknodeathmode");
|
createmenu("unlocknodeathmode");
|
||||||
savemystats = true;
|
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
|
else
|
||||||
{
|
{
|
||||||
//Alright then! Flip mode?
|
option("continue");
|
||||||
if (unlock[5] && !unlocknotify[18])
|
option("play modes");
|
||||||
{
|
option("new game");
|
||||||
unlock[18] = true;
|
option("return");
|
||||||
unlocknotify[18] = true;
|
menuxoff = -20;
|
||||||
createmenu("unlockflipmode");
|
menuyoff = -40;
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user