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:
Misa
2020-04-15 20:10:11 -07:00
committed by Ethan Lee
parent 46d0b3a4e9
commit d9d0748ce3
2 changed files with 324 additions and 335 deletions

File diff suppressed because it is too large Load Diff