Redid random cycle speed & colour code I updated last time to make it more efficient

This commit is contained in:
Mike Hawkins
2008-05-07 23:31:47 +00:00
parent 9f63c12ac9
commit 82e729afe5
2 changed files with 9 additions and 10 deletions
+4 -1
View File
@@ -2536,7 +2536,10 @@ SetRandomCommand=diffusetopedge,color("#fb9c57");diffusebottomedge,color("#fb575
SetExtraCommand=diffusetopedge,color("#fb5757");diffusebottomedge,color("#9c4242")
Cycle=true
NoBpmText="000"
RandomCycleSpeed=default -- Options: vslow, slow, default, fast, vfast, hyper
-- Options: vslow, slow, default, fast, vfast, hyper
RandomCycleSpeed=default
Separator="-"
ShowQMarksInRandomCycle=true
+5 -9
View File
@@ -100,7 +100,6 @@ void BPMDisplay::SetBPMRange( const DisplayBpms &bpms )
const vector<float> &BPMS = bpms.vfBpms;
bool AllIdentical = true;
bool IsRandom = false;
for( unsigned i = 0; i < BPMS.size(); ++i )
{
if( i > 0 && BPMS[i] != BPMS[i-1] )
@@ -137,10 +136,10 @@ void BPMDisplay::SetBPMRange( const DisplayBpms &bpms )
{
m_BPMS.push_back(BPMS[i]);
if( BPMS[i] != -1 )
m_BPMS.push_back(BPMS[i]); /* hold */
m_BPMS.push_back(BPMS[i]); // hold
}
m_iCurrentBPM = min(1u, m_BPMS.size()); /* start on the first hold */
m_iCurrentBPM = min(1u, m_BPMS.size()); // start on the first hold
m_fBPMFrom = BPMS[0];
m_fBPMTo = BPMS[0];
m_fPercentInState = 1;
@@ -151,12 +150,7 @@ void BPMDisplay::SetBPMRange( const DisplayBpms &bpms )
else if( !AllIdentical )
RunCommands( SET_CHANGING_COMMAND );
else
{
if( IsRandom )
RunCommands( SET_RANDOM_COMMAND );
else
RunCommands( SET_NORMAL_COMMAND );
}
RunCommands( SET_NORMAL_COMMAND );
}
void BPMDisplay::CycleRandomly()
@@ -165,6 +159,8 @@ void BPMDisplay::CycleRandomly()
bpms.Add(-1);
SetBPMRange( bpms );
RunCommands( SET_RANDOM_COMMAND );
RString sValue = RANDOM_CYCLE_SPEED;
sValue.MakeLower();