From 7c112811a461c436685c7d156aa471376d681864 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Fri, 12 Jan 2007 05:39:15 +0000 Subject: [PATCH] remove Game enum. Games are identified by their Game* or Game->szName. --- stepmania/src/GameManager.cpp | 26 +++++--------------------- 1 file changed, 5 insertions(+), 21 deletions(-) diff --git a/stepmania/src/GameManager.cpp b/stepmania/src/GameManager.cpp index 01de0a71cb..0ebd2e2612 100644 --- a/stepmania/src/GameManager.cpp +++ b/stepmania/src/GameManager.cpp @@ -34,22 +34,6 @@ enum // BMS reader needs 16 tracks for beat-double7 }; -enum -{ - GAME_DANCE, - GAME_PUMP, - GAME_EZ2, - GAME_PARA, - GAME_DS3DDX, - GAME_BEAT, - GAME_MANIAX, - GAME_TECHNO, - GAME_POPN, - GAME_LIGHTS, // cabinet lights (not really a game) - NUM_GAMES, // leave this at the end - GAME_INVALID, -}; - const int DANCE_COL_SPACING = 64; const int PUMP_COL_SPACING = 50; @@ -560,7 +544,7 @@ static const Game g_Game_Lights = TNS_W5, // m_mapW5To }; -static const Game *g_Games[NUM_GAMES] = +static const Game *g_Games[] = { &g_Game_Dance, &g_Game_Pump, @@ -2301,7 +2285,7 @@ const Style* GameManager::GetHowToPlayStyleForGame( const Game *pGame ) const void GameManager::GetEnabledGames( vector& aGamesOut ) const { - for( int g=0; g= 0 ); - ASSERT( index < NUM_GAMES ); + ASSERT( index < (int) ARRAYSIZE(g_Games) ); return g_Games[index]; } @@ -2397,7 +2381,7 @@ RString GameManager::StyleToLocalizedString( const Style* style ) const Game* GameManager::StringToGameType( RString sGameType ) { - for( int i=0; im_szName) ) return g_Games[i];