games will now try to use announcers, noteskin, and theme of the same name as the game initially.

This commit is contained in:
Chris Danford
2002-08-19 00:21:54 +00:00
parent 5c21d4b1ca
commit c82d2925ef
2 changed files with 15 additions and 11 deletions
+8 -4
View File
@@ -32,7 +32,11 @@ PrefsManager::PrefsManager()
m_iRefreshRate = 0; m_iRefreshRate = 0;
m_bIgnoreJoyAxes = false; m_bIgnoreJoyAxes = false;
m_bOnlyDedicatedMenuButtons = false; m_bOnlyDedicatedMenuButtons = false;
#ifdef _DEBUG
m_bShowStats = true;
#else
m_bShowStats = false; m_bShowStats = false;
#endif
m_BackgroundMode = BGMODE_ANIMATIONS; m_BackgroundMode = BGMODE_ANIMATIONS;
m_bShowDanger = true; m_bShowDanger = true;
m_fBGBrightness = 0.8f; m_fBGBrightness = 0.8f;
@@ -130,16 +134,16 @@ void PrefsManager::ReadGamePrefsFromDisk()
CString sGameName = GAMESTATE->GetCurrentGameDef()->m_szName; CString sGameName = GAMESTATE->GetCurrentGameDef()->m_szName;
IniFile ini; IniFile ini;
ini.SetPath( sGameName + "Prefs.ini" ); ini.SetPath( sGameName + "Prefs.ini" );
if( !ini.ReadFile() ) ini.ReadFile(); // it's OK if this fails
return; // could not read config file, load nothing
CString sAnnouncer, sTheme, sNoteSkin; CString sAnnouncer = sGameName, sTheme = sGameName, sNoteSkin = sGameName;
// if these calls fail, the three strings will keep the initial values set above.
ini.GetValue( "Options", "Announcer", sAnnouncer ); ini.GetValue( "Options", "Announcer", sAnnouncer );
ini.GetValue( "Options", "Theme", sTheme ); ini.GetValue( "Options", "Theme", sTheme );
ini.GetValue( "Options", "NoteSkin", sNoteSkin ); ini.GetValue( "Options", "NoteSkin", sNoteSkin );
// it's OK to call these functions with names that don't exist.
ANNOUNCER->SwitchAnnouncer( sAnnouncer ); ANNOUNCER->SwitchAnnouncer( sAnnouncer );
THEME->SwitchTheme( sTheme ); THEME->SwitchTheme( sTheme );
GAMEMAN->SwitchNoteSkin( sNoteSkin ); GAMEMAN->SwitchNoteSkin( sNoteSkin );
+1 -1
View File
@@ -60,7 +60,7 @@ ScreenSelectStyle::ScreenSelectStyle()
for( int i=0; i<m_aPossibleStyles.GetSize(); i++ ) for( int i=0; i<m_aPossibleStyles.GetSize(); i++ )
{ {
Style style = m_aPossibleStyles[i]; Style style = m_aPossibleStyles[i];
m_sprIcon[i].Load( THEME->GetPathTo("Graphics","select style icons") ); m_sprIcon[i].Load( THEME->GetPathTo("Graphics",ssprintf("select style icons game %d",GAMESTATE->m_CurGame) ) );
m_sprIcon[i].StopAnimating(); m_sprIcon[i].StopAnimating();
m_sprIcon[i].SetState( i ); m_sprIcon[i].SetState( i );
m_sprIcon[i].SetXY( ICONS_START_X + i*ICONS_SPACING_X, ICONS_START_Y + i*ICONS_SPACING_Y ); m_sprIcon[i].SetXY( ICONS_START_X + i*ICONS_SPACING_X, ICONS_START_Y + i*ICONS_SPACING_Y );