From 2d0bb7955a71c49b6f36976a8d5bead22c8ab174 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sun, 4 Feb 2007 04:07:14 +0000 Subject: [PATCH] GAME_BASE_NOTESKIN_NAME -> DEFAULT_NOTESKIN_NAME. (This isn't the base noteskin that other noteskins derive from, just the default preference.) --- stepmania/src/CommonMetrics.cpp | 1 + stepmania/src/CommonMetrics.h | 1 + stepmania/src/GameState.cpp | 2 +- stepmania/src/PlayerOptions.cpp | 4 ++-- stepmania/src/SongManager.cpp | 5 +++-- 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/stepmania/src/CommonMetrics.cpp b/stepmania/src/CommonMetrics.cpp index f7c1647126..5a300d91fd 100644 --- a/stepmania/src/CommonMetrics.cpp +++ b/stepmania/src/CommonMetrics.cpp @@ -19,6 +19,7 @@ ThemeMetric1D CommonMetrics::PLAYER_COLOR ("Common",PLAYER_C LocalizedString CommonMetrics::WINDOW_TITLE ("Common","WindowTitle"); ThemeMetric CommonMetrics::MAX_COURSE_ENTRIES_BEFORE_VARIOUS("Common","MaxCourseEntriesBeforeShowVarious"); ThemeMetric CommonMetrics::TICK_EARLY_SECONDS ("ScreenGameplay","TickEarlySeconds"); +ThemeMetric CommonMetrics::DEFAULT_NOTESKIN_NAME ("Common","DefaultNoteSkinName"); ThemeMetricDifficultiesToShow CommonMetrics::DIFFICULTIES_TO_SHOW ("Common","DifficultiesToShow"); ThemeMetricCourseDifficultiesToShow CommonMetrics::COURSE_DIFFICULTIES_TO_SHOW ("Common","CourseDifficultiesToShow"); ThemeMetricStepsTypesToShow CommonMetrics::STEPS_TYPES_TO_SHOW ("Common","StepsTypesToHide"); diff --git a/stepmania/src/CommonMetrics.h b/stepmania/src/CommonMetrics.h index 4afdf65cd3..3d435c1bc0 100644 --- a/stepmania/src/CommonMetrics.h +++ b/stepmania/src/CommonMetrics.h @@ -58,6 +58,7 @@ namespace CommonMetrics extern LocalizedString WINDOW_TITLE; extern ThemeMetric MAX_COURSE_ENTRIES_BEFORE_VARIOUS; extern ThemeMetric TICK_EARLY_SECONDS; + extern ThemeMetric DEFAULT_NOTESKIN_NAME; extern ThemeMetricDifficultiesToShow DIFFICULTIES_TO_SHOW; extern ThemeMetricCourseDifficultiesToShow COURSE_DIFFICULTIES_TO_SHOW; extern ThemeMetricStepsTypesToShow STEPS_TYPES_TO_SHOW; diff --git a/stepmania/src/GameState.cpp b/stepmania/src/GameState.cpp index 5ee37f352c..ee2f96616c 100644 --- a/stepmania/src/GameState.cpp +++ b/stepmania/src/GameState.cpp @@ -1127,7 +1127,7 @@ void GameState::GetDefaultPlayerOptions( PlayerOptions &po ) po.FromString( PREFSMAN->m_sDefaultModifiers ); po.FromString( CommonMetrics::DEFAULT_MODIFIERS ); if( po.m_sNoteSkin.empty() ) - po.m_sNoteSkin = NOTESKIN->GAME_BASE_NOTESKIN_NAME; + po.m_sNoteSkin = CommonMetrics::DEFAULT_NOTESKIN_NAME; } void GameState::GetDefaultSongOptions( SongOptions &so ) diff --git a/stepmania/src/PlayerOptions.cpp b/stepmania/src/PlayerOptions.cpp index 6fc25b0515..25fd23208c 100644 --- a/stepmania/src/PlayerOptions.cpp +++ b/stepmania/src/PlayerOptions.cpp @@ -198,7 +198,7 @@ void PlayerOptions::GetMods( vector &AddTo, bool bForceNoteSkin ) const } // Don't display a string if using the default NoteSkin unless we force it. - if( bForceNoteSkin || (!m_sNoteSkin.empty() && m_sNoteSkin != NOTESKIN->GAME_BASE_NOTESKIN_NAME.GetValue()) ) + if( bForceNoteSkin || (!m_sNoteSkin.empty() && m_sNoteSkin != CommonMetrics::DEFAULT_NOTESKIN_NAME.GetValue()) ) { RString s = m_sNoteSkin; Capitalize( s ); @@ -352,7 +352,7 @@ void PlayerOptions::FromString( const RString &sOptions, bool bWarnOnInvalid ) else if( sBit == "hallway" ) { m_bSetTiltOrSkew = true; m_fSkew = 0; m_fPerspectiveTilt = -level; m_SpeedfSkew = m_SpeedfPerspectiveTilt = speed; } else if( sBit == "distant" ) { m_bSetTiltOrSkew = true; m_fSkew = 0; m_fPerspectiveTilt = +level; m_SpeedfSkew = m_SpeedfPerspectiveTilt = speed; } else if( NOTESKIN && NOTESKIN->DoesNoteSkinExist(sBit) ) m_sNoteSkin = sBit; - else if( sBit == "noteskin" && !on ) /* "no noteskin" */ m_sNoteSkin = NOTESKIN->GAME_BASE_NOTESKIN_NAME; + else if( sBit == "noteskin" && !on ) /* "no noteskin" */ m_sNoteSkin = CommonMetrics::DEFAULT_NOTESKIN_NAME; else if( sBit == "randomspeed" ) SET_FLOAT( fRandomSpeed ) else if( sBit == "addscore" ) m_ScoreDisplay = SCORING_ADD; else if( sBit == "subtractscore" ) m_ScoreDisplay = SCORING_SUBTRACT; diff --git a/stepmania/src/SongManager.cpp b/stepmania/src/SongManager.cpp index 47ab1eb315..bab3a2df97 100644 --- a/stepmania/src/SongManager.cpp +++ b/stepmania/src/SongManager.cpp @@ -5,6 +5,7 @@ #include "BackgroundUtil.h" #include "BannerCache.h" #include "CatalogXml.h" +#include "CommonMetrics.h" #include "Course.h" #include "CourseLoaderCRS.h" #include "CourseUtil.h" @@ -1011,7 +1012,7 @@ bool SongManager::GetExtraStageInfoFromCourse( bool bExtra2, RString sPreferredG if( pPlayerOptionsOut != NULL ) { pPlayerOptionsOut->Init(); - pPlayerOptionsOut->m_sNoteSkin = NOTESKIN->GAME_BASE_NOTESKIN_NAME; + pPlayerOptionsOut->m_sNoteSkin = CommonMetrics::DEFAULT_NOTESKIN_NAME; pPlayerOptionsOut->FromString( pTrail->m_vEntries[0].Modifiers ); } if( pSongOptionsOut != NULL ) @@ -1119,7 +1120,7 @@ void SongManager::GetExtraStageInfo( bool bExtra2, const Style *sd, Song*& pSong if( pPlayerOptionsOut != NULL ) { pPlayerOptionsOut->Init(); - pPlayerOptionsOut->m_sNoteSkin = NOTESKIN->GAME_BASE_NOTESKIN_NAME; + pPlayerOptionsOut->m_sNoteSkin = CommonMetrics::DEFAULT_NOTESKIN_NAME; pPlayerOptionsOut->FromString( bExtra2 ? EXTRA_STAGE2_PLAYER_OPTIONS : EXTRA_STAGE_PLAYER_OPTIONS, true ); }