From fe07a07fa368cce4082e653f7ba746528744f6b1 Mon Sep 17 00:00:00 2001 From: Steve Checkoway Date: Thu, 15 May 2008 09:57:29 +0000 Subject: [PATCH] Fix compile and move these preferences into UnlockManager. --- stepmania/src/PrefsManager.cpp | 4 ---- stepmania/src/PrefsManager.h | 5 ----- stepmania/src/UnlockManager.cpp | 14 +++++++++----- 3 files changed, 9 insertions(+), 14 deletions(-) diff --git a/stepmania/src/PrefsManager.cpp b/stepmania/src/PrefsManager.cpp index a244214a7c..0d17654887 100644 --- a/stepmania/src/PrefsManager.cpp +++ b/stepmania/src/PrefsManager.cpp @@ -232,10 +232,6 @@ PrefsManager::PrefsManager() : m_bEnableAttackSoundPlayback ( "EnableAttackSounds", true ), m_bEnableMineSoundPlayback ( "EnableMineHitSound", true ), - m_bEventIgnoredLockStatusCS ( "EventModeShowsHiddenOrLockedCoursesAndSongs", false ), - m_bEventIgnoredLockStatusMod ( "EventModeShowsLockedModifiers", false ), - m_bEventIgnoredLockStatusStep ( "EventModeShowsLockedSteps", false ), - 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 315926d380..200b2d8449 100644 --- a/stepmania/src/PrefsManager.h +++ b/stepmania/src/PrefsManager.h @@ -129,11 +129,6 @@ public: Preference m_fLifeDifficultyScale; - // Event Mode overrides to show courses/mods/songs/steps without changing their selectable/lock status manually - Preference m_bEventIgnoresLockStatusCS; - Preference m_bEventIgnoresLockStatusMod; - Preference m_bEventIgnoresLockStatusStep; - // Whoever added these: Please add a comment saying what they do. -Chris Preference m_iRegenComboAfterMiss; Preference m_bMercifulDrain; // negative life deltas are scaled by the players life percentage diff --git a/stepmania/src/UnlockManager.cpp b/stepmania/src/UnlockManager.cpp index 6257a8bd55..90845eaf5a 100644 --- a/stepmania/src/UnlockManager.cpp +++ b/stepmania/src/UnlockManager.cpp @@ -21,7 +21,11 @@ UnlockManager* UNLOCKMAN = NULL; // global and accessable from anywhere in our p #define UNLOCK_NAMES THEME->GetMetric ("UnlockManager","UnlockNames") #define UNLOCK(x) THEME->GetMetricR("UnlockManager", ssprintf("Unlock%sCommand",x.c_str())); -ThemeMetric AUTO_LOCK_CHALLENGE_STEPS( "UnlockManager", "AutoLockChallengeSteps" ); +static ThemeMetric AUTO_LOCK_CHALLENGE_STEPS( "UnlockManager", "AutoLockChallengeSteps" ); + +static Preference g_bEventIgnoresLockStatusCS ( "EventModeShowsHiddenOrLockedCoursesAndSongs", false ); +static Preference g_bEventIgnoresLockStatusMod ( "EventModeShowsLockedModifiers", false ); +static Preference g_bEventIgnoresLockStatusStep ( "EventModeShowsLockedSteps", false ); static const char *UnlockRequirementNames[] = { @@ -132,7 +136,7 @@ int UnlockManager::CourseIsLocked( const Course *pCourse ) const } // Show the course if this is true - if( PREFSMAN->m_bEventMode && PREFSMAN->m_bEventIgnoresLockStatusCS ) + if( PREFSMAN->m_bEventMode && g_bEventIgnoresLockStatusCS ) iRet = 0; return iRet; @@ -158,7 +162,7 @@ int UnlockManager::SongIsLocked( const Song *pSong ) const iRet |= LOCKED_DISABLED; // Check to see if we should show anyways because of Event Mode. - if( PREFSMAN->m_bEventMode && PREFSMAN->m_bEventIgnoresLockStatusCS ) + if( PREFSMAN->m_bEventMode && g_bEventIgnoresLockStatusCS ) iRet = 0; return iRet; @@ -174,7 +178,7 @@ bool UnlockManager::StepsIsLocked( const Song *pSong, const Steps *pSteps ) cons return false; // Show the stepchart if this is true - if( PREFSMAN->m_bEventMode && PREFSMAN->m_bEventIgnoresLockStatusSteps ) + if( PREFSMAN->m_bEventMode && g_bEventIgnoresLockStatusStep ) return false; return p->IsLocked(); @@ -190,7 +194,7 @@ bool UnlockManager::ModifierIsLocked( const RString &sOneMod ) const return false; // Show the modifier if this is true - if( PREFSMAN->m_bEventMode && PREFSMAN->m_bEventIgnoresLockStatusModifier ) + if( PREFSMAN->m_bEventMode && g_bEventIgnoresLockStatusMod ) return false; return p->IsLocked();