From 513f9709cab749901e54ef1588e0f0306e7c6a33 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Wed, 22 Oct 2003 11:40:04 +0000 Subject: [PATCH] Split off separate DemonstrationSound pref --- stepmania/Themes/default/metrics.ini | 14 +++++++++----- stepmania/src/PrefsManager.cpp | 3 +++ stepmania/src/PrefsManager.h | 1 + stepmania/src/ScreenDemonstration.cpp | 6 +++--- stepmania/src/ScreenOptionsMasterPrefs.cpp | 3 +++ 5 files changed, 19 insertions(+), 8 deletions(-) diff --git a/stepmania/Themes/default/metrics.ini b/stepmania/Themes/default/metrics.ini index 737353a988..6e11e5e825 100644 --- a/stepmania/Themes/default/metrics.ini +++ b/stepmania/Themes/default/metrics.ini @@ -2153,6 +2153,7 @@ HelpText=&UP; &DOWN; to change line &LEFT; &RIGHT; to select between options:: EasterEggs=Enable or disable some special easter eggs. MarvelousTiming=Enable or disable marvelous judgement. NEVER - never show Marvelous,::COURSES ONLY - only during nonstop/oni modes, ALWAYS - all modes of play HiddenSongs=Some songs are only playable during Oni courses and::with roulette. Leave this &oq;OFF&cq; to always display all songs. +AllowExtraStage= PickExtraStage=Instead of a set extra stage, this allows::the player to choose which song to play.::Difficulty and options are still locked. SoloSingles=Turn this option &oq;ON&cq; to enable Solo-Style::for 4-panel single play. UnlockSystem=Enable or disable unlock system. @@ -2161,13 +2162,14 @@ TimerSeconds=0 PrevScreen=ScreenOptionsMenu@ScreenOptionsMaster NextScreen=ScreenOptionsMenu@ScreenOptionsMaster -OptionMenuFlags=rows,6;together;explanations +OptionMenuFlags=rows,7;together;explanations Line1=conf,SoloSingles Line2=conf,HiddenSongs Line3=conf,EasterEggs Line4=conf,MarvelousTiming -Line5=conf,PickExtraStage -Line6=conf,UnlockSystem +Line5=conf,AllowExtraStage +Line6=conf,PickExtraStage +Line7=conf,UnlockSystem [ScreenBackgroundOptions] HelpText=&UP; &DOWN; to change line &LEFT; &RIGHT; to select between options::START to accept changes BACK to discard changes @@ -2512,6 +2514,7 @@ MasterVolume= PreloadSounds=If YES, preload most sounds in advance. This increases load times,::and should normally be left OFF. ResamplingQuality=Advanced: Select the resampling quality to use. AttractSound=Set to ON to play sound during the attract screens.::Set to OFF to mute sounds durring attract. +DemonstrationSound= SoundVolume= StyleIcon=0 TimerSeconds=0 @@ -2519,11 +2522,12 @@ TimerSeconds=0 PrevScreen=ScreenOptionsMenu@ScreenOptionsMaster NextScreen=ScreenOptionsMenu@ScreenOptionsMaster -OptionMenuFlags=rows,4;together;explanations +OptionMenuFlags=rows,5;together;explanations Line1=conf,PreloadSounds Line2=conf,ResamplingQuality Line3=conf,AttractSound -Line4=conf,SoundVolume +Line4=conf,DemonstrationSound +Line5=conf,SoundVolume [ScreenIntroMovie] NextScreen=ScreenDemonstration diff --git a/stepmania/src/PrefsManager.cpp b/stepmania/src/PrefsManager.cpp index 4fe25f6192..82734fdd63 100644 --- a/stepmania/src/PrefsManager.cpp +++ b/stepmania/src/PrefsManager.cpp @@ -147,6 +147,7 @@ PrefsManager::PrefsManager() m_fCenterImageScaleY = 1; m_bAttractSound = true; + m_bDemonstrationSound = true; m_bAllowExtraStage = true; g_bAutoRestart = false; @@ -315,6 +316,7 @@ void PrefsManager::ReadGlobalPrefsFromDisk() ini.GetValue( "Options", "CenterImageScaleX", m_fCenterImageScaleX ); ini.GetValue( "Options", "CenterImageScaleY", m_fCenterImageScaleY ); ini.GetValue( "Options", "AttractSound", m_bAttractSound ); + ini.GetValue( "Options", "DemonstrationSound", m_bDemonstrationSound ); ini.GetValue( "Options", "AllowExtraStage", m_bAllowExtraStage ); ini.GetValue( "Options", "AutoRestart", g_bAutoRestart ); @@ -445,6 +447,7 @@ void PrefsManager::SaveGlobalPrefsToDisk() const ini.SetValue( "Options", "CenterImageScaleX", m_fCenterImageScaleX ); ini.SetValue( "Options", "CenterImageScaleY", m_fCenterImageScaleY ); ini.SetValue( "Options", "AttractSound", m_bAttractSound ); + ini.SetValue( "Options", "DemonstrationSound", m_bDemonstrationSound ); ini.SetValue( "Options", "AllowExtraStage", m_bAllowExtraStage ); ini.SetValue( "Options", "AutoRestart", g_bAutoRestart ); diff --git a/stepmania/src/PrefsManager.h b/stepmania/src/PrefsManager.h index ded720bec3..54770e476c 100644 --- a/stepmania/src/PrefsManager.h +++ b/stepmania/src/PrefsManager.h @@ -111,6 +111,7 @@ public: float m_fCenterImageScaleX; float m_fCenterImageScaleY; bool m_bAttractSound; + bool m_bDemonstrationSound; bool m_bAllowExtraStage; // course ranking diff --git a/stepmania/src/ScreenDemonstration.cpp b/stepmania/src/ScreenDemonstration.cpp index 61fc3fbfdb..d4bab61967 100644 --- a/stepmania/src/ScreenDemonstration.cpp +++ b/stepmania/src/ScreenDemonstration.cpp @@ -73,7 +73,7 @@ ScreenDemonstration::ScreenDemonstration( CString sName ) : ScreenJukebox( sName m_DancingState = STATE_DANCING; this->PostScreenMessage( SM_BeginFadingOut, SECONDS_TO_SHOW ); - if( !PREFSMAN->m_bAttractSound ) + if( !PREFSMAN->m_bDemonstrationSound ) SOUNDMAN->SetPrefs( 0 ); // slient } @@ -103,7 +103,7 @@ void ScreenDemonstration::Input( const DeviceInput& DeviceI, const InputEventTyp break; // don't fall through m_soundMusic.Stop(); - if( !PREFSMAN->m_bAttractSound ) + if( !PREFSMAN->m_bDemonstrationSound ) SOUNDMAN->SetPrefs( PREFSMAN->m_fSoundVolume ); // turn volume back on break; @@ -124,7 +124,7 @@ void ScreenDemonstration::HandleScreenMessage( const ScreenMessage SM ) return; case SM_GoToNextScreen: m_soundMusic.Stop(); - if( !PREFSMAN->m_bAttractSound ) + if( !PREFSMAN->m_bDemonstrationSound ) SOUNDMAN->SetPrefs( PREFSMAN->m_fSoundVolume ); // turn volume back on GAMESTATE->Reset(); diff --git a/stepmania/src/ScreenOptionsMasterPrefs.cpp b/stepmania/src/ScreenOptionsMasterPrefs.cpp index 0f508c650f..446acf33d7 100644 --- a/stepmania/src/ScreenOptionsMasterPrefs.cpp +++ b/stepmania/src/ScreenOptionsMasterPrefs.cpp @@ -250,6 +250,7 @@ MOVE( SoloSingles, PREFSMAN->m_bSoloSingle ); MOVE( HiddenSongs, PREFSMAN->m_bHiddenSongs ); MOVE( EasterEggs, PREFSMAN->m_bEasterEggs ); MOVE( MarvelousTiming, PREFSMAN->m_iMarvelousTiming ); +MOVE( AllowExtraStage, PREFSMAN->m_bAllowExtraStage ); MOVE( PickExtraStage, PREFSMAN->m_bPickExtraStage ); MOVE( UnlockSystem, PREFSMAN->m_bUseUnlockSystem ); @@ -374,6 +375,7 @@ static void RefreshRate( int &sel, bool ToSel, const CStringArray &choices ) MOVE( PreloadSounds, PREFSMAN->m_bSoundPreloadAll ); MOVE( ResamplingQuality, PREFSMAN->m_iSoundResampleQuality ); MOVE( AttractSound, PREFSMAN->m_bAttractSound ); +MOVE( DemonstrationSound, PREFSMAN->m_bDemonstrationSound ); static void SoundVolume( int &sel, bool ToSel, const CStringArray &choices ) { @@ -428,6 +430,7 @@ static const ConfOption g_ConfOptions[] = ConfOption( "Hidden\nSongs", HiddenSongs, "OFF","ON" ), ConfOption( "Easter\nEggs", EasterEggs, "OFF","ON" ), ConfOption( "Marvelous\nTiming", MarvelousTiming, "NEVER","COURSES ONLY","ALWAYS" ), + ConfOption( "Allow Extra\nStage", AllowExtraStage, "OFF","ON" ), ConfOption( "Pick Extra\nStage", PickExtraStage, "OFF","ON" ), ConfOption( "Unlock\nSystem", UnlockSystem, "OFF","ON" ),