From dd8d872d281d8ae8f02513b797fff22db031c0bd Mon Sep 17 00:00:00 2001 From: Andrew Livy Date: Mon, 9 Jun 2003 01:13:25 +0000 Subject: [PATCH] More Scrolling Banner Changes.... Now you can have songs automatically play AND have a confirm on them. Can also change rotation of the banner / whole list via metrics. (allowing for vertical scrolling lists) or more importantly, a 4th mix interface ;) --- stepmania/Themes/default/metrics.ini | 4 +++- stepmania/src/MusicBannerWheel.cpp | 4 ++-- stepmania/src/ScreenEz2SelectMusic.cpp | 24 +++++++++++++++--------- stepmania/src/ScrollingList.cpp | 5 +++++ 4 files changed, 25 insertions(+), 12 deletions(-) diff --git a/stepmania/Themes/default/metrics.ini b/stepmania/Themes/default/metrics.ini index 2857f93acf..5047997812 100644 --- a/stepmania/Themes/default/metrics.ini +++ b/stepmania/Themes/default/metrics.ini @@ -644,6 +644,8 @@ PumpDifficultyX=320 PumpDifficultyY=280 ScrollingListX=320 ScrollingListY=240 +ScrollingListRotation=0 +BannerRotation=0 MeterP1X=999 // by default hide these elements MeterP1Y=999 MeterP2X=999 @@ -676,7 +678,7 @@ DifficultyRatingX=999 DifficultyRatingY=999 DifficultyRatingOrientation=0 DifficultyRatingSpacing=40.0 -PreviewMusicMode=0 // 0 = play music as you select, 1 = no music plays, select once and preview music plays, select again for confirm, 2 = no music plays at all. +PreviewMusicMode=0 // 0 = play music as you select, 1 = no music plays, select once and preview music plays, select again for confirm, 2 = no music plays at all, 3 = play music as select, press twice to confirm [ScreenSelectCourse] ExplanationX=132 diff --git a/stepmania/src/MusicBannerWheel.cpp b/stepmania/src/MusicBannerWheel.cpp index 2634b8ddef..a32d326cd1 100644 --- a/stepmania/src/MusicBannerWheel.cpp +++ b/stepmania/src/MusicBannerWheel.cpp @@ -179,7 +179,7 @@ void MusicBannerWheel::InsertNewBanner(int direction) { ASSERT(0); // we should be going in some sort of direction. } - if(PREVIEWMUSICMODE == 0) + if(PREVIEWMUSICMODE == 0 || PREVIEWMUSICMODE == 3) PlayMusicSample(); } @@ -270,7 +270,7 @@ void MusicBannerWheel::LoadSongData() m_ScrollingList.Load( asGraphicPaths ); if(SingleLoad == 2) SingleLoad = 1; - if(PREVIEWMUSICMODE == 0) + if(PREVIEWMUSICMODE == 0 || PREVIEWMUSICMODE == 3) PlayMusicSample(); } diff --git a/stepmania/src/ScreenEz2SelectMusic.cpp b/stepmania/src/ScreenEz2SelectMusic.cpp index 86ab905cdf..d3c2780163 100644 --- a/stepmania/src/ScreenEz2SelectMusic.cpp +++ b/stepmania/src/ScreenEz2SelectMusic.cpp @@ -33,6 +33,7 @@ #define SCROLLING_LIST_X THEME->GetMetricF("ScreenEz2SelectMusic","ScrollingListX") #define SCROLLING_LIST_Y THEME->GetMetricF("ScreenEz2SelectMusic","ScrollingListY") +#define SCROLLING_LIST_ROT THEME->GetMetricF("ScreenEz2SelectMusic","ScrollingListRotation") #define PUMP_DIFF_X THEME->GetMetricF("ScreenEz2SelectMusic","PumpDifficultyX") #define PUMP_DIFF_Y THEME->GetMetricF("ScreenEz2SelectMusic","PumpDifficultyY") #define HELP_TEXT THEME->GetMetric("ScreenSelectMusic","HelpText") @@ -75,9 +76,10 @@ ScreenEz2SelectMusic::ScreenEz2SelectMusic() : Screen("ScreenEz2SelectMusic") i_ErrorDetected=0; CodeDetector::RefreshCacheItems(); - if(PREVIEWMUSICMODE == 1) + if(PREVIEWMUSICMODE == 1 || PREVIEWMUSICMODE == 3) { - SOUNDMAN->StopMusic(); + if(PREVIEWMUSICMODE == 1) + SOUNDMAN->StopMusic(); iConfirmSelection = 0; } @@ -95,6 +97,7 @@ ScreenEz2SelectMusic::ScreenEz2SelectMusic() : Screen("ScreenEz2SelectMusic") m_MusicBannerWheel.SetX(SCROLLING_LIST_X); m_MusicBannerWheel.SetY(SCROLLING_LIST_Y); + m_MusicBannerWheel.SetRotationZ(SCROLLING_LIST_ROT); if(m_MusicBannerWheel.CheckSongsExist() != 0) { @@ -414,7 +417,7 @@ void ScreenEz2SelectMusic::MenuStart( PlayerNumber pn ) m_soundSelect.Play(); - if(PREVIEWMUSICMODE == 1 && iConfirmSelection == 0) + if((PREVIEWMUSICMODE == 1 || PREVIEWMUSICMODE == 3) && iConfirmSelection == 0) { iConfirmSelection = 1; m_MusicBannerWheel.StartBouncing(); @@ -482,11 +485,12 @@ void ScreenEz2SelectMusic::EasierDifficulty( PlayerNumber pn ) if( m_iSelection[pn] == 0 ) return; - if(PREVIEWMUSICMODE == 1 && iConfirmSelection == 1) + if((PREVIEWMUSICMODE == 1 || PREVIEWMUSICMODE == 3) && iConfirmSelection == 1) { iConfirmSelection = 0; m_MusicBannerWheel.StopBouncing(); - SOUNDMAN->StopMusic(); + if(PREVIEWMUSICMODE == 1) + SOUNDMAN->StopMusic(); } m_iSelection[pn]--; @@ -525,12 +529,13 @@ void ScreenEz2SelectMusic::HarderDifficulty( PlayerNumber pn ) return; } - if(PREVIEWMUSICMODE == 1 && iConfirmSelection == 1) + if((PREVIEWMUSICMODE == 1 || PREVIEWMUSICMODE == 3) && iConfirmSelection == 1) { iConfirmSelection = 0; m_MusicBannerWheel.StopBouncing(); - SOUNDMAN->StopMusic(); + if(PREVIEWMUSICMODE == 1) + SOUNDMAN->StopMusic(); } m_iSelection[pn]++; @@ -571,10 +576,11 @@ void ScreenEz2SelectMusic::MusicChanged() OFF_COMMAND( m_sprBalloon ); } - if(PREVIEWMUSICMODE == 1 && iConfirmSelection == 1) + if((PREVIEWMUSICMODE == 1 || PREVIEWMUSICMODE == 3) && iConfirmSelection == 1) { iConfirmSelection = 0; - SOUNDMAN->StopMusic(); + if(PREVIEWMUSICMODE == 1) + SOUNDMAN->StopMusic(); } int pn; diff --git a/stepmania/src/ScrollingList.cpp b/stepmania/src/ScrollingList.cpp index 2af74777b9..b971366c6f 100644 --- a/stepmania/src/ScrollingList.cpp +++ b/stepmania/src/ScrollingList.cpp @@ -37,6 +37,8 @@ enum BANNER_PREFS_TYPES #define ZOOM_OFFSET THEME->GetMetricF("ScreenEz2SelectMusic","BannerZoomOffset") #define FADE_OFFSET THEME->GetMetricF("ScreenEz2SelectMusic","BannerFadeOffset") +#define BANNER_ROTATION THEME->GetMetricF("ScreenEz2SelectMusic","BannerRotation") + #define SPRITE_TYPE_SPRITE 0 #define SPRITE_TYPE_CROPPEDSPRITE 1 @@ -491,6 +493,9 @@ void ScrollingList::DrawPrimitives() m_apCSprites[iIndexToDraw2]->SetX( (+i+m_fSelectionLag) * m_iSpacing ); m_apCSprites[iIndexToDraw1]->SetZ( (m_iNumVisible)/2 - i); m_apCSprites[iIndexToDraw2]->SetZ( (m_iNumVisible)/2 - i); + m_apCSprites[iIndexToDraw1]->SetRotationZ(BANNER_ROTATION); + m_apCSprites[iIndexToDraw2]->SetRotationZ(BANNER_ROTATION); + m_sprBannerMask.SetRotationZ(BANNER_ROTATION); if( i==0 ) // so we don't draw 0 twice { if(!m_iBouncingState)