From d6546caaa65b189cae9e696fb4dc01d4c0320ab5 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Thu, 19 May 2011 03:48:46 -0500 Subject: [PATCH] [BPMDisplay] Add CourseCycleSpeed metric. --- Docs/Changelog_sm5.txt | 4 ++++ Themes/_fallback/metrics.ini | 1 + src/BPMDisplay.cpp | 4 +++- src/BPMDisplay.h | 1 + 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Docs/Changelog_sm5.txt b/Docs/Changelog_sm5.txt index 8a3a998b7e..412b687d40 100644 --- a/Docs/Changelog_sm5.txt +++ b/Docs/Changelog_sm5.txt @@ -8,6 +8,10 @@ ________________________________________________________________________________ StepMania 5.0 $NEXT | 20110xyy -------------------------------------------------------------------------------- +2011/05/19 +---------- +* [BPMDisplay] Add CourseCycleSpeed metric. [AJ] + 2011/05/17 ---------- * [NotesWriterSM] Write out OpenITG compatible SM files from here on out. diff --git a/Themes/_fallback/metrics.ini b/Themes/_fallback/metrics.ini index c4dd4b0bd6..95a34e99e4 100644 --- a/Themes/_fallback/metrics.ini +++ b/Themes/_fallback/metrics.ini @@ -252,6 +252,7 @@ Cycle=true NoBpmText="000" # How fast it cycles, smaller is faster RandomCycleSpeed=0.1 +CourseCycleSpeed=0.2 # Seperator between both bpms ( 100-200 ). Separator="-" # ??? when it cycles. diff --git a/src/BPMDisplay.cpp b/src/BPMDisplay.cpp index 49cb155978..bdeb805d52 100644 --- a/src/BPMDisplay.cpp +++ b/src/BPMDisplay.cpp @@ -32,6 +32,7 @@ void BPMDisplay::Load() SET_EXTRA_COMMAND.Load( m_sName, "SetExtraCommand" ); CYCLE.Load( m_sName, "Cycle" ); RANDOM_CYCLE_SPEED.Load( m_sName, "RandomCycleSpeed" ); + COURSE_CYCLE_SPEED.Load( m_sName, "CourseCycleSpeed" ); SEPARATOR.Load( m_sName, "Separator" ); SHOW_QMARKS.Load( m_sName, "ShowQMarksInRandomCycle" ); NO_BPM_TEXT.Load( m_sName, "NoBpmText" ); @@ -207,7 +208,8 @@ void BPMDisplay::SetBpmFromCourse( const Course* pCourse ) // GetTranslitFullTitle because "Crashinfo.txt is garbled because of the ANSI output as usual." -f ASSERT_M( pTrail, ssprintf("Course '%s' has no trail for StepsType '%s'", pCourse->GetTranslitFullTitle().c_str(), StringConversion::ToString(st).c_str() ) ); - m_fCycleTime = 0.2f; + // todo: let themers define this. -aj + m_fCycleTime = (float)COURSE_CYCLE_SPEED; if( (int)pTrail->m_vEntries.size() > CommonMetrics::MAX_COURSE_ENTRIES_BEFORE_VARIOUS ) { diff --git a/src/BPMDisplay.h b/src/BPMDisplay.h index c99869e617..b27f96408a 100644 --- a/src/BPMDisplay.h +++ b/src/BPMDisplay.h @@ -82,6 +82,7 @@ protected: ThemeMetric SHOW_QMARKS; /** @brief How often the random BPMs cycle themselves. */ ThemeMetric RANDOM_CYCLE_SPEED; + ThemeMetric COURSE_CYCLE_SPEED; /** @brief The text used to separate the low and high BPMs. */ ThemeMetric SEPARATOR; /** @brief The text used when there is no BPM. */