diff --git a/src/AdjustSync.cpp b/src/AdjustSync.cpp index e669f9cb74..b375928a25 100644 --- a/src/AdjustSync.cpp +++ b/src/AdjustSync.cpp @@ -58,7 +58,7 @@ void AdjustSync::ResetOriginalSyncData() s_pTimingDataOriginal = new TimingData; if( GAMESTATE->m_pCurSong ) - *s_pTimingDataOriginal = GAMESTATE->m_pCurSong->m_Timing; + *s_pTimingDataOriginal = GAMESTATE->m_pCurSong->m_SongTiming; else *s_pTimingDataOriginal = TimingData(); s_fGlobalOffsetSecondsOriginal = PREFSMAN->m_fGlobalOffsetSeconds; @@ -87,7 +87,7 @@ void AdjustSync::SaveSyncChanges() { if( GAMESTATE->IsCourseMode() ) return; - if( GAMESTATE->m_pCurSong && *s_pTimingDataOriginal != GAMESTATE->m_pCurSong->m_Timing ) + if( GAMESTATE->m_pCurSong && *s_pTimingDataOriginal != GAMESTATE->m_pCurSong->m_SongTiming ) { if( GAMESTATE->IsEditing() ) { @@ -110,7 +110,7 @@ void AdjustSync::RevertSyncChanges() if( GAMESTATE->IsCourseMode() ) return; PREFSMAN->m_fGlobalOffsetSeconds.Set( s_fGlobalOffsetSecondsOriginal ); - GAMESTATE->m_pCurSong->m_Timing = *s_pTimingDataOriginal; + GAMESTATE->m_pCurSong->m_SongTiming = *s_pTimingDataOriginal; ResetOriginalSyncData(); s_fStandardDeviation = 0.0f; s_fAverageError = 0.0f; @@ -186,7 +186,7 @@ void AdjustSync::AutosyncOffset() switch( GAMESTATE->m_SongOptions.GetCurrent().m_AutosyncType ) { case SongOptions::AUTOSYNC_SONG: - GAMESTATE->m_pCurSong->m_Timing.m_fBeat0OffsetInSeconds += mean; + GAMESTATE->m_pCurSong->m_SongTiming.m_fBeat0OffsetInSeconds += mean; break; case SongOptions::AUTOSYNC_MACHINE: PREFSMAN->m_fGlobalOffsetSeconds.Set( PREFSMAN->m_fGlobalOffsetSeconds + mean ); @@ -232,15 +232,15 @@ void AdjustSync::AutosyncTempo() if( !CalcLeastSquares( s_vAutosyncTempoData, fSlope, fIntercept, fFilteredError ) ) return; - GAMESTATE->m_pCurSong->m_Timing.m_fBeat0OffsetInSeconds += fIntercept; + GAMESTATE->m_pCurSong->m_SongTiming.m_fBeat0OffsetInSeconds += fIntercept; const float fScaleBPM = 1.0f/(1.0f - fSlope); - FOREACH( BPMSegment, GAMESTATE->m_pCurSong->m_Timing.m_BPMSegments, i ) + FOREACH( BPMSegment, GAMESTATE->m_pCurSong->m_SongTiming.m_BPMSegments, i ) i->SetBPM( i->GetBPM() * fScaleBPM ); // We assume that the stops were measured as a number of beats. // Therefore, if we change the bpms, we need to make a similar // change to the stops. - FOREACH( StopSegment, GAMESTATE->m_pCurSong->m_Timing.m_StopSegments, i ) + FOREACH( StopSegment, GAMESTATE->m_pCurSong->m_SongTiming.m_StopSegments, i ) i->m_fStopSeconds *= 1.0f - fSlope; SCREENMAN->SystemMessage( AUTOSYNC_CORRECTION_APPLIED.GetValue() ); @@ -296,7 +296,7 @@ void AdjustSync::GetSyncChangeTextSong( vector &vsAddTo ) { float fOld = Quantize( AdjustSync::s_pTimingDataOriginal->m_fBeat0OffsetInSeconds, 0.001f ); - float fNew = Quantize( GAMESTATE->m_pCurSong->m_Timing.m_fBeat0OffsetInSeconds, 0.001f ); + float fNew = Quantize( GAMESTATE->m_pCurSong->m_SongTiming.m_fBeat0OffsetInSeconds, 0.001f ); float fDelta = fNew - fOld; if( fabsf(fDelta) > 0.0001f ) @@ -309,10 +309,10 @@ void AdjustSync::GetSyncChangeTextSong( vector &vsAddTo ) } } - for( unsigned i=0; im_pCurSong->m_Timing.m_BPMSegments.size(); i++ ) + for( unsigned i=0; im_pCurSong->m_SongTiming.m_BPMSegments.size(); i++ ) { float fOld = Quantize( AdjustSync::s_pTimingDataOriginal->m_BPMSegments[i].GetBPM(), 0.001f ); - float fNew = Quantize( GAMESTATE->m_pCurSong->m_Timing.m_BPMSegments[i].GetBPM(), 0.001f ); + float fNew = Quantize( GAMESTATE->m_pCurSong->m_SongTiming.m_BPMSegments[i].GetBPM(), 0.001f ); float fDelta = fNew - fOld; if( fabsf(fDelta) > 0.0001f ) @@ -330,10 +330,10 @@ void AdjustSync::GetSyncChangeTextSong( vector &vsAddTo ) } } - for( unsigned i=0; im_pCurSong->m_Timing.m_StopSegments.size(); i++ ) + for( unsigned i=0; im_pCurSong->m_SongTiming.m_StopSegments.size(); i++ ) { float fOld = Quantize( AdjustSync::s_pTimingDataOriginal->m_StopSegments[i].m_fStopSeconds, 0.001f ); - float fNew = Quantize( GAMESTATE->m_pCurSong->m_Timing.m_StopSegments[i].m_fStopSeconds, 0.001f ); + float fNew = Quantize( GAMESTATE->m_pCurSong->m_SongTiming.m_StopSegments[i].m_fStopSeconds, 0.001f ); float fDelta = fNew - fOld; if( fabsf(fDelta) > 0.0001f ) diff --git a/src/Background.cpp b/src/Background.cpp index 34050aedcc..5047e5fc1e 100644 --- a/src/Background.cpp +++ b/src/Background.cpp @@ -419,7 +419,7 @@ void BackgroundImpl::LoadFromRandom( float fFirstBeat, float fEndBeat, const Bac int iStartRow = BeatToNoteRow(fFirstBeat); int iEndRow = BeatToNoteRow(fEndBeat); - const TimingData &timing = m_pSong->m_Timing; + const TimingData &timing = m_pSong->m_SongTiming; // change BG every time signature change or 4 measures FOREACH_CONST( TimeSignatureSegment, timing.m_vTimeSignatureSegments, iter ) @@ -697,7 +697,7 @@ void BackgroundImpl::Layer::UpdateCurBGChange( const Song *pSong, float fLastMus float fBeat, fBPS, fThrowAway; bool bFreeze; int iThrowAway; - pSong->m_Timing.GetBeatAndBPSFromElapsedTime( fCurrentTime, fBeat, fBPS, bFreeze, bFreeze, iThrowAway, fThrowAway ); + pSong->m_SongTiming.GetBeatAndBPSFromElapsedTime( fCurrentTime, fBeat, fBPS, bFreeze, bFreeze, iThrowAway, fThrowAway ); // Calls to Update() should *not* be scaled by music rate; fCurrentTime is. Undo it. const float fRate = GAMESTATE->m_SongOptions.GetCurrent().m_fMusicRate; @@ -762,7 +762,7 @@ void BackgroundImpl::Layer::UpdateCurBGChange( const Song *pSong, float fLastMus m_pCurrentBGA->PlayCommand( "GainFocus" ); /* How much time of this BGA have we skipped? (This happens with SetSeconds.) */ - const float fStartSecond = pSong->m_Timing.GetElapsedTimeFromBeat( change.m_fStartBeat ); + const float fStartSecond = pSong->m_SongTiming.GetElapsedTimeFromBeat( change.m_fStartBeat ); /* This is affected by the music rate. */ fDeltaTime = fCurrentTime - fStartSecond; diff --git a/src/GameplayAssist.cpp b/src/GameplayAssist.cpp index 7531c77e43..97a324416d 100644 --- a/src/GameplayAssist.cpp +++ b/src/GameplayAssist.cpp @@ -27,7 +27,7 @@ void GameplayAssist::PlayTicks( const NoteData &nd ) * come out on time; the actual precise timing is handled by SetStartTime. */ float fPositionSeconds = GAMESTATE->m_fMusicSeconds; fPositionSeconds += SOUNDMAN->GetPlayLatency() + (float)CommonMetrics::TICK_EARLY_SECONDS + 0.250f; - const TimingData &timing = GAMESTATE->m_pCurSong->m_Timing; + const TimingData &timing = GAMESTATE->m_pCurSong->m_SongTiming; const float fSongBeat = timing.GetBeatFromElapsedTimeNoOffset( fPositionSeconds ); const int iSongRow = max( 0, BeatToNoteRowNotRounded( fSongBeat ) ); diff --git a/src/MeterDisplay.cpp b/src/MeterDisplay.cpp index 3018125cd1..66c0b19587 100644 --- a/src/MeterDisplay.cpp +++ b/src/MeterDisplay.cpp @@ -73,8 +73,8 @@ void SongMeterDisplay::Update( float fDeltaTime ) { if( GAMESTATE->m_pCurSong ) { - float fSongStartSeconds = GAMESTATE->m_pCurSong->m_Timing.GetElapsedTimeFromBeat( GAMESTATE->m_pCurSong->m_fFirstBeat ); - float fSongEndSeconds = GAMESTATE->m_pCurSong->m_Timing.GetElapsedTimeFromBeat( GAMESTATE->m_pCurSong->m_fLastBeat ); + float fSongStartSeconds = GAMESTATE->m_pCurSong->m_SongTiming.GetElapsedTimeFromBeat( GAMESTATE->m_pCurSong->m_fFirstBeat ); + float fSongEndSeconds = GAMESTATE->m_pCurSong->m_SongTiming.GetElapsedTimeFromBeat( GAMESTATE->m_pCurSong->m_fLastBeat ); float fPercentPositionSong = SCALE( GAMESTATE->m_fMusicSeconds, fSongStartSeconds, fSongEndSeconds, 0.0f, 1.0f ); CLAMP( fPercentPositionSong, 0, 1 ); diff --git a/src/NoteField.cpp b/src/NoteField.cpp index 6895b07234..213d5e1e09 100644 --- a/src/NoteField.cpp +++ b/src/NoteField.cpp @@ -742,7 +742,7 @@ void NoteField::DrawPrimitives() // Draw beat bars if( GAMESTATE->IsEditing() || SHOW_BEAT_BARS ) { - const vector &vTimeSignatureSegments = GAMESTATE->m_pCurSong->m_Timing.m_vTimeSignatureSegments; + const vector &vTimeSignatureSegments = GAMESTATE->m_pCurSong->m_SongTiming.m_vTimeSignatureSegments; int iMeasureIndex = 0; FOREACH_CONST( TimeSignatureSegment, vTimeSignatureSegments, iter ) { @@ -786,7 +786,7 @@ void NoteField::DrawPrimitives() ASSERT(GAMESTATE->m_pCurSong); // BPM text - FOREACH_CONST( BPMSegment, GAMESTATE->m_pCurSong->m_Timing.m_BPMSegments, seg ) + FOREACH_CONST( BPMSegment, GAMESTATE->m_pCurSong->m_SongTiming.m_BPMSegments, seg ) { if( seg->m_iStartRow >= iFirstRowToDraw && seg->m_iStartRow <= iLastRowToDraw ) { @@ -797,7 +797,7 @@ void NoteField::DrawPrimitives() } // Freeze text - FOREACH_CONST( StopSegment, GAMESTATE->m_pCurSong->m_Timing.m_StopSegments, seg ) + FOREACH_CONST( StopSegment, GAMESTATE->m_pCurSong->m_SongTiming.m_StopSegments, seg ) { if( seg->m_iStartRow >= iFirstRowToDraw && seg->m_iStartRow <= iLastRowToDraw ) { @@ -808,7 +808,7 @@ void NoteField::DrawPrimitives() } // Warp text - FOREACH_CONST( WarpSegment, GAMESTATE->m_pCurSong->m_Timing.m_WarpSegments, seg ) + FOREACH_CONST( WarpSegment, GAMESTATE->m_pCurSong->m_SongTiming.m_WarpSegments, seg ) { if( seg->m_iStartRow >= iFirstRowToDraw && seg->m_iStartRow <= iLastRowToDraw ) { @@ -819,7 +819,7 @@ void NoteField::DrawPrimitives() } // Time Signature text - FOREACH_CONST( TimeSignatureSegment, GAMESTATE->m_pCurSong->m_Timing.m_vTimeSignatureSegments, seg ) + FOREACH_CONST( TimeSignatureSegment, GAMESTATE->m_pCurSong->m_SongTiming.m_vTimeSignatureSegments, seg ) { if( seg->m_iStartRow >= iFirstRowToDraw && seg->m_iStartRow <= iLastRowToDraw ) { @@ -830,7 +830,7 @@ void NoteField::DrawPrimitives() } // Tickcount text - FOREACH_CONST( TickcountSegment, GAMESTATE->m_pCurSong->m_Timing.m_TickcountSegments, seg ) + FOREACH_CONST( TickcountSegment, GAMESTATE->m_pCurSong->m_SongTiming.m_TickcountSegments, seg ) { if( seg->m_iStartRow >= iFirstRowToDraw && seg->m_iStartRow <= iLastRowToDraw ) { @@ -841,7 +841,7 @@ void NoteField::DrawPrimitives() } // Combo text - FOREACH_CONST( ComboSegment, GAMESTATE->m_pCurSong->m_Timing.m_ComboSegments, seg ) + FOREACH_CONST( ComboSegment, GAMESTATE->m_pCurSong->m_SongTiming.m_ComboSegments, seg ) { if( seg->m_iStartRow >= iFirstRowToDraw && seg->m_iStartRow <= iLastRowToDraw ) { @@ -852,7 +852,7 @@ void NoteField::DrawPrimitives() } // Label text - FOREACH_CONST( LabelSegment, GAMESTATE->m_pCurSong->m_Timing.m_LabelSegments, seg ) + FOREACH_CONST( LabelSegment, GAMESTATE->m_pCurSong->m_SongTiming.m_LabelSegments, seg ) { if( seg->m_iStartRow >= iFirstRowToDraw && seg->m_iStartRow <= iLastRowToDraw ) { @@ -872,7 +872,7 @@ void NoteField::DrawPrimitives() FOREACH_CONST( Attack, ce.attacks, a ) { float fSecond = a->fStartSecond; - float fBeat = GAMESTATE->m_pCurSong->m_Timing.GetBeatFromElapsedTime( fSecond ); + float fBeat = GAMESTATE->m_pCurSong->m_SongTiming.GetBeatFromElapsedTime( fSecond ); if( BeatToNoteRow(fBeat) >= iFirstRowToDraw && BeatToNoteRow(fBeat) <= iLastRowToDraw) diff --git a/src/Player.cpp b/src/Player.cpp index 570112bb0e..caa30e5c92 100644 --- a/src/Player.cpp +++ b/src/Player.cpp @@ -1528,7 +1528,7 @@ int Player::GetClosestNoteDirectional( int col, int iStartRow, int iEndRow, bool // Is this the row we want? do { const TapNote &tn = begin->second; - if( GAMESTATE->m_pCurSong->m_Timing.IsWarpAtRow( begin->first ) ) + if( GAMESTATE->m_pCurSong->m_SongTiming.IsWarpAtRow( begin->first ) ) break; if( tn.type == TapNote::empty ) break; @@ -1579,7 +1579,7 @@ int Player::GetClosestNonEmptyRowDirectional( int iStartRow, int iEndRow, bool b ++iter; continue; } - if( GAMESTATE->m_pCurSong->m_Timing.IsWarpAtRow( iter.Row() ) ) + if( GAMESTATE->m_pCurSong->m_SongTiming.IsWarpAtRow( iter.Row() ) ) { ++iter; continue; @@ -2011,8 +2011,8 @@ void Player::StepStrumHopo( int col, int row, const RageTimer &tm, bool bHeld, b * "jack hammers." Hmm. */ const int iStepSearchRows = max( - BeatToNoteRow( GAMESTATE->m_pCurSong->m_Timing.GetBeatFromElapsedTime( GAMESTATE->m_fMusicSeconds + StepSearchDistance ) ) - iSongRow, - iSongRow - BeatToNoteRow( GAMESTATE->m_pCurSong->m_Timing.GetBeatFromElapsedTime( GAMESTATE->m_fMusicSeconds - StepSearchDistance ) ) + BeatToNoteRow( GAMESTATE->m_pCurSong->m_SongTiming.GetBeatFromElapsedTime( GAMESTATE->m_fMusicSeconds + StepSearchDistance ) ) - iSongRow, + iSongRow - BeatToNoteRow( GAMESTATE->m_pCurSong->m_SongTiming.GetBeatFromElapsedTime( GAMESTATE->m_fMusicSeconds - StepSearchDistance ) ) ) + ROWS_PER_BEAT; int iRowOfOverlappingNoteOrRow = row; if( row == -1 ) @@ -2089,7 +2089,7 @@ void Player::StepStrumHopo( int col, int row, const RageTimer &tm, bool bHeld, b // Stepped too close to mine? if( !bRelease && ( REQUIRE_STEP_ON_MINES == !bHeld ) && fSecondsFromExact <= GetWindowSeconds(TW_Mine) && - !GAMESTATE->m_pCurSong->m_Timing.IsWarpAtRow(iSongRow) ) + !GAMESTATE->m_pCurSong->m_SongTiming.IsWarpAtRow(iSongRow) ) score = TNS_HitMine; break; @@ -2564,7 +2564,7 @@ void Player::UpdateTapNotesMissedOlderThan( float fMissIfOlderThanSeconds ) float fThrowAway; int iWarpBeginRow; float fWarpLength; - GAMESTATE->m_pCurSong->m_Timing.GetBeatAndBPSFromElapsedTime( fEarliestTime, fMissIfOlderThanThisBeat, fThrowAway, bFreeze, bDelay, iWarpBeginRow, fWarpLength ); + GAMESTATE->m_pCurSong->m_SongTiming.GetBeatAndBPSFromElapsedTime( fEarliestTime, fMissIfOlderThanThisBeat, fThrowAway, bFreeze, bDelay, iWarpBeginRow, fWarpLength ); iMissIfOlderThanThisRow = BeatToNoteRow( fMissIfOlderThanThisBeat ); if( bFreeze || bDelay ) @@ -2587,7 +2587,7 @@ void Player::UpdateTapNotesMissedOlderThan( float fMissIfOlderThanSeconds ) continue; // Ignore all notes that are skipped via WARPS. - if( GAMESTATE->m_pCurSong->m_Timing.IsWarpAtRow( iter.Row() ) ) + if( GAMESTATE->m_pCurSong->m_SongTiming.IsWarpAtRow( iter.Row() ) ) continue; if( tn.type == TapNote::mine ) @@ -2622,7 +2622,7 @@ void Player::UpdateJudgedRows() int iRow = iter.Row(); // If row is within a warp section, ignore it. -aj - if( GAMESTATE->m_pCurSong->m_Timing.IsWarpAtRow(iRow) ) + if( GAMESTATE->m_pCurSong->m_SongTiming.IsWarpAtRow(iRow) ) continue; if( iLastSeenRow != iRow ) @@ -2843,13 +2843,13 @@ void Player::CrossedRows( int iLastRowCrossed, const RageTimer &now ) int iCheckpointFrequencyRows = ROWS_PER_BEAT/2; if( CHECKPOINTS_USE_TICKCOUNTS ) { - int tickCurrent = GAMESTATE->m_pCurSong->m_Timing.GetTickcountAtRow( iLastRowCrossed ); + int tickCurrent = GAMESTATE->m_pCurSong->m_SongTiming.GetTickcountAtRow( iLastRowCrossed ); // There are some charts that don't want tickcounts involved at all. iCheckpointFrequencyRows = (tickCurrent > 0 ? ROWS_PER_BEAT / tickCurrent : 0); } else if( CHECKPOINTS_USE_TIME_SIGNATURES ) { - TimeSignatureSegment tSignature = GAMESTATE->m_pCurSong->m_Timing.GetTimeSignatureSegmentAtBeat( NoteRowToBeat( iLastRowCrossed ) ); + TimeSignatureSegment tSignature = GAMESTATE->m_pCurSong->m_SongTiming.GetTimeSignatureSegmentAtBeat( NoteRowToBeat( iLastRowCrossed ) ); // Most songs are in 4/4 time. The frequency for checking tick counts should reflect that. iCheckpointFrequencyRows = ROWS_PER_BEAT * tSignature.m_iDenominator / (tSignature.m_iNumerator * 4); @@ -2957,7 +2957,7 @@ void Player::HandleTapRowScore( unsigned row ) #endif // Warp hackery. -aj - if( GAMESTATE->m_pCurSong->m_Timing.IsWarpAtRow( row ) ) + if( GAMESTATE->m_pCurSong->m_SongTiming.IsWarpAtRow( row ) ) return; if( GAMESTATE->m_bDemonstrationOrJukebox ) @@ -3061,7 +3061,7 @@ void Player::HandleHoldCheckpoint( int iRow, int iNumHoldsHeldThisRow, int iNumH #endif // More warp hackery. -aj - if( GAMESTATE->m_pCurSong->m_Timing.IsWarpAtRow( iRow ) ) + if( GAMESTATE->m_pCurSong->m_SongTiming.IsWarpAtRow( iRow ) ) return; // don't accumulate combo if AutoPlay is on. diff --git a/src/ScoreKeeperNormal.cpp b/src/ScoreKeeperNormal.cpp index b3e106bfaf..36c405501e 100644 --- a/src/ScoreKeeperNormal.cpp +++ b/src/ScoreKeeperNormal.cpp @@ -443,7 +443,7 @@ void ScoreKeeperNormal::HandleComboInternal( int iNumHitContinueCombo, int iNumH if( iNumBreakCombo == 0 ) { - TimingData td = GAMESTATE->m_pCurSong->m_Timing; + TimingData td = GAMESTATE->m_pCurSong->m_SongTiming; int multiplier = ( iRow == -1 ? 1 : td.GetComboSegmentAtRow( iRow ).m_iCombo ); m_pPlayerStageStats->m_iCurCombo += iNumHitContinueCombo * multiplier; } @@ -463,7 +463,7 @@ void ScoreKeeperNormal::HandleRowComboInternal( TapNoteScore tns, int iNumTapsIn if ( tns >= m_MinScoreToContinueCombo ) { m_pPlayerStageStats->m_iCurMissCombo = 0; - TimingData td = GAMESTATE->m_pCurSong->m_Timing; + TimingData td = GAMESTATE->m_pCurSong->m_SongTiming; int multiplier = ( iRow == -1 ? 1 : td.GetComboSegmentAtRow( iRow ).m_iCombo ); m_pPlayerStageStats->m_iCurCombo += iNumTapsInRow * multiplier; } diff --git a/src/ScreenGameplay.cpp b/src/ScreenGameplay.cpp index 1ac4b6d8c5..1a603c7046 100644 --- a/src/ScreenGameplay.cpp +++ b/src/ScreenGameplay.cpp @@ -1423,7 +1423,7 @@ void ScreenGameplay::UpdateSongPosition( float fDeltaTime ) RageTimer tm; const float fSeconds = m_pSoundMusic->GetPositionSeconds( NULL, &tm ); const float fAdjust = SOUND->GetFrameTimingAdjustment( fDeltaTime ); - GAMESTATE->UpdateSongPosition( fSeconds+fAdjust, GAMESTATE->m_pCurSong->m_Timing, tm+fAdjust ); + GAMESTATE->UpdateSongPosition( fSeconds+fAdjust, GAMESTATE->m_pCurSong->m_SongTiming, tm+fAdjust ); } void ScreenGameplay::BeginScreen() diff --git a/src/ScreenSelectMusic.cpp b/src/ScreenSelectMusic.cpp index fe4aee3aab..4ecb227b3b 100644 --- a/src/ScreenSelectMusic.cpp +++ b/src/ScreenSelectMusic.cpp @@ -1763,7 +1763,7 @@ void ScreenSelectMusic::AfterMusicChange() case SampleMusicPreviewMode_LastSong: // fall through // play the sample music m_sSampleMusicToPlay = pSong->GetMusicPath(); - m_pSampleMusicTimingData = &pSong->m_Timing; + m_pSampleMusicTimingData = &pSong->m_SongTiming; m_fSampleStartSeconds = pSong->m_fMusicSampleStartSeconds; m_fSampleLengthSeconds = pSong->m_fMusicSampleLengthSeconds; break; diff --git a/src/Song.cpp b/src/Song.cpp index 6d9022177b..b8882a5ef2 100644 --- a/src/Song.cpp +++ b/src/Song.cpp @@ -167,7 +167,7 @@ void Song::GetDisplayBpms( DisplayBpms &AddTo ) const else { float fMinBPM, fMaxBPM; - m_Timing.GetActualBPM( fMinBPM, fMaxBPM ); + m_SongTiming.GetActualBPM( fMinBPM, fMaxBPM ); AddTo.Add( fMinBPM ); AddTo.Add( fMaxBPM ); } @@ -488,16 +488,16 @@ void Song::TidyUpData() m_sArtist = "Unknown artist"; TranslateTitles(); - if( m_Timing.m_BPMSegments.empty() ) + if( m_SongTiming.m_BPMSegments.empty() ) { LOG->UserLog( "Song file", m_sSongDir + m_sSongFileName, "has no BPM segments, default provided." ); - m_Timing.AddBPMSegment( BPMSegment(0, 60) ); + m_SongTiming.AddBPMSegment( BPMSegment(0, 60) ); } // Make sure the first BPM segment starts at beat 0. - if( m_Timing.m_BPMSegments[0].m_iStartRow != 0 ) - m_Timing.m_BPMSegments[0].m_iStartRow = 0; + if( m_SongTiming.m_BPMSegments[0].m_iStartRow != 0 ) + m_SongTiming.m_BPMSegments[0].m_iStartRow = 0; if( m_fMusicSampleStartSeconds == -1 || @@ -791,10 +791,10 @@ void Song::TidyUpData() } // If no time signature specified, assume 4/4 time for the whole song. - if( m_Timing.m_vTimeSignatureSegments.empty() ) + if( m_SongTiming.m_vTimeSignatureSegments.empty() ) { TimeSignatureSegment seg(0, 4, 4); - m_Timing.m_vTimeSignatureSegments.push_back( seg ); + m_SongTiming.m_vTimeSignatureSegments.push_back( seg ); } /* @@ -802,24 +802,24 @@ void Song::TidyUpData() * per beat for the entire song. The default of 2 is chosen more * for compatibility with the Pump Pro series than anything else. */ - if( m_Timing.m_TickcountSegments.empty() ) + if( m_SongTiming.m_TickcountSegments.empty() ) { TickcountSegment seg(0, 2); - m_Timing.m_TickcountSegments.push_back( seg ); + m_SongTiming.m_TickcountSegments.push_back( seg ); } // Have a default combo segment of one just in case. - if( m_Timing.m_ComboSegments.empty() ) + if( m_SongTiming.m_ComboSegments.empty() ) { ComboSegment seg(0, 1); - m_Timing.m_ComboSegments.push_back( seg ); + m_SongTiming.m_ComboSegments.push_back( seg ); } // Have a default label segment just in case. - if( m_Timing.m_LabelSegments.empty() ) + if( m_SongTiming.m_LabelSegments.empty() ) { LabelSegment seg(0, "Song Start"); - m_Timing.m_LabelSegments.push_back( seg ); + m_SongTiming.m_LabelSegments.push_back( seg ); } } @@ -1465,7 +1465,7 @@ bool Song::IsEditAlreadyLoaded( Steps* pSteps ) const bool Song::HasSignificantBpmChangesOrStops() const { - if( m_Timing.HasStops() ) + if( m_SongTiming.HasStops() ) return true; // Don't consider BPM changes that only are only for maintaining sync as @@ -1475,7 +1475,7 @@ bool Song::HasSignificantBpmChangesOrStops() const if( m_fSpecifiedBPMMin != m_fSpecifiedBPMMax ) return true; } - else if( m_Timing.HasBpmChanges() ) + else if( m_SongTiming.HasBpmChanges() ) { return true; } @@ -1568,7 +1568,7 @@ public: } static int GetTimingData( T* p, lua_State *L ) { - p->m_Timing.PushSelf(L); + p->m_SongTiming.PushSelf(L); return 1; } // has functions