Display the Tickcounts in the editor.

This commit is contained in:
Jason Felds
2011-01-18 12:29:01 -05:00
parent 2504a2c4b5
commit 6107d7275d
2 changed files with 29 additions and 0 deletions
+28
View File
@@ -460,6 +460,21 @@ void NoteField::DrawTimeSignatureText( const float fBeat, int iNumerator, int iD
m_textMeasureNumber.Draw();
}
void NoteField::DrawTickcountText( const float fBeat, int iTicks )
{
const float fYOffset = ArrowEffects::GetYOffset( m_pPlayerState, 0, fBeat );
const float fYPos = ArrowEffects::GetYPos( m_pPlayerState, 0, fYOffset, m_fYReverseOffsetPixels );
const float fZoom = ArrowEffects::GetZoom( m_pPlayerState );
m_textMeasureNumber.SetZoom( fZoom );
m_textMeasureNumber.SetHorizAlign( align_left );
m_textMeasureNumber.SetDiffuse( RageColor(0,1,0,1) );
m_textMeasureNumber.SetGlow( RageColor(1,1,1,RageFastCos(RageTimer::GetTimeSinceStartFast()*2)/2+0.5f) );
m_textMeasureNumber.SetText( ssprintf("%d", iTicks) );
m_textMeasureNumber.SetXY( GetWidth()/2.f + 10*fZoom, fYPos );
m_textMeasureNumber.Draw();
}
void NoteField::DrawAttackText( const float fBeat, const Attack &attack )
{
const float fYOffset = ArrowEffects::GetYOffset( m_pPlayerState, 0, fBeat );
@@ -712,6 +727,19 @@ void NoteField::DrawPrimitives()
DrawTimeSignatureText( fBeat, vTimeSignatureSegments[i].m_iNumerator, vTimeSignatureSegments[i].m_iDenominator );
}
}
// Tickcount text
const vector<TickcountSegment> &tTickcountSegments = GAMESTATE->m_pCurSong->m_Timing.m_TickcountSegments;
for( unsigned i=0; i<tTickcountSegments.size(); i++ )
{
if( tTickcountSegments[i].m_iStartRow >= iFirstRowToDraw &&
tTickcountSegments[i].m_iStartRow <= iLastRowToDraw)
{
float fBeat = NoteRowToBeat(tTickcountSegments[i].m_iStartRow);
if( IS_ON_SCREEN(fBeat) )
DrawTickcountText( fBeat, tTickcountSegments[i].m_iTicks );
}
}
// todo: add warp text -aj
+1
View File
@@ -60,6 +60,7 @@ protected:
void DrawBPMText( const float fBeat, const float fBPM );
void DrawFreezeText( const float fBeat, const float fBPM, const float bDelay );
void DrawTimeSignatureText( const float fBeat, int iNumerator, int iDenominator );
void DrawTickcountText( const float fBeat, int iTicks );
void DrawAttackText( const float fBeat, const Attack &attack );
void DrawBGChangeText( const float fBeat, const RString sNewBGName );
float GetWidth() const;