From 67ebd51321b20e1b9d2b2eaefa713647de5f211d Mon Sep 17 00:00:00 2001 From: Steve Checkoway Date: Thu, 15 May 2008 10:05:48 +0000 Subject: [PATCH] Move Player-specific preferences to Player.cpp. --- stepmania/src/Player.cpp | 12 ++++++------ stepmania/src/PrefsManager.cpp | 3 --- stepmania/src/PrefsManager.h | 4 ---- 3 files changed, 6 insertions(+), 13 deletions(-) diff --git a/stepmania/src/Player.cpp b/stepmania/src/Player.cpp index 26e4749d5d..e9206ee734 100644 --- a/stepmania/src/Player.cpp +++ b/stepmania/src/Player.cpp @@ -121,6 +121,9 @@ static Preference m_fTimingWindowAdd ( "TimingWindowAdd", 0 ); static Preference1D m_fTimingWindowSeconds( TimingWindowSecondsInit, NUM_TimingWindow ); static Preference m_fTimingWindowJump ( "TimingWindowJump", 0.25 ); static Preference m_fMaxInputLatencySeconds ( "MaxInputLatencySeconds", 0.0 ); +static Preference g_bEnableAttackSoundPlayback ( "EnableAttackSounds", true ); +static Preference g_bEnableMineSoundPlayback ( "EnableMineHitSound", true ); + Preference g_fTimingWindowHopo ( "TimingWindowHopo", 0.25 ); // max time between notes in a hopo chain Preference g_fTimingWindowStrum ( "TimingWindowStrum", 0.1f ); // max time between strum and when the frets must match ThemeMetric INITIAL_HOLD_LIFE ( "Player", "InitialHoldLife" ); @@ -593,7 +596,7 @@ void Player::Update( float fDeltaTime ) // if the Player doesn't show anything on the screen. if( HasVisibleParts() ) { - if( PREFSMAN->m_bEnableAttackSoundPlayback ) + if( g_bEnableAttackSoundPlayback ) { if( m_pPlayerState->m_bAttackBeganThisUpdate ) m_soundAttackLaunch.Play(); @@ -2290,11 +2293,8 @@ void Player::UpdateJudgedRows() continue; if( tn.iKeysoundIndex >= 0 && tn.iKeysoundIndex < (int) m_vKeysounds.size() ) setSounds.insert( &m_vKeysounds[tn.iKeysoundIndex] ); - else - { - if( PREFSMAN->m_bEnableMineSoundPlayback ) - setSounds.insert( &m_soundMine ); - } + else if( g_bEnableMineSoundPlayback ) + setSounds.insert( &m_soundMine ); ChangeLife( tn.result.tns ); if( m_pScoreDisplay ) diff --git a/stepmania/src/PrefsManager.cpp b/stepmania/src/PrefsManager.cpp index 0d17654887..117d9259b3 100644 --- a/stepmania/src/PrefsManager.cpp +++ b/stepmania/src/PrefsManager.cpp @@ -229,9 +229,6 @@ PrefsManager::PrefsManager() : m_bTrilinearFiltering ( "TrilinearFiltering", false ), m_bAnisotropicFiltering ( "AnisotropicFiltering", false ), - m_bEnableAttackSoundPlayback ( "EnableAttackSounds", true ), - m_bEnableMineSoundPlayback ( "EnableMineHitSound", true ), - m_bSignProfileData ( "SignProfileData", false ), m_CourseSortOrder ( "CourseSortOrder", COURSE_SORT_SONGS ), m_bSubSortByNumSteps ( "SubSortByNumSteps", false ), diff --git a/stepmania/src/PrefsManager.h b/stepmania/src/PrefsManager.h index 200b2d8449..bf4f7c0292 100644 --- a/stepmania/src/PrefsManager.h +++ b/stepmania/src/PrefsManager.h @@ -186,10 +186,6 @@ public: Preference m_bCelShadeModels; Preference m_bPreferredSortUsesGroups; - // Options to enable/disable the playback of attack start/end sounds, and mine hit sounds - Preference m_bEnableAttackSoundPlayback; - Preference m_bEnableMineSoundPlayback; - // Number of seconds it takes for a button on the controller to release // after pressed. Preference m_fPadStickSeconds;