convert more prefs to use Preference
This commit is contained in:
@@ -110,7 +110,7 @@ void Background::LoadFromAniDir( CString sAniDir )
|
|||||||
{
|
{
|
||||||
Unload();
|
Unload();
|
||||||
|
|
||||||
if( PREFSMAN->m_fBGBrightness == 0 )
|
if( PREFSMAN->m_fBGBrightness == 0.0f )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
BGAnimation* pTempBGA;
|
BGAnimation* pTempBGA;
|
||||||
@@ -184,7 +184,7 @@ BGAnimation *Background::CreateSongBGA( CString sBGName ) const
|
|||||||
|
|
||||||
CString Background::CreateRandomBGA()
|
CString Background::CreateRandomBGA()
|
||||||
{
|
{
|
||||||
if( PREFSMAN->m_BackgroundMode == PrefsManager::BGMODE_OFF )
|
if( PREFSMAN->m_iBackgroundMode == PrefsManager::BGMODE_OFF )
|
||||||
return "";
|
return "";
|
||||||
|
|
||||||
/* If we already have enough random BGAs loaded, use them round-robin. */
|
/* If we already have enough random BGAs loaded, use them round-robin. */
|
||||||
@@ -199,10 +199,10 @@ CString Background::CreateRandomBGA()
|
|||||||
}
|
}
|
||||||
|
|
||||||
CStringArray arrayPaths;
|
CStringArray arrayPaths;
|
||||||
switch( PREFSMAN->m_BackgroundMode )
|
switch( PREFSMAN->m_iBackgroundMode )
|
||||||
{
|
{
|
||||||
default:
|
default:
|
||||||
FAIL_M( ssprintf("Invalid BackgroundMode: %i", PREFSMAN->m_BackgroundMode) );
|
FAIL_M( ssprintf("Invalid BackgroundMode: %i", PREFSMAN->m_iBackgroundMode) );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PrefsManager::BGMODE_ANIMATIONS:
|
case PrefsManager::BGMODE_ANIMATIONS:
|
||||||
@@ -250,7 +250,7 @@ CString Background::CreateRandomBGA()
|
|||||||
}
|
}
|
||||||
|
|
||||||
BGAnimation *ret = new BGAnimation;
|
BGAnimation *ret = new BGAnimation;
|
||||||
switch( PREFSMAN->m_BackgroundMode )
|
switch( PREFSMAN->m_iBackgroundMode )
|
||||||
{
|
{
|
||||||
case PrefsManager::BGMODE_ANIMATIONS: ret->LoadFromAniDir( file ); break;
|
case PrefsManager::BGMODE_ANIMATIONS: ret->LoadFromAniDir( file ); break;
|
||||||
case PrefsManager::BGMODE_MOVIEVIS: ret->LoadFromVisualization( file ); break;
|
case PrefsManager::BGMODE_MOVIEVIS: ret->LoadFromVisualization( file ); break;
|
||||||
@@ -301,7 +301,7 @@ void Background::LoadFromSong( const Song* pSong )
|
|||||||
|
|
||||||
m_pSong = pSong;
|
m_pSong = pSong;
|
||||||
|
|
||||||
if( PREFSMAN->m_fBGBrightness == 0 )
|
if( PREFSMAN->m_fBGBrightness == 0.0f )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* Song backgrounds (even just background stills) can get very big; never keep them
|
/* Song backgrounds (even just background stills) can get very big; never keep them
|
||||||
@@ -570,7 +570,7 @@ void Background::Update( float fDeltaTime )
|
|||||||
|
|
||||||
void Background::DrawPrimitives()
|
void Background::DrawPrimitives()
|
||||||
{
|
{
|
||||||
if( PREFSMAN->m_fBGBrightness == 0 )
|
if( PREFSMAN->m_fBGBrightness == 0.0f )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if( IsDangerAllVisible() )
|
if( IsDangerAllVisible() )
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ Banner::Banner()
|
|||||||
m_bScrolling = false;
|
m_bScrolling = false;
|
||||||
m_fPercentScrolling = 0;
|
m_fPercentScrolling = 0;
|
||||||
|
|
||||||
if( PREFSMAN->m_BannerCache != PrefsManager::BNCACHE_OFF )
|
if( PREFSMAN->m_iBannerCache != PrefsManager::BNCACHE_OFF )
|
||||||
{
|
{
|
||||||
TEXTUREMAN->CacheTexture( SongBannerTexture(THEME->GetPathG("Banner","all music")) );
|
TEXTUREMAN->CacheTexture( SongBannerTexture(THEME->GetPathG("Banner","all music")) );
|
||||||
TEXTUREMAN->CacheTexture( SongBannerTexture(THEME->GetPathG("Common","fallback banner")) );
|
TEXTUREMAN->CacheTexture( SongBannerTexture(THEME->GetPathG("Common","fallback banner")) );
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ CString BannerCache::GetBannerCachePath( CString BannerPath )
|
|||||||
|
|
||||||
void BannerCache::LoadBanner( CString BannerPath )
|
void BannerCache::LoadBanner( CString BannerPath )
|
||||||
{
|
{
|
||||||
if( PREFSMAN->m_BannerCache != PrefsManager::BNCACHE_LOW_RES || BannerPath == "" )
|
if( PREFSMAN->m_iBannerCache != PrefsManager::BNCACHE_LOW_RES || BannerPath == "" )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* Load it. */
|
/* Load it. */
|
||||||
@@ -276,7 +276,7 @@ static inline int closest( int num, int n1, int n2 )
|
|||||||
* if the memory or settings change. */
|
* if the memory or settings change. */
|
||||||
void BannerCache::CacheBanner( CString BannerPath )
|
void BannerCache::CacheBanner( CString BannerPath )
|
||||||
{
|
{
|
||||||
if( PREFSMAN->m_BannerCache != PrefsManager::BNCACHE_LOW_RES )
|
if( PREFSMAN->m_iBannerCache != PrefsManager::BNCACHE_LOW_RES )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
CHECKPOINT_M( BannerPath );
|
CHECKPOINT_M( BannerPath );
|
||||||
@@ -413,7 +413,7 @@ void BannerCache::CacheBannerInternal( CString BannerPath )
|
|||||||
const CString CachePath = GetBannerCachePath(BannerPath);
|
const CString CachePath = GetBannerCachePath(BannerPath);
|
||||||
RageSurfaceUtils::SaveSurface( img, CachePath );
|
RageSurfaceUtils::SaveSurface( img, CachePath );
|
||||||
|
|
||||||
if( PREFSMAN->m_BannerCache == PrefsManager::BNCACHE_LOW_RES )
|
if( PREFSMAN->m_iBannerCache == PrefsManager::BNCACHE_LOW_RES )
|
||||||
{
|
{
|
||||||
/* If an old image is loaded, free it. */
|
/* If an old image is loaded, free it. */
|
||||||
if( g_BannerPathToImage.find(BannerPath) != g_BannerPathToImage.end() )
|
if( g_BannerPathToImage.find(BannerPath) != g_BannerPathToImage.end() )
|
||||||
|
|||||||
@@ -107,12 +107,16 @@ bool FadingBanner::LoadFromCachedBanner( const CString &path )
|
|||||||
* which will cause the fade-in to be further delayed. */
|
* which will cause the fade-in to be further delayed. */
|
||||||
|
|
||||||
RageTextureID ID;
|
RageTextureID ID;
|
||||||
bool bLowRes = (PREFSMAN->m_BannerCache != PrefsManager::BNCACHE_FULL);
|
bool bLowRes = (PREFSMAN->m_iBannerCache != PrefsManager::BNCACHE_FULL);
|
||||||
if( !bLowRes )
|
if( !bLowRes )
|
||||||
|
{
|
||||||
ID = Sprite::SongBannerTexture( path );
|
ID = Sprite::SongBannerTexture( path );
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
/* Try to load the low quality version. */
|
/* Try to load the low quality version. */
|
||||||
ID = BANNERCACHE->LoadCachedBanner( path );
|
ID = BANNERCACHE->LoadCachedBanner( path );
|
||||||
|
}
|
||||||
|
|
||||||
if( !TEXTUREMAN->IsTextureRegistered(ID) )
|
if( !TEXTUREMAN->IsTextureRegistered(ID) )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -32,20 +32,22 @@ template <class T>
|
|||||||
class Preference : public IPreference
|
class Preference : public IPreference
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
// Make currentValue first in the list so that we can pass this object
|
||||||
|
// as an argument in a var_arg function as in printf.
|
||||||
|
T m_currentValue;
|
||||||
PrefsGroup m_PrefsGroup;
|
PrefsGroup m_PrefsGroup;
|
||||||
CString m_sName;
|
CString m_sName;
|
||||||
T m_defaultValue;
|
T m_defaultValue;
|
||||||
T m_currentValue;
|
|
||||||
|
|
||||||
CString ToString();
|
CString ToString();
|
||||||
void FromString( const CString &s );
|
void FromString( const CString &s );
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Preference( PrefsGroup PrefsGroup, const CString& sName, const T& defaultValue ):
|
Preference( PrefsGroup PrefsGroup, const CString& sName, const T& defaultValue ):
|
||||||
|
m_currentValue( defaultValue ),
|
||||||
m_PrefsGroup( PrefsGroup ),
|
m_PrefsGroup( PrefsGroup ),
|
||||||
m_sName( sName ),
|
m_sName( sName ),
|
||||||
m_defaultValue( defaultValue ),
|
m_defaultValue( defaultValue )
|
||||||
m_currentValue( defaultValue )
|
|
||||||
{
|
{
|
||||||
SubscribePreference( this );
|
SubscribePreference( this );
|
||||||
LoadDefault();
|
LoadDefault();
|
||||||
@@ -64,26 +66,15 @@ public:
|
|||||||
void ReadFrom( const IniFile &ini );
|
void ReadFrom( const IniFile &ini );
|
||||||
void WriteTo( IniFile &ini ) const;
|
void WriteTo( IniFile &ini ) const;
|
||||||
|
|
||||||
operator T& ()
|
operator T () const
|
||||||
{
|
{
|
||||||
return m_currentValue;
|
return m_currentValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
operator const T& () const
|
void operator=( const T& other )
|
||||||
{
|
{
|
||||||
return m_currentValue;
|
m_currentValue = other;
|
||||||
}
|
}
|
||||||
|
|
||||||
T& operator=( const T& other )
|
|
||||||
{
|
|
||||||
return m_currentValue = other;
|
|
||||||
}
|
|
||||||
|
|
||||||
T operator!()
|
|
||||||
{
|
|
||||||
return !m_currentValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -72,7 +72,49 @@ PrefsManager::PrefsManager() :
|
|||||||
false
|
false
|
||||||
#endif
|
#endif
|
||||||
),
|
),
|
||||||
m_bShowBanners ( Options, "ShowBanners", true )
|
m_bShowBanners ( Options, "ShowBanners", true ),
|
||||||
|
|
||||||
|
m_iBackgroundMode ( Options, "m_iBackgroundMode", BGMODE_ANIMATIONS ),
|
||||||
|
m_iNumBackgrounds ( Options, "m_iNumBackgrounds", 8 ),
|
||||||
|
m_fBGBrightness ( Options, "m_fBGBrightness", 0.8f ),
|
||||||
|
m_bHiddenSongs ( Options, "m_bHiddenSongs", false ), /* I'd rather get occasional people asking for support for this even though it's already here than lots of people asking why songs aren't being displayed. */
|
||||||
|
m_bVsync ( Options, "m_bVsync", true ),
|
||||||
|
m_bInterlaced ( Options, "m_bInterlaced", false ),
|
||||||
|
/* XXX: Set these defaults for individual consoles using VideoCardDefaults.ini. */
|
||||||
|
m_bPAL ( Options, "m_bPAL", false ),
|
||||||
|
m_bDelayedTextureDelete ( Options, "m_bDelayedTextureDelete", true ),
|
||||||
|
m_bTexturePreload ( Options, "m_bTexturePreload", false ),
|
||||||
|
m_bDelayedScreenLoad ( Options, "m_bDelayedScreenLoad", false ),
|
||||||
|
m_bDelayedModelDelete ( Options, "m_bDelayedModelDelete", false ),
|
||||||
|
m_iBannerCache ( Options, "m_iBannerCache", BNCACHE_LOW_RES ),
|
||||||
|
m_bPalettedBannerCache ( Options, "m_bPalettedBannerCache", false ),
|
||||||
|
m_bFastLoad ( Options, "m_bFastLoad", true ),
|
||||||
|
|
||||||
|
m_bOnlyDedicatedMenuButtons ( Options, "m_bOnlyDedicatedMenuButtons", false ),
|
||||||
|
m_bMenuTimer ( Options, "m_bMenuTimer", true ),
|
||||||
|
m_bShowDanger ( Options, "m_bShowDanger", true ),
|
||||||
|
|
||||||
|
m_fJudgeWindowScale ( Options, "m_fJudgeWindowScale", 1.0f ),
|
||||||
|
m_fJudgeWindowAdd ( Options, "m_fJudgeWindowAdd", 0 ),
|
||||||
|
m_fJudgeWindowSecondsMarvelous ( Options, "m_fJudgeWindowSecondsMarvelous", 0.0225f ),
|
||||||
|
m_fJudgeWindowSecondsPerfect ( Options, "m_fJudgeWindowSecondsPerfect", 0.045f ),
|
||||||
|
m_fJudgeWindowSecondsGreat ( Options, "m_fJudgeWindowSecondsGreat", 0.090f ),
|
||||||
|
m_fJudgeWindowSecondsGood ( Options, "m_fJudgeWindowSecondsGood", 0.135f ),
|
||||||
|
m_fJudgeWindowSecondsBoo ( Options, "m_fJudgeWindowSecondsBoo", 0.180f ),
|
||||||
|
m_fJudgeWindowSecondsOK ( Options, "m_fJudgeWindowSecondsOK", 0.250f ), // allow enough time to take foot off and put back on
|
||||||
|
m_fJudgeWindowSecondsMine ( Options, "m_fJudgeWindowSecondsMine", 0.090f ), // same as great
|
||||||
|
m_fJudgeWindowSecondsAttack ( Options, "m_fJudgeWindowSecondsAttack", 0.135f ),
|
||||||
|
|
||||||
|
m_fLifeDifficultyScale ( Options, "m_fLifeDifficultyScale", 1.0f ),
|
||||||
|
m_fLifeDeltaPercentChangeMarvelous ( Options, "m_fLifeDeltaPercentChangeMarvelous", +0.008f ),
|
||||||
|
m_fLifeDeltaPercentChangePerfect ( Options, "m_fLifeDeltaPercentChangePerfect", +0.008f ),
|
||||||
|
m_fLifeDeltaPercentChangeGreat ( Options, "m_fLifeDeltaPercentChangeGreat", +0.004f ),
|
||||||
|
m_fLifeDeltaPercentChangeGood ( Options, "m_fLifeDeltaPercentChangeGood", +0.000f ),
|
||||||
|
m_fLifeDeltaPercentChangeBoo ( Options, "m_fLifeDeltaPercentChangeBoo", -0.040f ),
|
||||||
|
m_fLifeDeltaPercentChangeMiss ( Options, "m_fLifeDeltaPercentChangeMiss", -0.080f ),
|
||||||
|
m_fLifeDeltaPercentChangeHitMine ( Options, "m_fLifeDeltaPercentChangeHitMine", -0.160f ),
|
||||||
|
m_fLifeDeltaPercentChangeOK ( Options, "m_fLifeDeltaPercentChangeOK", +0.008f ),
|
||||||
|
m_fLifeDeltaPercentChangeNG ( Options, "m_fLifeDeltaPercentChangeNG", -0.080f )
|
||||||
{
|
{
|
||||||
Init();
|
Init();
|
||||||
ReadGlobalPrefsFromDisk();
|
ReadGlobalPrefsFromDisk();
|
||||||
@@ -80,37 +122,13 @@ PrefsManager::PrefsManager() :
|
|||||||
|
|
||||||
void PrefsManager::Init()
|
void PrefsManager::Init()
|
||||||
{
|
{
|
||||||
m_bOnlyDedicatedMenuButtons = false;
|
|
||||||
m_bCelShadeModels = false; // Work-In-Progress.. disable by default.
|
m_bCelShadeModels = false; // Work-In-Progress.. disable by default.
|
||||||
m_fConstantUpdateDeltaSeconds = 0;
|
m_fConstantUpdateDeltaSeconds = 0;
|
||||||
m_BackgroundMode = BGMODE_ANIMATIONS;
|
|
||||||
m_iNumBackgrounds = 8;
|
|
||||||
m_bShowDanger = true;
|
m_bShowDanger = true;
|
||||||
m_fBGBrightness = 0.8f;
|
|
||||||
m_bMenuTimer = true;
|
m_bMenuTimer = true;
|
||||||
m_iNumArcadeStages = 3;
|
m_iNumArcadeStages = 3;
|
||||||
m_bEventMode = false;
|
m_bEventMode = false;
|
||||||
m_bAutoPlay = false;
|
m_bAutoPlay = false;
|
||||||
m_fJudgeWindowScale = 1.0f;
|
|
||||||
m_fJudgeWindowAdd = 0;
|
|
||||||
m_fLifeDifficultyScale = 1.0f;
|
|
||||||
m_fJudgeWindowSecondsMarvelous = 0.0225f;
|
|
||||||
m_fJudgeWindowSecondsPerfect = 0.045f;
|
|
||||||
m_fJudgeWindowSecondsGreat = 0.090f;
|
|
||||||
m_fJudgeWindowSecondsGood = 0.135f;
|
|
||||||
m_fJudgeWindowSecondsBoo = 0.180f;
|
|
||||||
m_fJudgeWindowSecondsOK = 0.250f; // allow enough time to take foot off and put back on
|
|
||||||
m_fJudgeWindowSecondsMine = 0.090f; // same as great
|
|
||||||
m_fJudgeWindowSecondsAttack = 0.135f;
|
|
||||||
m_fLifeDeltaPercentChangeMarvelous = +0.008f;
|
|
||||||
m_fLifeDeltaPercentChangePerfect = +0.008f;
|
|
||||||
m_fLifeDeltaPercentChangeGreat = +0.004f;
|
|
||||||
m_fLifeDeltaPercentChangeGood = +0.000f;
|
|
||||||
m_fLifeDeltaPercentChangeBoo = -0.040f;
|
|
||||||
m_fLifeDeltaPercentChangeMiss = -0.080f;
|
|
||||||
m_fLifeDeltaPercentChangeHitMine = -0.160f;
|
|
||||||
m_fLifeDeltaPercentChangeOK = +0.008f;
|
|
||||||
m_fLifeDeltaPercentChangeNG = -0.080f;
|
|
||||||
|
|
||||||
m_fTugMeterPercentChangeMarvelous = +0.010f;
|
m_fTugMeterPercentChangeMarvelous = +0.010f;
|
||||||
m_fTugMeterPercentChangePerfect = +0.008f;
|
m_fTugMeterPercentChangePerfect = +0.008f;
|
||||||
@@ -178,13 +196,6 @@ void PrefsManager::Init()
|
|||||||
m_bShowNativeLanguage = true;
|
m_bShowNativeLanguage = true;
|
||||||
m_bArcadeOptionsNavigation = false;
|
m_bArcadeOptionsNavigation = false;
|
||||||
m_bSoloSingle = false;
|
m_bSoloSingle = false;
|
||||||
m_bDelayedTextureDelete = true;
|
|
||||||
m_bTexturePreload = false;
|
|
||||||
m_bDelayedScreenLoad = false;
|
|
||||||
m_bDelayedModelDelete = false;
|
|
||||||
m_BannerCache = BNCACHE_LOW_RES;
|
|
||||||
m_bPalettedBannerCache = false;
|
|
||||||
m_bFastLoad = true;
|
|
||||||
m_MusicWheelUsesSections = ALWAYS;
|
m_MusicWheelUsesSections = ALWAYS;
|
||||||
m_iMusicWheelSwitchSpeed = 10;
|
m_iMusicWheelSwitchSpeed = 10;
|
||||||
m_bEasterEggs = true;
|
m_bEasterEggs = true;
|
||||||
@@ -240,10 +251,7 @@ void PrefsManager::Init()
|
|||||||
m_fLongVerSongSeconds = 60*2.5f; // Dynamite Rave is 2:55
|
m_fLongVerSongSeconds = 60*2.5f; // Dynamite Rave is 2:55
|
||||||
m_fMarathonVerSongSeconds = 60*5.f;
|
m_fMarathonVerSongSeconds = 60*5.f;
|
||||||
|
|
||||||
/* I'd rather get occasional people asking for support for this even though it's
|
|
||||||
* already here than lots of people asking why songs aren't being displayed. */
|
|
||||||
m_bHiddenSongs = false;
|
|
||||||
m_bVsync = true;
|
|
||||||
m_sLanguage = ""; // ThemeManager will deal with this invalid language
|
m_sLanguage = ""; // ThemeManager will deal with this invalid language
|
||||||
|
|
||||||
m_iCenterImageTranslateX = 0;
|
m_iCenterImageTranslateX = 0;
|
||||||
@@ -265,12 +273,6 @@ void PrefsManager::Init()
|
|||||||
|
|
||||||
m_bEditorShowBGChangesPlay = false;
|
m_bEditorShowBGChangesPlay = false;
|
||||||
|
|
||||||
/* XXX: Set these defaults for individual consoles using VideoCardDefaults.ini. */
|
|
||||||
m_bPAL = false;
|
|
||||||
#ifndef _XBOX
|
|
||||||
m_bInterlaced = false;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
m_sSoundDrivers = DEFAULT_SOUND_DRIVER_LIST;
|
m_sSoundDrivers = DEFAULT_SOUND_DRIVER_LIST;
|
||||||
/* Number of frames to write ahead; usually 44100 frames per second.
|
/* Number of frames to write ahead; usually 44100 frames per second.
|
||||||
* (Number of millisec would be more flexible, but it's more useful to
|
* (Number of millisec would be more flexible, but it's more useful to
|
||||||
@@ -369,39 +371,11 @@ void PrefsManager::ReadPrefsFromFile( CString sIni )
|
|||||||
if( !ini.ReadFile(sIni) )
|
if( !ini.ReadFile(sIni) )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ini.GetValue( "Options", "Interlaced", m_bInterlaced );
|
|
||||||
ini.GetValue( "Options", "PAL", m_bPAL );
|
|
||||||
ini.GetValue( "Options", "CelShadeModels", m_bCelShadeModels );
|
ini.GetValue( "Options", "CelShadeModels", m_bCelShadeModels );
|
||||||
ini.GetValue( "Options", "ConstantUpdateDeltaSeconds", m_fConstantUpdateDeltaSeconds );
|
ini.GetValue( "Options", "ConstantUpdateDeltaSeconds", m_fConstantUpdateDeltaSeconds );
|
||||||
ini.GetValue( "Options", "UseDedicatedMenuButtons", m_bOnlyDedicatedMenuButtons );
|
|
||||||
ini.GetValue( "Options", "BackgroundMode", (int&)m_BackgroundMode );
|
|
||||||
ini.GetValue( "Options", "NumBackgrounds", m_iNumBackgrounds);
|
|
||||||
ini.GetValue( "Options", "ShowDanger", m_bShowDanger );
|
|
||||||
ini.GetValue( "Options", "BGBrightness", m_fBGBrightness );
|
|
||||||
ini.GetValue( "Options", "MenuTimer", m_bMenuTimer );
|
|
||||||
ini.GetValue( "Options", "NumArcadeStages", m_iNumArcadeStages );
|
ini.GetValue( "Options", "NumArcadeStages", m_iNumArcadeStages );
|
||||||
ini.GetValue( "Options", "EventMode", m_bEventMode );
|
ini.GetValue( "Options", "EventMode", m_bEventMode );
|
||||||
ini.GetValue( "Options", "AutoPlay", m_bAutoPlay );
|
ini.GetValue( "Options", "AutoPlay", m_bAutoPlay );
|
||||||
ini.GetValue( "Options", "JudgeWindowScale", m_fJudgeWindowScale );
|
|
||||||
ini.GetValue( "Options", "JudgeWindowAdd", m_fJudgeWindowAdd );
|
|
||||||
ini.GetValue( "Options", "JudgeWindowSecondsMarvelous", m_fJudgeWindowSecondsMarvelous );
|
|
||||||
ini.GetValue( "Options", "JudgeWindowSecondsPerfect", m_fJudgeWindowSecondsPerfect );
|
|
||||||
ini.GetValue( "Options", "JudgeWindowSecondsGreat", m_fJudgeWindowSecondsGreat );
|
|
||||||
ini.GetValue( "Options", "JudgeWindowSecondsGood", m_fJudgeWindowSecondsGood );
|
|
||||||
ini.GetValue( "Options", "JudgeWindowSecondsBoo", m_fJudgeWindowSecondsBoo );
|
|
||||||
ini.GetValue( "Options", "JudgeWindowSecondsOK", m_fJudgeWindowSecondsOK );
|
|
||||||
ini.GetValue( "Options", "JudgeWindowSecondsMine", m_fJudgeWindowSecondsMine );
|
|
||||||
ini.GetValue( "Options", "JudgeWindowSecondsAttack", m_fJudgeWindowSecondsAttack );
|
|
||||||
ini.GetValue( "Options", "LifeDifficultyScale", m_fLifeDifficultyScale );
|
|
||||||
ini.GetValue( "Options", "LifeDeltaPercentChangeMarvelous", m_fLifeDeltaPercentChangeMarvelous );
|
|
||||||
ini.GetValue( "Options", "LifeDeltaPercentChangePerfect", m_fLifeDeltaPercentChangePerfect );
|
|
||||||
ini.GetValue( "Options", "LifeDeltaPercentChangeGreat", m_fLifeDeltaPercentChangeGreat );
|
|
||||||
ini.GetValue( "Options", "LifeDeltaPercentChangeGood", m_fLifeDeltaPercentChangeGood );
|
|
||||||
ini.GetValue( "Options", "LifeDeltaPercentChangeBoo", m_fLifeDeltaPercentChangeBoo );
|
|
||||||
ini.GetValue( "Options", "LifeDeltaPercentChangeMiss", m_fLifeDeltaPercentChangeMiss );
|
|
||||||
ini.GetValue( "Options", "LifeDeltaPercentChangeHitMine", m_fLifeDeltaPercentChangeHitMine );
|
|
||||||
ini.GetValue( "Options", "LifeDeltaPercentChangeOK", m_fLifeDeltaPercentChangeOK );
|
|
||||||
ini.GetValue( "Options", "LifeDeltaPercentChangeNG", m_fLifeDeltaPercentChangeNG );
|
|
||||||
ini.GetValue( "Options", "TugMeterPercentChangeMarvelous", m_fTugMeterPercentChangeMarvelous );
|
ini.GetValue( "Options", "TugMeterPercentChangeMarvelous", m_fTugMeterPercentChangeMarvelous );
|
||||||
ini.GetValue( "Options", "TugMeterPercentChangePerfect", m_fTugMeterPercentChangePerfect );
|
ini.GetValue( "Options", "TugMeterPercentChangePerfect", m_fTugMeterPercentChangePerfect );
|
||||||
ini.GetValue( "Options", "TugMeterPercentChangeGreat", m_fTugMeterPercentChangeGreat );
|
ini.GetValue( "Options", "TugMeterPercentChangeGreat", m_fTugMeterPercentChangeGreat );
|
||||||
@@ -459,20 +433,11 @@ void PrefsManager::ReadPrefsFromFile( CString sIni )
|
|||||||
ini.GetValue( "Options", "MercifulSuperMeter", m_bMercifulSuperMeter );
|
ini.GetValue( "Options", "MercifulSuperMeter", m_bMercifulSuperMeter );
|
||||||
|
|
||||||
ini.GetValue( "Options", "DelayedEscape", m_bDelayedBack );
|
ini.GetValue( "Options", "DelayedEscape", m_bDelayedBack );
|
||||||
ini.GetValue( "Options", "HiddenSongs", m_bHiddenSongs );
|
|
||||||
ini.GetValue( "Options", "Vsync", m_bVsync );
|
|
||||||
ini.GetValue( "Options", "ShowInstructions", m_bShowInstructions );
|
ini.GetValue( "Options", "ShowInstructions", m_bShowInstructions );
|
||||||
ini.GetValue( "Options", "ShowCaution", m_bShowCaution );
|
ini.GetValue( "Options", "ShowCaution", m_bShowCaution );
|
||||||
ini.GetValue( "Options", "ShowSelectGroup", m_bShowSelectGroup );
|
ini.GetValue( "Options", "ShowSelectGroup", m_bShowSelectGroup );
|
||||||
ini.GetValue( "Options", "ShowNativeLanguage", m_bShowNativeLanguage );
|
ini.GetValue( "Options", "ShowNativeLanguage", m_bShowNativeLanguage );
|
||||||
ini.GetValue( "Options", "ArcadeOptionsNavigation", m_bArcadeOptionsNavigation );
|
ini.GetValue( "Options", "ArcadeOptionsNavigation", m_bArcadeOptionsNavigation );
|
||||||
ini.GetValue( "Options", "DelayedTextureDelete", m_bDelayedTextureDelete );
|
|
||||||
ini.GetValue( "Options", "TexturePreload", m_bTexturePreload );
|
|
||||||
ini.GetValue( "Options", "DelayedScreenLoad", m_bDelayedScreenLoad );
|
|
||||||
ini.GetValue( "Options", "DelayedModelDelete", m_bDelayedModelDelete );
|
|
||||||
ini.GetValue( "Options", "BannerCache", (int&)m_BannerCache );
|
|
||||||
ini.GetValue( "Options", "PalettedBannerCache", m_bPalettedBannerCache );
|
|
||||||
ini.GetValue( "Options", "FastLoad", m_bFastLoad );
|
|
||||||
ini.GetValue( "Options", "MusicWheelUsesSections", (int&)m_MusicWheelUsesSections );
|
ini.GetValue( "Options", "MusicWheelUsesSections", (int&)m_MusicWheelUsesSections );
|
||||||
ini.GetValue( "Options", "MusicWheelSwitchSpeed", m_iMusicWheelSwitchSpeed );
|
ini.GetValue( "Options", "MusicWheelSwitchSpeed", m_iMusicWheelSwitchSpeed );
|
||||||
ini.GetValue( "Options", "SoundDrivers", m_sSoundDrivers );
|
ini.GetValue( "Options", "SoundDrivers", m_sSoundDrivers );
|
||||||
@@ -621,7 +586,7 @@ void PrefsManager::SaveGlobalPrefsToDisk() const
|
|||||||
ini.SetValue( "Options", "CelShadeModels", m_bCelShadeModels );
|
ini.SetValue( "Options", "CelShadeModels", m_bCelShadeModels );
|
||||||
ini.SetValue( "Options", "ConstantUpdateDeltaSeconds", m_fConstantUpdateDeltaSeconds );
|
ini.SetValue( "Options", "ConstantUpdateDeltaSeconds", m_fConstantUpdateDeltaSeconds );
|
||||||
ini.SetValue( "Options", "UseDedicatedMenuButtons", m_bOnlyDedicatedMenuButtons );
|
ini.SetValue( "Options", "UseDedicatedMenuButtons", m_bOnlyDedicatedMenuButtons );
|
||||||
ini.SetValue( "Options", "BackgroundMode", m_BackgroundMode);
|
ini.SetValue( "Options", "BackgroundMode", m_iBackgroundMode);
|
||||||
ini.SetValue( "Options", "NumBackgrounds", m_iNumBackgrounds);
|
ini.SetValue( "Options", "NumBackgrounds", m_iNumBackgrounds);
|
||||||
ini.SetValue( "Options", "ShowDanger", m_bShowDanger );
|
ini.SetValue( "Options", "ShowDanger", m_bShowDanger );
|
||||||
ini.SetValue( "Options", "BGBrightness", m_fBGBrightness );
|
ini.SetValue( "Options", "BGBrightness", m_fBGBrightness );
|
||||||
@@ -719,7 +684,7 @@ void PrefsManager::SaveGlobalPrefsToDisk() const
|
|||||||
ini.SetValue( "Options", "TexturePreload", m_bTexturePreload );
|
ini.SetValue( "Options", "TexturePreload", m_bTexturePreload );
|
||||||
ini.SetValue( "Options", "DelayedScreenLoad", m_bDelayedScreenLoad );
|
ini.SetValue( "Options", "DelayedScreenLoad", m_bDelayedScreenLoad );
|
||||||
ini.SetValue( "Options", "DelayedModelDelete", m_bDelayedModelDelete );
|
ini.SetValue( "Options", "DelayedModelDelete", m_bDelayedModelDelete );
|
||||||
ini.SetValue( "Options", "BannerCache", m_BannerCache );
|
ini.SetValue( "Options", "BannerCache", m_iBannerCache );
|
||||||
ini.SetValue( "Options", "PalettedBannerCache", m_bPalettedBannerCache );
|
ini.SetValue( "Options", "PalettedBannerCache", m_bPalettedBannerCache );
|
||||||
ini.SetValue( "Options", "FastLoad", m_bFastLoad );
|
ini.SetValue( "Options", "FastLoad", m_bFastLoad );
|
||||||
ini.SetValue( "Options", "MusicWheelUsesSections", m_MusicWheelUsesSections );
|
ini.SetValue( "Options", "MusicWheelUsesSections", m_MusicWheelUsesSections );
|
||||||
|
|||||||
@@ -27,47 +27,49 @@ public:
|
|||||||
Preference<int> m_iRefreshRate;
|
Preference<int> m_iRefreshRate;
|
||||||
Preference<bool> m_bShowStats;
|
Preference<bool> m_bShowStats;
|
||||||
Preference<bool> m_bShowBanners;
|
Preference<bool> m_bShowBanners;
|
||||||
enum BackgroundModes { BGMODE_OFF, BGMODE_ANIMATIONS, BGMODE_MOVIEVIS, BGMODE_RANDOMMOVIES } m_BackgroundMode;
|
|
||||||
int m_iNumBackgrounds;
|
|
||||||
float m_fBGBrightness;
|
|
||||||
bool m_bHiddenSongs;
|
|
||||||
bool m_bVsync;
|
|
||||||
bool m_bInterlaced;
|
|
||||||
bool m_bPAL;
|
|
||||||
bool m_bDelayedTextureDelete;
|
|
||||||
bool m_bTexturePreload;
|
|
||||||
bool m_bDelayedScreenLoad;
|
|
||||||
bool m_bDelayedModelDelete;
|
|
||||||
enum BannerCacheMode { BNCACHE_OFF, BNCACHE_LOW_RES, BNCACHE_FULL };
|
|
||||||
BannerCacheMode m_BannerCache;
|
|
||||||
bool m_bPalettedBannerCache;
|
|
||||||
bool m_bFastLoad;
|
|
||||||
|
|
||||||
bool m_bOnlyDedicatedMenuButtons;
|
enum { BGMODE_OFF, BGMODE_ANIMATIONS, BGMODE_MOVIEVIS, BGMODE_RANDOMMOVIES };
|
||||||
bool m_bMenuTimer;
|
Preference<int> m_iBackgroundMode;
|
||||||
bool m_bShowDanger;
|
Preference<int> m_iNumBackgrounds;
|
||||||
|
Preference<float> m_fBGBrightness;
|
||||||
|
Preference<bool> m_bHiddenSongs;
|
||||||
|
Preference<bool> m_bVsync;
|
||||||
|
Preference<bool> m_bInterlaced;
|
||||||
|
Preference<bool> m_bPAL;
|
||||||
|
Preference<bool> m_bDelayedTextureDelete;
|
||||||
|
Preference<bool> m_bTexturePreload;
|
||||||
|
Preference<bool> m_bDelayedScreenLoad;
|
||||||
|
Preference<bool> m_bDelayedModelDelete;
|
||||||
|
enum { BNCACHE_OFF, BNCACHE_LOW_RES, BNCACHE_FULL };
|
||||||
|
Preference<int> m_iBannerCache;
|
||||||
|
Preference<bool> m_bPalettedBannerCache;
|
||||||
|
Preference<bool> m_bFastLoad;
|
||||||
|
|
||||||
float m_fJudgeWindowScale;
|
Preference<bool> m_bOnlyDedicatedMenuButtons;
|
||||||
float m_fJudgeWindowAdd; // this is useful for compensating for changes in sampling rate between devices
|
Preference<bool> m_bMenuTimer;
|
||||||
float m_fJudgeWindowSecondsMarvelous;
|
Preference<bool> m_bShowDanger;
|
||||||
float m_fJudgeWindowSecondsPerfect;
|
|
||||||
float m_fJudgeWindowSecondsGreat;
|
|
||||||
float m_fJudgeWindowSecondsGood;
|
|
||||||
float m_fJudgeWindowSecondsBoo;
|
|
||||||
float m_fJudgeWindowSecondsOK;
|
|
||||||
float m_fJudgeWindowSecondsMine;
|
|
||||||
float m_fJudgeWindowSecondsAttack;
|
|
||||||
|
|
||||||
float m_fLifeDifficultyScale;
|
Preference<float> m_fJudgeWindowScale;
|
||||||
float m_fLifeDeltaPercentChangeMarvelous;
|
Preference<float> m_fJudgeWindowAdd; // this is useful for compensating for changes in sampling rate between devices
|
||||||
float m_fLifeDeltaPercentChangePerfect;
|
Preference<float> m_fJudgeWindowSecondsMarvelous;
|
||||||
float m_fLifeDeltaPercentChangeGreat;
|
Preference<float> m_fJudgeWindowSecondsPerfect;
|
||||||
float m_fLifeDeltaPercentChangeGood;
|
Preference<float> m_fJudgeWindowSecondsGreat;
|
||||||
float m_fLifeDeltaPercentChangeBoo;
|
Preference<float> m_fJudgeWindowSecondsGood;
|
||||||
float m_fLifeDeltaPercentChangeMiss;
|
Preference<float> m_fJudgeWindowSecondsBoo;
|
||||||
float m_fLifeDeltaPercentChangeHitMine;
|
Preference<float> m_fJudgeWindowSecondsOK;
|
||||||
float m_fLifeDeltaPercentChangeOK;
|
Preference<float> m_fJudgeWindowSecondsMine;
|
||||||
float m_fLifeDeltaPercentChangeNG;
|
Preference<float> m_fJudgeWindowSecondsAttack;
|
||||||
|
|
||||||
|
Preference<float> m_fLifeDifficultyScale;
|
||||||
|
Preference<float> m_fLifeDeltaPercentChangeMarvelous;
|
||||||
|
Preference<float> m_fLifeDeltaPercentChangePerfect;
|
||||||
|
Preference<float> m_fLifeDeltaPercentChangeGreat;
|
||||||
|
Preference<float> m_fLifeDeltaPercentChangeGood;
|
||||||
|
Preference<float> m_fLifeDeltaPercentChangeBoo;
|
||||||
|
Preference<float> m_fLifeDeltaPercentChangeMiss;
|
||||||
|
Preference<float> m_fLifeDeltaPercentChangeHitMine;
|
||||||
|
Preference<float> m_fLifeDeltaPercentChangeOK;
|
||||||
|
Preference<float> m_fLifeDeltaPercentChangeNG;
|
||||||
|
|
||||||
// tug meter used in rave
|
// tug meter used in rave
|
||||||
float m_fTugMeterPercentChangeMarvelous;
|
float m_fTugMeterPercentChangeMarvelous;
|
||||||
|
|||||||
@@ -215,7 +215,7 @@ MOVE( AutogenGroupCourses, (bool&)PREFSMAN->m_bAutogenGroupCourses );
|
|||||||
MOVE( FastLoad, (bool&)PREFSMAN->m_bFastLoad );
|
MOVE( FastLoad, (bool&)PREFSMAN->m_bFastLoad );
|
||||||
|
|
||||||
/* Background options */
|
/* Background options */
|
||||||
MOVE( BackgroundMode, , PREFSMAN->m_BackgroundMode );
|
MOVE( BackgroundMode, (int&)PREFSMAN->m_iBackgroundMode );
|
||||||
MOVE( ShowDanger, (bool&)PREFSMAN->m_bShowDanger );
|
MOVE( ShowDanger, (bool&)PREFSMAN->m_bShowDanger );
|
||||||
MOVE( DancingCharacters, PREFSMAN->m_ShowDancingCharacters );
|
MOVE( DancingCharacters, PREFSMAN->m_ShowDancingCharacters );
|
||||||
MOVE( BeginnerHelper, (bool&)PREFSMAN->m_bShowBeginnerHelper );
|
MOVE( BeginnerHelper, (bool&)PREFSMAN->m_bShowBeginnerHelper );
|
||||||
|
|||||||
@@ -110,14 +110,16 @@ ScreenWithMenuElements::~ScreenWithMenuElements()
|
|||||||
|
|
||||||
void ScreenWithMenuElements::ResetTimer()
|
void ScreenWithMenuElements::ResetTimer()
|
||||||
{
|
{
|
||||||
if( TIMER_SECONDS > 0 && PREFSMAN->m_bMenuTimer && !GAMESTATE->m_bEditing )
|
if( TIMER_SECONDS > 0.0f && PREFSMAN->m_bMenuTimer && !GAMESTATE->m_bEditing )
|
||||||
{
|
{
|
||||||
m_MenuTimer->SetSeconds( TIMER_SECONDS );
|
m_MenuTimer->SetSeconds( TIMER_SECONDS );
|
||||||
m_MenuTimer->Start();
|
m_MenuTimer->Start();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
m_MenuTimer->Disable();
|
m_MenuTimer->Disable();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void ScreenWithMenuElements::StartTransitioning( ScreenMessage smSendWhenDone )
|
void ScreenWithMenuElements::StartTransitioning( ScreenMessage smSendWhenDone )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -284,7 +284,7 @@ void SongManager::LoadGroupSymLinks(CString sDir, CString sGroupFolder)
|
|||||||
void SongManager::PreloadSongImages()
|
void SongManager::PreloadSongImages()
|
||||||
{
|
{
|
||||||
ASSERT( TEXTUREMAN );
|
ASSERT( TEXTUREMAN );
|
||||||
if( PREFSMAN->m_BannerCache != PrefsManager::BNCACHE_FULL )
|
if( PREFSMAN->m_iBannerCache != PrefsManager::BNCACHE_FULL )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
const vector<Song*> &songs = SONGMAN->GetAllSongs();
|
const vector<Song*> &songs = SONGMAN->GetAllSongs();
|
||||||
|
|||||||
@@ -377,7 +377,7 @@ static void CheckSettings()
|
|||||||
/* Preloaded banners takes about 9k per song. Although it's smaller than the
|
/* Preloaded banners takes about 9k per song. Although it's smaller than the
|
||||||
* actual song data, it still adds up with a lot of songs. Disable it for 64-meg
|
* actual song data, it still adds up with a lot of songs. Disable it for 64-meg
|
||||||
* systems. */
|
* systems. */
|
||||||
PREFSMAN->m_BannerCache = LowMemory? PrefsManager::BNCACHE_OFF:PrefsManager::BNCACHE_LOW_RES;
|
PREFSMAN->m_iBannerCache = LowMemory ? PrefsManager::BNCACHE_OFF:PrefsManager::BNCACHE_LOW_RES;
|
||||||
|
|
||||||
PREFSMAN->SaveGlobalPrefsToDisk();
|
PREFSMAN->SaveGlobalPrefsToDisk();
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user