mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-30 18:04:09 +03:00
Use case-switch for menu options where possible
I've converted every "else if"-chain in menu render/input code to be a case-switch, except for the levels list, the "game options" menu (because it has the MMMMMM menu option which isn't a compile-time constant), and the "play" menu (because it has the Secret Lab menu option which also isn't a compile-time option). I also did NOT convert some case-switches relating to unlocks in Input.cpp, mostly because they use a system where the "if we have this unlocked" conditional is a part of the "if this is the current menu option" conditional, and they use the 'else' branch to play a sad sound if that "if we have this unlocked" conditional fails. I've also converted the game.gameframerate and game.crewrescued() "else if"-chains to be case-switches instead.
This commit is contained in: