Change all game-gamestates to use an enum type

Currently, all game-gamestate variables are just ints. This is not
particularly type-safe, in case the number of enums changes. To verify
that all current uses of the game-gamestate variables actually use the
enums, change them to be typed with the enum instead.

(As an aside, we should probably rename this so that it can't be
confused with Terry's state machine that has several different ways to
exploit to warp you to the credits, but that's something to do later.)
This commit is contained in:
Misa
2021-12-17 23:57:55 -08:00
parent b67386894c
commit 119e25d0bb
3 changed files with 12 additions and 5 deletions

View File

@@ -6877,7 +6877,7 @@ void Game::unlockAchievement(const char *name) {
#endif
}
void Game::mapmenuchange(const int newgamestate, const bool user_initiated)
void Game::mapmenuchange(const enum GameGamestate newgamestate, const bool user_initiated)
{
if (user_initiated && graphics.resumegamemode)
{