Fix compile and move these preferences into UnlockManager.

This commit is contained in:
Steve Checkoway
2008-05-15 09:57:29 +00:00
parent 9f0e7f02c6
commit fe07a07fa3
3 changed files with 9 additions and 14 deletions
-4
View File
@@ -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 ),
-5
View File
@@ -129,11 +129,6 @@ public:
Preference<float> m_fLifeDifficultyScale;
// Event Mode overrides to show courses/mods/songs/steps without changing their selectable/lock status manually
Preference<bool> m_bEventIgnoresLockStatusCS;
Preference<bool> m_bEventIgnoresLockStatusMod;
Preference<bool> m_bEventIgnoresLockStatusStep;
// Whoever added these: Please add a comment saying what they do. -Chris
Preference<int> m_iRegenComboAfterMiss;
Preference<bool> m_bMercifulDrain; // negative life deltas are scaled by the players life percentage
+9 -5
View File
@@ -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<bool> AUTO_LOCK_CHALLENGE_STEPS( "UnlockManager", "AutoLockChallengeSteps" );
static ThemeMetric<bool> AUTO_LOCK_CHALLENGE_STEPS( "UnlockManager", "AutoLockChallengeSteps" );
static Preference<bool> g_bEventIgnoresLockStatusCS ( "EventModeShowsHiddenOrLockedCoursesAndSongs", false );
static Preference<bool> g_bEventIgnoresLockStatusMod ( "EventModeShowsLockedModifiers", false );
static Preference<bool> 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();