From 4efac2b166836826f49b1ef8156a1fd905fc2b2d Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Fri, 30 May 2003 20:39:40 +0000 Subject: [PATCH] remove hard limit --- stepmania/src/ScreenMusicScroll.cpp | 39 ++++++++++++++--------------- stepmania/src/ScreenMusicScroll.h | 7 +++--- 2 files changed, 22 insertions(+), 24 deletions(-) diff --git a/stepmania/src/ScreenMusicScroll.cpp b/stepmania/src/ScreenMusicScroll.cpp index 1bf69b246e..50cf118c82 100644 --- a/stepmania/src/ScreenMusicScroll.cpp +++ b/stepmania/src/ScreenMusicScroll.cpp @@ -52,17 +52,16 @@ ScreenMusicScroll::ScreenMusicScroll() : Screen("ScreenMusicScroll") SONGMAN->GetSongs( arraySongs ); SortSongPointerArrayByTitle( arraySongs ); - m_iNumLines = 0; - - for( i=0; iGetPathToF("ScreenMusicScroll titles") ); - m_textLines[m_iNumLines].SetText( pSong->GetFullDisplayTitle(), pSong->GetFullTranslitTitle() ); - m_textLines[m_iNumLines].SetDiffuse( SONGMAN->GetSongColor(pSong) ); - m_textLines[m_iNumLines].SetZoom( TEXT_ZOOM ); - - m_iNumLines++; + bt->LoadFromFont( THEME->GetPathToF("ScreenMusicScroll titles") ); + bt->SetText( pSong->GetFullDisplayTitle(), pSong->GetFullTranslitTitle() ); + bt->SetDiffuse( SONGMAN->GetSongColor(pSong) ); + bt->SetZoom( TEXT_ZOOM ); } // for( i=0; iSetXY( CENTER_X, SCREEN_BOTTOM + 40 ); + m_textLines[i]->BeginTweening( SCROLL_DELAY * i ); + m_textLines[i]->BeginTweening( 2.0f*SCROLL_SPEED ); + m_textLines[i]->SetXY( CENTER_X, SCREEN_TOP - 40 ); } this->PostScreenMessage( SM_BeginFadingOut, 0.2f * i + 3.0f ); @@ -99,8 +98,8 @@ ScreenMusicScroll::ScreenMusicScroll() : Screen("ScreenMusicScroll") void ScreenMusicScroll::Update( float fDeltaTime ) { - for( unsigned i=0; iUpdate( fDeltaTime ); m_In.Update( fDeltaTime ); m_Out.Update( fDeltaTime ); @@ -113,11 +112,11 @@ void ScreenMusicScroll::DrawPrimitives() { Screen::DrawPrimitives(); - for( unsigned i=0; i SCREEN_TOP-20 && - m_textLines[i].GetY() < SCREEN_BOTTOM+20 ) - m_textLines[i].Draw(); + if( m_textLines[i]->GetY() > SCREEN_TOP-20 && + m_textLines[i]->GetY() < SCREEN_BOTTOM+20 ) + m_textLines[i]->Draw(); } m_In.Draw(); // render it again so it shows over the text diff --git a/stepmania/src/ScreenMusicScroll.h b/stepmania/src/ScreenMusicScroll.h index 8a20402894..c4800c9f2f 100644 --- a/stepmania/src/ScreenMusicScroll.h +++ b/stepmania/src/ScreenMusicScroll.h @@ -16,9 +16,9 @@ #include "MenuElements.h" -const unsigned MAX_MUSIC_LINES = 1200; +//const unsigned MAX_MUSIC_LINES = 1200; //const unsigned MAX_CREDIT_LINES = 100; -const unsigned MAX_TOTAL_LINES = MAX_MUSIC_LINES;// + MAX_CREDIT_LINES; +//const unsigned MAX_TOTAL_LINES = MAX_MUSIC_LINES;// + MAX_CREDIT_LINES; class ScreenMusicScroll : public Screen @@ -38,8 +38,7 @@ public: private: BGAnimation m_Background; - BitmapText m_textLines[MAX_TOTAL_LINES]; - unsigned m_iNumLines; + vector m_textLines; float m_fTimeLeftInScreen; Transition m_In;