From 9e6ea7b3a66fca395683a962c8bb217d34443592 Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Tue, 5 Apr 2011 01:04:19 -0400 Subject: [PATCH] [sm130labels] Force starting label, display all. Now to fix the keyboard command... --- src/NoteField.cpp | 13 +++++++++++++ src/Song.cpp | 16 +++++++++------- 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/src/NoteField.cpp b/src/NoteField.cpp index c1b7a9f0e7..4d1a7ef0b2 100644 --- a/src/NoteField.cpp +++ b/src/NoteField.cpp @@ -862,6 +862,19 @@ void NoteField::DrawPrimitives() DrawComboText( fBeat, tComboSegments[i].m_iCombo ); } } + + // Label text + const vector &lLabelSegments = GAMESTATE->m_pCurSong->m_Timing.m_LabelSegments; + for( unsigned i=0; i= iFirstRowToDraw && + lLabelSegments[i].m_iStartRow <= iLastRowToDraw) + { + float fBeat = NoteRowToBeat(lLabelSegments[i].m_iStartRow); + if( IS_ON_SCREEN(fBeat) ) + DrawLabelText( fBeat, lLabelSegments[i].m_sLabel ); + } + } // Course mods text const Course *pCourse = GAMESTATE->m_pCurCourse; diff --git a/src/Song.cpp b/src/Song.cpp index a9ea071738..5e76729eac 100644 --- a/src/Song.cpp +++ b/src/Song.cpp @@ -781,10 +781,7 @@ void Song::TidyUpData() // If no time signature specified, assume 4/4 time for the whole song. if( m_Timing.m_vTimeSignatureSegments.empty() ) { - TimeSignatureSegment seg; - seg.m_iStartRow = 0; - seg.m_iNumerator = 4; - seg.m_iDenominator = 4; + TimeSignatureSegment seg(0, 4, 4); m_Timing.m_vTimeSignatureSegments.push_back( seg ); } @@ -795,9 +792,7 @@ void Song::TidyUpData() */ if( m_Timing.m_TickcountSegments.empty() ) { - TickcountSegment seg; - seg.m_iStartRow = 0; - seg.m_iTicks = 2; + TickcountSegment seg(0, 2); m_Timing.m_TickcountSegments.push_back( seg ); } @@ -809,6 +804,13 @@ void Song::TidyUpData() seg.m_iCombo = 1; m_Timing.m_ComboSegments.push_back( seg ); } + + // Have a default label segment just in case. + if( m_Timing.m_LabelSegments.empty() ) + { + LabelSegment seg(0, "Song Start"); + m_Timing.m_LabelSegments.push_back( seg ); + } } void Song::TranslateTitles()