Remove m_sDefaultNoteSkin.

Make m_sDefaultModifiers a game pref.
This commit is contained in:
Glenn Maynard
2003-06-25 05:02:42 +00:00
parent ef9f53d514
commit 63cd483b17
2 changed files with 8 additions and 13 deletions
+7 -11
View File
@@ -125,8 +125,6 @@ PrefsManager::PrefsManager()
m_bAllowUnacceleratedRenderer = false; m_bAllowUnacceleratedRenderer = false;
m_sDefaultNoteSkin = "default";
ReadGlobalPrefsFromDisk( true ); ReadGlobalPrefsFromDisk( true );
} }
@@ -202,7 +200,6 @@ void PrefsManager::ReadGlobalPrefsFromDisk( bool bSwitchToLastPlayedGame )
ini.GetValueB( "Options", "AutogenMissingTypes", m_bAutogenMissingTypes ); ini.GetValueB( "Options", "AutogenMissingTypes", m_bAutogenMissingTypes );
ini.GetValueB( "Options", "AutogenGroupCourses", m_bAutogenGroupCourses ); ini.GetValueB( "Options", "AutogenGroupCourses", m_bAutogenGroupCourses );
ini.GetValueB( "Options", "Timestamping", m_bTimestamping ); ini.GetValueB( "Options", "Timestamping", m_bTimestamping );
ini.GetValue ( "Options", "DefaultModifiers", m_sDefaultModifiers );
ini.GetValueB( "Options", "BreakComboToGetItem", m_bBreakComboToGetItem ); ini.GetValueB( "Options", "BreakComboToGetItem", m_bBreakComboToGetItem );
ini.GetValueB( "Options", "ShowDancingCharacters", m_bShowDancingCharacters ); ini.GetValueB( "Options", "ShowDancingCharacters", m_bShowDancingCharacters );
/* XXX: This belongs in the memcard code, not prefs. */ /* XXX: This belongs in the memcard code, not prefs. */
@@ -295,7 +292,6 @@ void PrefsManager::SaveGlobalPrefsToDisk()
ini.SetValueB( "Options", "AutogenMissingTypes", m_bAutogenMissingTypes ); ini.SetValueB( "Options", "AutogenMissingTypes", m_bAutogenMissingTypes );
ini.SetValueB( "Options", "AutogenGroupCourses", m_bAutogenGroupCourses ); ini.SetValueB( "Options", "AutogenGroupCourses", m_bAutogenGroupCourses );
ini.SetValueB( "Options", "Timestamping", m_bTimestamping ); ini.SetValueB( "Options", "Timestamping", m_bTimestamping );
ini.SetValue ( "Options", "DefaultModifiers", m_sDefaultModifiers );
ini.SetValueB( "Options", "BreakComboToGetItem", m_bBreakComboToGetItem ); ini.SetValueB( "Options", "BreakComboToGetItem", m_bBreakComboToGetItem );
ini.SetValueB( "Options", "ShowDancingCharacters", m_bShowDancingCharacters ); ini.SetValueB( "Options", "ShowDancingCharacters", m_bShowDancingCharacters );
ini.SetValueF( "Options", "DancePointsAccumulated", m_fDancePointsAccumulated ); ini.SetValueF( "Options", "DancePointsAccumulated", m_fDancePointsAccumulated );
@@ -340,16 +336,17 @@ void PrefsManager::ReadGamePrefsFromDisk()
// if these calls fail, the three strings will keep the initial values set above. // if these calls fail, the three strings will keep the initial values set above.
ini.GetValue( sGameName, "Announcer", sAnnouncer ); ini.GetValue( sGameName, "Announcer", sAnnouncer );
ini.GetValue( sGameName, "Theme", sTheme ); ini.GetValue( sGameName, "Theme", sTheme );
ini.GetValue( sGameName, "NoteSkin", sNoteSkin ); ini.GetValue( sGameName, "DefaultModifiers",m_sDefaultModifiers );
// it's OK to call these functions with names that don't exist. // 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 );
if(NOTESKIN->DoesNoteSkinExist(sNoteSkin)) // XXX: ?
m_sDefaultNoteSkin = sNoteSkin; // if(NOTESKIN->DoesNoteSkinExist(sNoteSkin))
else // m_sDefaultNoteSkin = sNoteSkin;
m_sDefaultNoteSkin = "default"; // else
// m_sDefaultNoteSkin = "default";
// NOTESKIN->SwitchNoteSkin( sNoteSkin ); // NOTESKIN->SwitchNoteSkin( sNoteSkin );
} }
@@ -366,8 +363,7 @@ void PrefsManager::SaveGamePrefsToDisk()
ini.SetValue( sGameName, "Announcer", ANNOUNCER->GetCurAnnouncerName() ); ini.SetValue( sGameName, "Announcer", ANNOUNCER->GetCurAnnouncerName() );
ini.SetValue( sGameName, "Theme", THEME->GetCurThemeName() ); ini.SetValue( sGameName, "Theme", THEME->GetCurThemeName() );
// ini.SetValue( sGameName, "NoteSkin", NOTESKIN->GetCurNoteSkinName() ); ini.SetValue( sGameName, "DefaultModifiers",m_sDefaultModifiers );
ini.SetValue( sGameName, "NoteSkin", m_sDefaultNoteSkin );
ini.WriteFile(); ini.WriteFile();
} }
+1 -2
View File
@@ -74,7 +74,6 @@ public:
bool m_bShowLyrics; bool m_bShowLyrics;
bool m_bAutogenMissingTypes; bool m_bAutogenMissingTypes;
bool m_bAutogenGroupCourses; bool m_bAutogenGroupCourses;
CString m_sDefaultModifiers;
bool m_bBreakComboToGetItem; bool m_bBreakComboToGetItem;
bool m_bShowDancingCharacters; bool m_bShowDancingCharacters;
float m_fDancePointsAccumulated; float m_fDancePointsAccumulated;
@@ -100,7 +99,7 @@ public:
bool m_bAllowUnacceleratedRenderer; bool m_bAllowUnacceleratedRenderer;
/* Game-specific prefs: */ /* Game-specific prefs: */
CString m_sDefaultNoteSkin; CString m_sDefaultModifiers;
void ReadGlobalPrefsFromDisk( bool bSwitchToLastPlayedGame ); void ReadGlobalPrefsFromDisk( bool bSwitchToLastPlayedGame );
void SaveGlobalPrefsToDisk(); void SaveGlobalPrefsToDisk();