#include "stdafx.h" /* ----------------------------------------------------------------------------- File: ScreenSelectGame.cpp Desc: Select a song. Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved. ----------------------------------------------------------------------------- */ #include "ScreenSelectGame.h" #include #include "RageTextureManager.h" #include "RageUtil.h" #include "RageMusic.h" #include "ScreenManager.h" #include "PrefsManager.h" #include "ScreenOptions.h" #include "ScreenTitleMenu.h" #include "GameConstantsAndTypes.h" #include "StepMania.h" #include "ThemeManager.h" #include "RageLog.h" #include "GameManager.h" #include "string.h" #include "AnnouncerManager.h" enum { SG_GAME = 0, NUM_SELECT_GAME_LINES }; OptionLineData g_SelectGameLines[NUM_SELECT_GAME_LINES] = { "Game", -1, { "" } }; ScreenSelectGame::ScreenSelectGame() : ScreenOptions( THEME->GetPathTo(GRAPHIC_PLAYER_OPTIONS_BACKGROUND), THEME->GetPathTo(GRAPHIC_PLAYER_OPTIONS_TOP_EDGE) ) { LOG->WriteLine( "ScreenSelectGame::ScreenSelectGame()" ); // populate g_SelectGameLines CStringArray arrayGameNames; GAMEMAN->GetGameNames( arrayGameNames ); for( int i=0; im_CurGame; } void ScreenSelectGame::ExportOptions() { // Switch the current style to the frist style of the selected game Game game = (Game)m_iSelectedOption[0][SG_GAME]; switch( game ) { case GAME_DANCE: GAMEMAN->m_CurStyle = STYLE_DANCE_SINGLE; ANNOUNCER->SwitchAnnouncer( "default" ); break; case GAME_PUMP: GAMEMAN->m_CurStyle = STYLE_PUMP_SINGLE; ANNOUNCER->SwitchAnnouncer( "default" ); break; case GAME_EZ2: GAMEMAN->m_CurStyle = STYLE_EZ2_SINGLE; ANNOUNCER->SwitchAnnouncer( "ez2" ); break; default: ASSERT(0); // invalid Game } // Try to switch themes to a theme with the same name as the current game CStringArray asGameNames; GAMEMAN->GetGameNames( asGameNames ); CString sGameName = asGameNames[game]; THEME->SwitchTheme( sGameName ); } void ScreenSelectGame::GoToPrevState() { SCREENMAN->SetNewScreen( new ScreenTitleMenu ); } void ScreenSelectGame::GoToNextState() { SCREENMAN->SetNewScreen( new ScreenTitleMenu ); }