diff --git a/stepmania/src/PrefsManager.cpp b/stepmania/src/PrefsManager.cpp index eeab00c531..b773728d7a 100644 --- a/stepmania/src/PrefsManager.cpp +++ b/stepmania/src/PrefsManager.cpp @@ -124,7 +124,9 @@ PrefsManager::PrefsManager() : m_fLifeDeltaPercentChangeMiss ( Options, "LifeDeltaPercentChangeMiss", -0.080f ), m_fLifeDeltaPercentChangeHitMine ( Options, "LifeDeltaPercentChangeHitMine", -0.160f ), m_fLifeDeltaPercentChangeOK ( Options, "LifeDeltaPercentChangeOK", +0.008f ), - m_fLifeDeltaPercentChangeNG ( Options, "LifeDeltaPercentChangeNG", -0.080f ) + m_fLifeDeltaPercentChangeNG ( Options, "LifeDeltaPercentChangeNG", -0.080f ), + m_bShowCaution ( Options, "ShowCaution", true ), + m_bEventMode ( Options, "EventMode", false ) { Init(); ReadGlobalPrefsFromDisk(); @@ -137,7 +139,6 @@ void PrefsManager::Init() m_bShowDanger = true; m_bMenuTimer = true; m_iNumArcadeStages = 3; - m_bEventMode = false; m_bAutoPlay = false; m_fTugMeterPercentChangeMarvelous = +0.010f; @@ -201,7 +202,6 @@ void PrefsManager::Init() m_bDelayedBack = true; m_bShowInstructions = true; - m_bShowCaution = true; m_bShowSelectGroup = true; m_bShowNativeLanguage = true; m_bArcadeOptionsNavigation = false; @@ -384,7 +384,6 @@ void PrefsManager::ReadPrefsFromFile( CString sIni ) ini.GetValue( "Options", "CelShadeModels", m_bCelShadeModels ); ini.GetValue( "Options", "ConstantUpdateDeltaSeconds", m_fConstantUpdateDeltaSeconds ); ini.GetValue( "Options", "NumArcadeStages", m_iNumArcadeStages ); - ini.GetValue( "Options", "EventMode", m_bEventMode ); ini.GetValue( "Options", "AutoPlay", m_bAutoPlay ); ini.GetValue( "Options", "TugMeterPercentChangeMarvelous", m_fTugMeterPercentChangeMarvelous ); ini.GetValue( "Options", "TugMeterPercentChangePerfect", m_fTugMeterPercentChangePerfect ); @@ -444,7 +443,6 @@ void PrefsManager::ReadPrefsFromFile( CString sIni ) ini.GetValue( "Options", "DelayedEscape", m_bDelayedBack ); ini.GetValue( "Options", "ShowInstructions", m_bShowInstructions ); - ini.GetValue( "Options", "ShowCaution", m_bShowCaution ); ini.GetValue( "Options", "ShowSelectGroup", m_bShowSelectGroup ); ini.GetValue( "Options", "ShowNativeLanguage", m_bShowNativeLanguage ); ini.GetValue( "Options", "ArcadeOptionsNavigation", m_bArcadeOptionsNavigation ); @@ -593,7 +591,6 @@ void PrefsManager::SaveGlobalPrefsToDisk() const ini.SetValue( "Options", "BGBrightness", m_fBGBrightness ); ini.SetValue( "Options", "MenuTimer", m_bMenuTimer ); ini.SetValue( "Options", "NumArcadeStages", m_iNumArcadeStages ); - ini.SetValue( "Options", "EventMode", m_bEventMode ); ini.SetValue( "Options", "AutoPlay", m_bAutoPlay ); ini.SetValue( "Options", "JudgeWindowScale", m_fJudgeWindowScale ); ini.SetValue( "Options", "JudgeWindowAdd", m_fJudgeWindowAdd ); @@ -677,7 +674,6 @@ void PrefsManager::SaveGlobalPrefsToDisk() const ini.SetValue( "Options", "Interlaced", m_bInterlaced ); ini.SetValue( "Options", "PAL", m_bPAL ); ini.SetValue( "Options", "ShowInstructions", m_bShowInstructions ); - ini.SetValue( "Options", "ShowCaution", m_bShowCaution ); ini.SetValue( "Options", "ShowSelectGroup", m_bShowSelectGroup ); ini.SetValue( "Options", "ShowNativeLanguage", m_bShowNativeLanguage ); ini.SetValue( "Options", "ArcadeOptionsNavigation", m_bArcadeOptionsNavigation ); diff --git a/stepmania/src/PrefsManager.h b/stepmania/src/PrefsManager.h index 9bff2b5993..8f3a416f67 100644 --- a/stepmania/src/PrefsManager.h +++ b/stepmania/src/PrefsManager.h @@ -133,14 +133,15 @@ public: bool m_bAutoPlay; bool m_bDelayedBack; - bool m_bShowInstructions, m_bShowCaution, m_bShowSelectGroup; + bool m_bShowInstructions, m_bShowSelectGroup; + Preference m_bShowCaution; bool m_bShowNativeLanguage; bool m_bArcadeOptionsNavigation; enum MusicWheelUsesSections { NEVER, ALWAYS, ABC_ONLY } m_MusicWheelUsesSections; int m_iMusicWheelSwitchSpeed; bool m_bEasterEggs; int m_iMarvelousTiming; - bool m_bEventMode; + Preference m_bEventMode; int m_iCoinsPerCredit; int m_iNumArcadeStages; diff --git a/stepmania/src/ScreenOptionsMasterPrefs.cpp b/stepmania/src/ScreenOptionsMasterPrefs.cpp index 168a5542d4..767240e01a 100644 --- a/stepmania/src/ScreenOptionsMasterPrefs.cpp +++ b/stepmania/src/ScreenOptionsMasterPrefs.cpp @@ -233,7 +233,7 @@ static void MovePref( int &iSel, bool bToSel, const ConfOption *pConfOption ) /* Appearance options */ MOVE( Instructions, PREFSMAN->m_bShowInstructions ); -MOVE( Caution, PREFSMAN->m_bShowCaution ); +MOVE( Caution, (bool&) PREFSMAN->m_bShowCaution ); MOVE( OniScoreDisplay, PREFSMAN->m_bDancePointsForOni ); MOVE( SongGroup, PREFSMAN->m_bShowSelectGroup ); MOVE( WheelSections, PREFSMAN->m_MusicWheelUsesSections ); @@ -311,7 +311,7 @@ static void SongsPerPlay( int &sel, bool ToSel, const ConfOption *pConfOption ) const int mapping[] = { 1,2,3,4,5,6,7 }; MoveMap( sel, PREFSMAN->m_iNumArcadeStages, ToSel, mapping, ARRAYSIZE(mapping) ); } -MOVE( EventMode, PREFSMAN->m_bEventMode ); +MOVE( EventMode, (bool&) PREFSMAN->m_bEventMode ); /* Machine options */ MOVE( ScoringType, PREFSMAN->m_iScoringType );