convert some prefs to use Preference

This commit is contained in:
Chris Danford
2004-12-04 08:21:54 +00:00
parent 27c69a2a04
commit d46bfd460d
5 changed files with 97 additions and 104 deletions
+47 -47
View File
@@ -199,60 +199,60 @@ static void DefaultNoteSkin( int &sel, bool ToSel, const CStringArray &choices )
}
/* Appearance options */
MOVE( Instructions, PREFSMAN->m_bShowInstructions );
MOVE( Caution, PREFSMAN->m_bShowCaution );
MOVE( OniScoreDisplay, PREFSMAN->m_bDancePointsForOni );
MOVE( SongGroup, PREFSMAN->m_bShowSelectGroup );
MOVE( Instructions, (bool&)PREFSMAN->m_bShowInstructions );
MOVE( Caution, (bool&)PREFSMAN->m_bShowCaution );
MOVE( OniScoreDisplay, (bool&)PREFSMAN->m_bDancePointsForOni );
MOVE( SongGroup, (bool&)PREFSMAN->m_bShowSelectGroup );
MOVE( WheelSections, PREFSMAN->m_MusicWheelUsesSections );
MOVE( CourseSort, PREFSMAN->m_iCourseSortOrder );
MOVE( RandomAtEnd, PREFSMAN->m_bMoveRandomToEnd );
MOVE( Translations, PREFSMAN->m_bShowNativeLanguage );
MOVE( Lyrics, PREFSMAN->m_bShowLyrics );
MOVE( RandomAtEnd, (bool&)PREFSMAN->m_bMoveRandomToEnd );
MOVE( Translations, (bool&)PREFSMAN->m_bShowNativeLanguage );
MOVE( Lyrics, (bool&)PREFSMAN->m_bShowLyrics );
/* Misc. options */
MOVE( AutogenSteps, PREFSMAN->m_bAutogenSteps );
MOVE( AutogenGroupCourses, PREFSMAN->m_bAutogenGroupCourses );
MOVE( FastLoad, PREFSMAN->m_bFastLoad );
MOVE( AutogenSteps, (bool&)PREFSMAN->m_bAutogenSteps );
MOVE( AutogenGroupCourses, (bool&)PREFSMAN->m_bAutogenGroupCourses );
MOVE( FastLoad, (bool&)PREFSMAN->m_bFastLoad );
/* Background options */
MOVE( BackgroundMode, PREFSMAN->m_BackgroundMode );
MOVE( ShowDanger, PREFSMAN->m_bShowDanger );
MOVE( BackgroundMode, , PREFSMAN->m_BackgroundMode );
MOVE( ShowDanger, (bool&)PREFSMAN->m_bShowDanger );
MOVE( DancingCharacters, PREFSMAN->m_ShowDancingCharacters );
MOVE( BeginnerHelper, PREFSMAN->m_bShowBeginnerHelper );
MOVE( BeginnerHelper, (bool&)PREFSMAN->m_bShowBeginnerHelper );
static void BGBrightness( int &sel, bool ToSel, const CStringArray &choices )
{
const float mapping[] = { 0.0f,0.1f,0.2f,0.3f,0.4f,0.5f,0.6f,0.7f,0.8f,0.9f,1.0f };
MoveMap( sel, PREFSMAN->m_fBGBrightness, ToSel, mapping, ARRAYSIZE(mapping) );
MoveMap( sel, (float&)PREFSMAN->m_fBGBrightness, ToSel, mapping, ARRAYSIZE(mapping) );
}
static void NumBackgrounds( int &sel, bool ToSel, const CStringArray &choices )
{
const int mapping[] = { 5,10,15,20 };
MoveMap( sel, PREFSMAN->m_iNumBackgrounds, ToSel, mapping, ARRAYSIZE(mapping) );
MoveMap( sel, (int&)PREFSMAN->m_iNumBackgrounds, ToSel, mapping, ARRAYSIZE(mapping) );
}
/* Input options */
MOVE( AutoMapOnJoyChange, PREFSMAN->m_bAutoMapOnJoyChange );
MOVE( MenuButtons, PREFSMAN->m_bOnlyDedicatedMenuButtons );
MOVE( AutoPlay, PREFSMAN->m_bAutoPlay );
MOVE( BackDelayed, PREFSMAN->m_bDelayedBack );
MOVE( OptionsNavigation, PREFSMAN->m_bArcadeOptionsNavigation );
MOVE( AutoMapOnJoyChange, (bool&)PREFSMAN->m_bAutoMapOnJoyChange );
MOVE( MenuButtons, (bool&)PREFSMAN->m_bOnlyDedicatedMenuButtons );
MOVE( AutoPlay, (bool&)PREFSMAN->m_bAutoPlay );
MOVE( BackDelayed, (bool&)PREFSMAN->m_bDelayedBack );
MOVE( OptionsNavigation, (bool&)PREFSMAN->m_bArcadeOptionsNavigation );
static void WheelSpeed( int &sel, bool ToSel, const CStringArray &choices )
{
const int mapping[] = { 5, 10, 15, 25 };
MoveMap( sel, PREFSMAN->m_iMusicWheelSwitchSpeed, ToSel, mapping, ARRAYSIZE(mapping) );
MoveMap( sel, (int&)PREFSMAN->m_iMusicWheelSwitchSpeed, ToSel, mapping, ARRAYSIZE(mapping) );
}
/* Gameplay options */
MOVE( SoloSingles, PREFSMAN->m_bSoloSingle );
MOVE( HiddenSongs, PREFSMAN->m_bHiddenSongs );
MOVE( EasterEggs, PREFSMAN->m_bEasterEggs );
MOVE( SoloSingles, (bool&)PREFSMAN->m_bSoloSingle );
MOVE( HiddenSongs, (bool&)PREFSMAN->m_bHiddenSongs );
MOVE( EasterEggs, (bool&)PREFSMAN->m_bEasterEggs );
MOVE( MarvelousTiming, PREFSMAN->m_iMarvelousTiming );
MOVE( AllowExtraStage, PREFSMAN->m_bAllowExtraStage );
MOVE( PickExtraStage, PREFSMAN->m_bPickExtraStage );
MOVE( UnlockSystem, PREFSMAN->m_bUseUnlockSystem );
MOVE( AllowExtraStage, (bool&)PREFSMAN->m_bAllowExtraStage );
MOVE( PickExtraStage, (bool&)PREFSMAN->m_bPickExtraStage );
MOVE( UnlockSystem, (bool&)PREFSMAN->m_bUseUnlockSystem );
/* Coin options */
MOVE( CoinMode, PREFSMAN->m_iCoinMode );
@@ -260,13 +260,13 @@ MOVE( CoinMode, PREFSMAN->m_iCoinMode );
static void CoinModeNoHome( int &sel, bool ToSel, const CStringArray &choices )
{
const int mapping[] = { 1,2 };
MoveMap( sel, PREFSMAN->m_iCoinMode, ToSel, mapping, ARRAYSIZE(mapping) );
MoveMap( sel, (int&)PREFSMAN->m_iCoinMode, ToSel, mapping, ARRAYSIZE(mapping) );
}
static void CoinsPerCredit( int &sel, bool ToSel, const CStringArray &choices )
{
const int mapping[] = { 1,2,3,4,5,6,7,8 };
MoveMap( sel, PREFSMAN->m_iCoinsPerCredit, ToSel, mapping, ARRAYSIZE(mapping) );
MoveMap( sel, (int&)PREFSMAN->m_iCoinsPerCredit, ToSel, mapping, ARRAYSIZE(mapping) );
}
static void Premium( int &sel, bool ToSel, const CStringArray &choices )
@@ -278,24 +278,24 @@ static void Premium( int &sel, bool ToSel, const CStringArray &choices )
static void SongsPerPlay( int &sel, bool ToSel, const CStringArray &choices )
{
const int mapping[] = { 1,2,3,4,5,6,7 };
MoveMap( sel, PREFSMAN->m_iNumArcadeStages, ToSel, mapping, ARRAYSIZE(mapping) );
MoveMap( sel, (int&)PREFSMAN->m_iNumArcadeStages, ToSel, mapping, ARRAYSIZE(mapping) );
}
MOVE( EventMode, PREFSMAN->m_bEventMode );
MOVE( EventMode, (bool&)PREFSMAN->m_bEventMode );
/* Machine options */
MOVE( MenuTimer, PREFSMAN->m_bMenuTimer );
MOVE( MenuTimer, (bool&)PREFSMAN->m_bMenuTimer );
MOVE( ScoringType, PREFSMAN->m_iScoringType );
static void JudgeDifficulty( int &sel, bool ToSel, const CStringArray &choices )
{
const float mapping[] = { 1.50f,1.33f,1.16f,1.00f,0.84f,0.66f,0.50f,0.33f,0.20f };
MoveMap( sel, PREFSMAN->m_fJudgeWindowScale, ToSel, mapping, ARRAYSIZE(mapping) );
MoveMap( sel, (float&)PREFSMAN->m_fJudgeWindowScale, ToSel, mapping, ARRAYSIZE(mapping) );
}
void LifeDifficulty( int &sel, bool ToSel, const CStringArray &choices )
{
const float mapping[] = { 1.60f,1.40f,1.20f,1.00f,0.80f,0.60f,0.40f };
MoveMap( sel, PREFSMAN->m_fLifeDifficultyScale, ToSel, mapping, ARRAYSIZE(mapping) );
MoveMap( sel, (float&)PREFSMAN->m_fLifeDifficultyScale, ToSel, mapping, ARRAYSIZE(mapping) );
}
static void ShowSongOptions( int &sel, bool ToSel, const CStringArray &choices )
@@ -341,13 +341,13 @@ MOVE( ProgressiveStageLifebar, PREFSMAN->m_iProgressiveStageLifebar );
MOVE( ProgressiveNonstopLifebar, PREFSMAN->m_iProgressiveNonstopLifebar );
/* Graphic options */
MOVE( DisplayMode, PREFSMAN->m_bWindowed );
MOVE( WaitForVsync, PREFSMAN->m_bVsync );
MOVE( ShowStats, PREFSMAN->m_bShowStats );
MOVE( ShowBanners, PREFSMAN->m_bShowBanners );
MOVE( KeepTexturesInMemory, PREFSMAN->m_bDelayedTextureDelete );
MOVE( CelShadeModels, PREFSMAN->m_bCelShadeModels );
MOVE( SmoothLines, PREFSMAN->m_bSmoothLines );
MOVE( DisplayMode, (bool&)PREFSMAN->m_bWindowed );
MOVE( WaitForVsync, (bool&)PREFSMAN->m_bVsync );
MOVE( ShowStats, (bool&)PREFSMAN->m_bShowStats );
MOVE( ShowBanners, (bool&)PREFSMAN->m_bShowBanners );
MOVE( KeepTexturesInMemory, (bool&)PREFSMAN->m_bDelayedTextureDelete );
MOVE( CelShadeModels, (bool&)PREFSMAN->m_bCelShadeModels );
MOVE( SmoothLines, (bool&)PREFSMAN->m_bSmoothLines );
struct res_t
{
@@ -392,31 +392,31 @@ static void DisplayResolution( int &sel, bool ToSel, const CStringArray &choices
static void DisplayColor( int &sel, bool ToSel, const CStringArray &choices )
{
const int mapping[] = { 16,32 };
MoveMap( sel, PREFSMAN->m_iDisplayColorDepth, ToSel, mapping, ARRAYSIZE(mapping) );
MoveMap( sel, (int&)PREFSMAN->m_iDisplayColorDepth, ToSel, mapping, ARRAYSIZE(mapping) );
}
static void TextureResolution( int &sel, bool ToSel, const CStringArray &choices )
{
const int mapping[] = { 256,512,1024,2048 };
MoveMap( sel, PREFSMAN->m_iMaxTextureResolution, ToSel, mapping, ARRAYSIZE(mapping) );
MoveMap( sel, (int&)PREFSMAN->m_iMaxTextureResolution, ToSel, mapping, ARRAYSIZE(mapping) );
}
static void TextureColor( int &sel, bool ToSel, const CStringArray &choices )
{
const int mapping[] = { 16,32 };
MoveMap( sel, PREFSMAN->m_iTextureColorDepth, ToSel, mapping, ARRAYSIZE(mapping) );
MoveMap( sel, (int&)PREFSMAN->m_iTextureColorDepth, ToSel, mapping, ARRAYSIZE(mapping) );
}
static void MovieColor( int &sel, bool ToSel, const CStringArray &choices )
{
const int mapping[] = { 16,32 };
MoveMap( sel, PREFSMAN->m_iMovieColorDepth, ToSel, mapping, ARRAYSIZE(mapping) );
MoveMap( sel, (int&)PREFSMAN->m_iMovieColorDepth, ToSel, mapping, ARRAYSIZE(mapping) );
}
static void RefreshRate( int &sel, bool ToSel, const CStringArray &choices )
{
const int mapping[] = { (int) REFRESH_DEFAULT,60,70,72,75,80,85,90,100,120,150 };
MoveMap( sel, PREFSMAN->m_iRefreshRate, ToSel, mapping, ARRAYSIZE(mapping) );
MoveMap( sel, (int&)PREFSMAN->m_iRefreshRate, ToSel, mapping, ARRAYSIZE(mapping) );
}
/* Sound options */
@@ -426,7 +426,7 @@ MOVE( AttractSoundFrequency,PREFSMAN->m_iAttractSoundFrequency );
static void SoundVolume( int &sel, bool ToSel, const CStringArray &choices )
{
const float mapping[] = { 0.0f,0.1f,0.2f,0.3f,0.4f,0.5f,0.6f,0.7f,0.8f,0.9f,1.0f };
MoveMap( sel, PREFSMAN->m_fSoundVolume, ToSel, mapping, ARRAYSIZE(mapping) );
MoveMap( sel, (float&)PREFSMAN->m_fSoundVolume, ToSel, mapping, ARRAYSIZE(mapping) );
}