diff --git a/stepmania/Themes/default/metrics.ini b/stepmania/Themes/default/metrics.ini index 995e752e3c..a99d38e76d 100644 --- a/stepmania/Themes/default/metrics.ini +++ b/stepmania/Themes/default/metrics.ini @@ -3608,15 +3608,16 @@ Game=Change the current game type with this option. TimerSeconds=30 StyleIcon=false PlayMusic=false -LineNames="1,2,3,4,5,6,7,8" +LineNames="1,2,3,4,5,6,7,8,9" Line1="list,LifeType" Line2="list,BarDrain" Line3="list,BatLives" Line4="list,Fail" Line5="list,AssistTick" Line6="list,Rate" -Line7="list,AutoAdjust" -Line8="list,SaveScores" +Line7="list,SoundEffect" +Line8="list,AutoAdjust" +Line9="list,SaveScores" StopMusicOnBack=false [ScreenCredits2] @@ -3865,6 +3866,11 @@ AutoAdjust,1="mod,no autosync;name,Off" AutoAdjust,2="mod,autosyncsong;name,Sync Song" AutoAdjust,3="mod,autosyncmachine;name,Sync Machine" AutoAdjust,4="mod,autosynctempo;name,Sync Tempo" +SoundEffect="3;together" +SoundEffectDefault="" +SoundEffect,1="mod,no effect;name,Off" +SoundEffect,2="mod,EffectSpeed;name,EffectSpeed" +SoundEffect,3="mod,EffectPitch;name,EffectPitch" SaveScores="2;together" SaveScoresDefault="" SaveScores,1="mod,no savescore;name,Off" diff --git a/stepmania/src/SongOptions.cpp b/stepmania/src/SongOptions.cpp index 33bc1b1f3e..030cf6d6cf 100644 --- a/stepmania/src/SongOptions.cpp +++ b/stepmania/src/SongOptions.cpp @@ -16,6 +16,7 @@ void SongOptions::Init() m_fHaste = 0.0f; m_SpeedfHaste = 1.0f; m_AutosyncType = AUTOSYNC_OFF; + m_SoundEffectType = SOUNDEFFECT_OFF; m_bSaveScore = true; } @@ -33,6 +34,7 @@ void SongOptions::Approach( const SongOptions& other, float fDeltaSeconds ) APPROACH( fHaste ); DO_COPY( m_bAssistTick ); DO_COPY( m_AutosyncType ); + DO_COPY( m_SoundEffectType ); DO_COPY( m_bSaveScore ); #undef APPROACH #undef DO_COPY @@ -97,6 +99,14 @@ void SongOptions::GetMods( vector &AddTo ) const case AUTOSYNC_TEMPO: AddTo.push_back("AutosyncTempo"); break; default: ASSERT(0); } + + switch( m_SoundEffectType ) + { + case SOUNDEFFECT_OFF: break; + case SOUNDEFFECT_SPEED: AddTo.push_back("EffectSpeed"); break; + case SOUNDEFFECT_PITCH: AddTo.push_back("EffectPitch"); break; + default: ASSERT(0); + } } void SongOptions::GetLocalizedMods( vector &AddTo ) const @@ -187,6 +197,12 @@ void SongOptions::FromString( const RString &sOptions ) m_AutosyncType = on ? AUTOSYNC_MACHINE : AUTOSYNC_OFF; else if( sBit == "autosynctempo" ) m_AutosyncType = on ? AUTOSYNC_TEMPO : AUTOSYNC_OFF; + else if( sBit == "effect" && !on ) + m_SoundEffectType = SOUNDEFFECT_OFF; + else if( sBit == "effectspeed" ) + m_SoundEffectType = on ? SOUNDEFFECT_SPEED : SOUNDEFFECT_OFF; + else if( sBit == "effectpitch" ) + m_SoundEffectType = on ? SOUNDEFFECT_PITCH : SOUNDEFFECT_OFF; else if( sBit == "savescore" ) m_bSaveScore = on; else if( sBit == "bar" ) m_LifeType = LIFE_BAR; else if( sBit == "battery" ) m_LifeType = LIFE_BATTERY; @@ -206,6 +222,7 @@ bool SongOptions::operator==( const SongOptions &other ) const COMPARE( m_fHaste ); COMPARE( m_bAssistTick ); COMPARE( m_AutosyncType ); + COMPARE( m_SoundEffectType ); COMPARE( m_bSaveScore ); #undef COMPARE return true; diff --git a/stepmania/src/SongOptions.h b/stepmania/src/SongOptions.h index 6062a99701..8287f3b10e 100644 --- a/stepmania/src/SongOptions.h +++ b/stepmania/src/SongOptions.h @@ -40,6 +40,13 @@ public: }; AutosyncType m_AutosyncType; bool m_bSaveScore; + enum SoundEffectType { + SOUNDEFFECT_OFF, + SOUNDEFFECT_SPEED, + SOUNDEFFECT_PITCH, + NUM_SOUNDEFFECT + }; + SoundEffectType m_SoundEffectType; SongOptions() { Init(); };