From 899e226f38a0934daa628454579f3092b6a7d094 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Mon, 23 Sep 2002 07:35:47 +0000 Subject: [PATCH] Moved backgrounds into "Backgrounds" assets folder. Any BGAnimation may be used now. Cleaned up many, many graphics. --- stepmania/README-FIRST.TXT | 2 +- stepmania/TODO.chris | 10 ++++++++ stepmania/Themes/default/metrics.ini | 12 ++++++--- stepmania/src/Background.cpp | 21 +++------------ stepmania/src/Font.cpp | 2 +- stepmania/src/FootMeter.cpp | 8 +++--- stepmania/src/MenuElements.cpp | 29 +++++++++++---------- stepmania/src/MenuElements.h | 14 +++++----- stepmania/src/ScreenAppearanceOptions.cpp | 2 +- stepmania/src/ScreenCaution.cpp | 5 ++-- stepmania/src/ScreenCaution.h | 5 ++-- stepmania/src/ScreenEvaluation.cpp | 9 ++++--- stepmania/src/ScreenGameplay.cpp | 3 ++- stepmania/src/ScreenHowToPlay.cpp | 2 +- stepmania/src/ScreenInputOptions.cpp | 2 +- stepmania/src/ScreenMachineOptions.cpp | 2 +- stepmania/src/ScreenManager.cpp | 31 +++++++++++++---------- stepmania/src/ScreenMusicScroll.cpp | 7 +++-- stepmania/src/ScreenMusicScroll.h | 8 +++--- stepmania/src/ScreenPlayerOptions.cpp | 2 +- stepmania/src/ScreenSelectCourse.cpp | 2 +- stepmania/src/ScreenSelectDifficulty.cpp | 2 +- stepmania/src/ScreenSelectGame.cpp | 2 +- stepmania/src/ScreenSelectGame.h | 12 +++------ stepmania/src/ScreenSelectGroup.cpp | 2 +- stepmania/src/ScreenSelectMusic.cpp | 2 +- stepmania/src/ScreenSelectStyle.cpp | 2 +- stepmania/src/ScreenSelectStyle5th.cpp | 2 +- stepmania/src/ScreenSongOptions.cpp | 2 +- stepmania/src/ScreenTitleMenu.cpp | 5 ++-- stepmania/src/ScreenTitleMenu.h | 15 ++++++----- stepmania/src/ThemeManager.cpp | 2 ++ 32 files changed, 116 insertions(+), 110 deletions(-) diff --git a/stepmania/README-FIRST.TXT b/stepmania/README-FIRST.TXT index 9735496457..c34c3f5573 100644 --- a/stepmania/README-FIRST.TXT +++ b/stepmania/README-FIRST.TXT @@ -849,7 +849,7 @@ will be blurry. Whenever possible: * Keep your images to dimensions smaller or equal to 256x256. * Make your images have an even number for each dimension (e.g. 286x120 is -will appear less blurr than 285x119). The reason behind this has to do with +will appear less blurry than 285x119). The reason behind this has to do with how 3D accelerators represent screen coordinates with floating point numbers, not integers. diff --git a/stepmania/TODO.chris b/stepmania/TODO.chris index fdca24fd40..9ff1e5ef45 100644 --- a/stepmania/TODO.chris +++ b/stepmania/TODO.chris @@ -2,6 +2,16 @@ Fix ///////////////////////// +In the arcade, it doesn't sort music by alphabetical order in its group, but rather, it sorts all the songs in a group according to light difficutly, from the easiest song on top, to the hardest light mode song on the bottom. When there are songs with the same light rating, THEN it sorts THOSE by alphabetical order. + +get rid of lines between tiles + +red life glow in sync with beat + +kpt web site - NOW! + +No no, I know about chaning group colors but when in ABC sort they're all red + on Ez2, the Ranking doesn't save (AAA, AA, A, B e.t.c.) but the score does, any ideas why? diff --git a/stepmania/Themes/default/metrics.ini b/stepmania/Themes/default/metrics.ini index 8291574965..20db914b82 100644 --- a/stepmania/Themes/default/metrics.ini +++ b/stepmania/Themes/default/metrics.ini @@ -291,12 +291,13 @@ SongNumberP1ExtraY=440 SongNumberP2X=350 SongNumberP2Y=54 SongNumberP2ExtraY=440 -ScoreP1X=100 -ScoreP1Y=442 +ScoreP1X=106 +ScoreP1Y=444 ScoreP1ExtraY=38 -ScoreP2X=540 -ScoreP2Y=442 +ScoreP2X=534 +ScoreP2Y=444 ScoreP2ExtraY=38 +ScoreZoom=1.0 PlayerOptionsP1X=320 PlayerOptionsP1Y=434 PlayerOptionsP1ExtraY=46 @@ -420,6 +421,9 @@ CreditsP1X=100 CreditsP1Y=472 CreditsP2X=540 CreditsP2Y=472 +CreditsColor=1,1,1,1 +CreditsShadowLength=2 +CreditsZoom=0.5 [WheelItemDisplay] IconX=-136 diff --git a/stepmania/src/Background.cpp b/stepmania/src/Background.cpp index 9cfca2c86f..4769211ab7 100644 --- a/stepmania/src/Background.cpp +++ b/stepmania/src/Background.cpp @@ -63,17 +63,7 @@ Background::Background() m_BackgroundMode = MODE_STATIC_BG; - CStringArray asPossibleDangerMovies; - GetDirListing( RANDOMMOVIES_DIR+"danger.avi", asPossibleDangerMovies, false, true ); - GetDirListing( RANDOMMOVIES_DIR+"danger.mpg", asPossibleDangerMovies, false, true ); - GetDirListing( RANDOMMOVIES_DIR+"danger.mpeg", asPossibleDangerMovies, false, true ); - - if( asPossibleDangerMovies.GetSize()>0 ) - m_BGADanger.LoadFromMovie( asPossibleDangerMovies[0], true, false ); - else if( DoesFileExist(BG_ANIMS_DIR+"danger\\") ) - m_BGADanger.LoadFromAniDir( BG_ANIMS_DIR+"danger\\", "" ); - else - PREFSMAN->m_bShowDanger = false; + m_BGADanger.LoadFromAniDir( THEME->GetPathTo("BGAnimations","danger") ); m_quadBGBrightness.StretchTo( RECT_BACKGROUND ); m_quadBGBrightness.SetDiffuse( D3DXCOLOR(0,0,0,1-PREFSMAN->m_fBGBrightness) ); @@ -258,9 +248,9 @@ void Background::LoadFromSong( Song* pSong ) { CStringArray arrayPossibleAnims; GetDirListing( BG_ANIMS_DIR+"*.*", arrayPossibleAnims, true, true ); - // strip out "cvs" and "danger" + // strip out "cvs" for( int i=arrayPossibleAnims.GetSize()-1; i>=0; i-- ) - if( 0==stricmp(arrayPossibleAnims[i].Right(3),"cvs") || -1!=arrayPossibleAnims[i].Find("anger") ) + if( 0==stricmp(arrayPossibleAnims[i].Right(3),"cvs") ) arrayPossibleAnims.RemoveAt(i); for( i=0; i<4 && arrayPossibleAnims.GetSize()>0; i++ ) { @@ -278,10 +268,7 @@ void Background::LoadFromSong( Song* pSong ) GetDirListing( RANDOMMOVIES_DIR + "*.avi", arrayPossibleMovies, false, true ); GetDirListing( RANDOMMOVIES_DIR + "*.mpg", arrayPossibleMovies, false, true ); GetDirListing( RANDOMMOVIES_DIR + "*.mpeg", arrayPossibleMovies, false, true ); - for( int i=arrayPossibleMovies.GetSize()-1; i>=0; i-- ) - if( -1!=arrayPossibleMovies[i].Find("anger") ) - arrayPossibleMovies.RemoveAt(i); - for( i=0; i<4 && arrayPossibleMovies.GetSize()>0; i++ ) + for( int i=0; i<4 && arrayPossibleMovies.GetSize()>0; i++ ) { int index = rand() % arrayPossibleMovies.GetSize(); pTempBGA = new BackgroundAnimation; diff --git a/stepmania/src/Font.cpp b/stepmania/src/Font.cpp index 8cdfe9c326..28191f84ab 100644 --- a/stepmania/src/Font.cpp +++ b/stepmania/src/Font.cpp @@ -57,7 +57,7 @@ Font::Font( const CString &sASCIITexturePath ) // load character widths for( i=0; i<256; i++ ) if( !ini.GetValueI( "Char Widths", ssprintf("%d",i), m_iFrameNoToWidth[i] ) ) - throw RageException( "Error reading 'Char Widths from '%s'.", sIniPath ); + throw RageException( "Error reading width value '%d' from '%s'.", i, sIniPath ); m_bCapitalsOnly = false; ini.GetValueB( "Char Widths", "CapitalsOnly", m_bCapitalsOnly ); diff --git a/stepmania/src/FootMeter.cpp b/stepmania/src/FootMeter.cpp index 17df6cb9b6..599b3c5664 100644 --- a/stepmania/src/FootMeter.cpp +++ b/stepmania/src/FootMeter.cpp @@ -36,10 +36,10 @@ void FootMeter::SetFromNotes( Notes* pNotes ) this->SetEffectNone(); SetDiffuse( pNotes->GetColor() ); - this->StopTweening(); - this->SetZoom( 1.1f ); - this->BeginTweening( 0.3f, TWEEN_BOUNCE_BEGIN ); - this->SetTweenZoom( 1 ); +// this->StopTweening(); +// this->SetZoom( 1.1f ); +// this->BeginTweening( 0.3f, TWEEN_BOUNCE_BEGIN ); +// this->SetTweenZoom( 1 ); } else { diff --git a/stepmania/src/MenuElements.cpp b/stepmania/src/MenuElements.cpp index 397790bbc1..51a2b3f2ba 100644 --- a/stepmania/src/MenuElements.cpp +++ b/stepmania/src/MenuElements.cpp @@ -41,7 +41,8 @@ MenuElements::MenuElements() this->AddChild( &m_sprStyleIcon ); this->AddChild( &m_MenuTimer ); this->AddChild( &m_sprBottomEdge ); - this->AddChild( &m_sprBG ); + this->AddChild( &m_Background ); + this->AddChild( &m_quadBrightness ); this->AddChild( &m_textHelp ); m_KeepAlive.SetOpened(); @@ -74,9 +75,10 @@ void MenuElements::Load( CString sBackgroundPath, CString sTopEdgePath, CString LOG->Trace( "MenuElements::MenuElements()" ); - m_sprBG.Load( sBackgroundPath ); - m_sprBG.StretchTo( CRect(0,0,SCREEN_WIDTH,SCREEN_HEIGHT) ); - m_sprBG.TurnShadowOff(); + m_Background.LoadFromAniDir( sBackgroundPath ); + + m_quadBrightness.SetDiffuse( D3DXCOLOR(0,0,0,0) ); + m_quadBrightness.StretchTo( CRect(SCREEN_LEFT, SCREEN_TOP, SCREEN_RIGHT, SCREEN_BOTTOM) ); m_sprTopEdge.Load( sTopEdgePath ); m_sprTopEdge.SetXY( TOP_EDGE_X, TOP_EDGE_Y ); @@ -224,9 +226,9 @@ void MenuElements::TweenBottomLayerOnScreen() m_sprBottomEdge.BeginTweening( MENU_ELEMENTS_TWEEN_TIME/2 ); m_sprBottomEdge.SetTweenY( fOriginalY ); - m_sprBG.SetDiffuse( D3DXCOLOR(0,0,0,1) ); - m_sprBG.BeginTweening( MENU_ELEMENTS_TWEEN_TIME/2 ); - m_sprBG.SetTweenDiffuse( D3DXCOLOR(1,1,1,1) ); + m_quadBrightness.SetDiffuse( D3DXCOLOR(0,0,0,1) ); + m_quadBrightness.BeginTweening( MENU_ELEMENTS_TWEEN_TIME/2 ); + m_quadBrightness.SetTweenDiffuse( D3DXCOLOR(0,0,0,0) ); } void MenuElements::TweenBottomLayerOffScreen() @@ -236,11 +238,11 @@ void MenuElements::TweenBottomLayerOffScreen() m_sprBottomEdge.BeginTweening( MENU_ELEMENTS_TWEEN_TIME/2 ); m_sprBottomEdge.SetTweenY( fOriginalY + 100 ); - m_sprBG.SetDiffuse( D3DXCOLOR(1,1,1,1) ); - m_sprBG.StopTweening(); - m_sprBG.BeginTweening( MENU_ELEMENTS_TWEEN_TIME*3/2.0f ); // sleep - m_sprBG.BeginTweening( MENU_ELEMENTS_TWEEN_TIME/2 ); // fade - m_sprBG.SetTweenDiffuse( D3DXCOLOR(0,0,0,1) ); + m_quadBrightness.SetDiffuse( D3DXCOLOR(0,0,0,0) ); + m_quadBrightness.StopTweening(); + m_quadBrightness.BeginTweening( MENU_ELEMENTS_TWEEN_TIME*3/2.0f ); // sleep + m_quadBrightness.BeginTweening( MENU_ELEMENTS_TWEEN_TIME/2 ); // fade + m_quadBrightness.SetTweenDiffuse( D3DXCOLOR(0,0,0,1) ); } void MenuElements::TweenOnScreenFromBlack( ScreenMessage smSendWhenDone ) @@ -293,7 +295,8 @@ void MenuElements::DrawBottomLayer() { BeginDraw(); - m_sprBG.Draw(); + m_Background.Draw(); + m_quadBrightness.Draw(); EndDraw(); } diff --git a/stepmania/src/MenuElements.h b/stepmania/src/MenuElements.h index d6c11bd80c..c045e4c6d9 100644 --- a/stepmania/src/MenuElements.h +++ b/stepmania/src/MenuElements.h @@ -22,6 +22,7 @@ #include "TransitionKeepAlive.h" #include "TransitionInvisible.h" #include "TipDisplay.h" +#include "BackgroundAnimation.h" const float MENU_ELEMENTS_TWEEN_TIME = 0.5f; @@ -61,12 +62,13 @@ protected: void TweenBottomLayerOffScreen(); - Sprite m_sprTopEdge; - Sprite m_sprStyleIcon; - MenuTimer m_MenuTimer; - Sprite m_sprBottomEdge; - Sprite m_sprBG; - TipDisplay m_textHelp; + Sprite m_sprTopEdge; + Sprite m_sprStyleIcon; + MenuTimer m_MenuTimer; + Sprite m_sprBottomEdge; + BackgroundAnimation m_Background; + Quad m_quadBrightness; // for darkening the background + TipDisplay m_textHelp; TransitionFadeWipe m_Wipe; // for going back TransitionKeepAlive m_KeepAlive; // going back and forward diff --git a/stepmania/src/ScreenAppearanceOptions.cpp b/stepmania/src/ScreenAppearanceOptions.cpp index c33d3b76bd..f3dbddb1a9 100644 --- a/stepmania/src/ScreenAppearanceOptions.cpp +++ b/stepmania/src/ScreenAppearanceOptions.cpp @@ -43,7 +43,7 @@ OptionRowData g_AppearanceOptionsLines[NUM_APPEARANCE_OPTIONS_LINES] = { ScreenAppearanceOptions::ScreenAppearanceOptions() : ScreenOptions( - THEME->GetPathTo("Graphics","appearance options background"), + THEME->GetPathTo("BGAnimations","appearance options"), THEME->GetPathTo("Graphics","appearance options page"), THEME->GetPathTo("Graphics","appearance options top edge") ) diff --git a/stepmania/src/ScreenCaution.cpp b/stepmania/src/ScreenCaution.cpp index b285eb1537..8e4a84dbd6 100644 --- a/stepmania/src/ScreenCaution.cpp +++ b/stepmania/src/ScreenCaution.cpp @@ -31,9 +31,8 @@ ScreenCaution::ScreenCaution() { GAMESTATE->m_bPlayersCanJoin = true; - m_sprCaution.Load( THEME->GetPathTo("Graphics","caution") ); - m_sprCaution.StretchTo( CRect(SCREEN_LEFT,SCREEN_TOP,SCREEN_RIGHT,SCREEN_BOTTOM) ); - this->AddChild( &m_sprCaution ); + m_Background.LoadFromAniDir( THEME->GetPathTo("BGAnimations","caution") ); + this->AddChild( &m_Background ); m_Wipe.OpenWipingRight( SM_DoneOpening ); this->AddChild( &m_Wipe ); diff --git a/stepmania/src/ScreenCaution.h b/stepmania/src/ScreenCaution.h index cf9cf75b4f..2a67e9ae42 100644 --- a/stepmania/src/ScreenCaution.h +++ b/stepmania/src/ScreenCaution.h @@ -17,6 +17,7 @@ #include "TransitionFade.h" #include "TransitionFadeWipe.h" #include "RandomSample.h" +#include "BackgroundAnimation.h" class ScreenCaution : public Screen @@ -30,8 +31,8 @@ public: protected: void MenuStart( PlayerNumber pn ); void MenuBack( PlayerNumber pn ); - Sprite m_sprCaution; - TransitionFade m_Wipe; + BackgroundAnimation m_Background; + TransitionFade m_Wipe; TransitionFadeWipe m_FadeWipe; }; diff --git a/stepmania/src/ScreenEvaluation.cpp b/stepmania/src/ScreenEvaluation.cpp index 35866e9de6..1003685e71 100644 --- a/stepmania/src/ScreenEvaluation.cpp +++ b/stepmania/src/ScreenEvaluation.cpp @@ -232,7 +232,7 @@ ScreenEvaluation::ScreenEvaluation( bool bSummary ) // Init graphic elements ////////////////////////// m_Menu.Load( - THEME->GetPathTo("Graphics","evaluation background"), + THEME->GetPathTo("BGAnimations","evaluation"), THEME->GetPathTo("Graphics",m_ResultMode==RM_ARCADE_SUMMARY?"evaluation summary top edge":"evaluation top edge"), HELP_TEXT, true, true, TIMER_SECONDS ); @@ -244,8 +244,9 @@ ScreenEvaluation::ScreenEvaluation( bool bSummary ) if( !GAMESTATE->IsPlayerEnabled( (PlayerNumber)p ) ) // If EZ2 wants to hide this graphic, place it somewhere off screen using theme metrics continue; // skip + m_ScoreDisplay[p].LoadFromNumbers( THEME->GetPathTo("Numbers","evaluation score numbers") ); m_ScoreDisplay[p].SetXY( SCORE_NUMBERS_X(p), SCORE_Y ); - m_ScoreDisplay[p].SetZoomY( 0.9f ); + m_ScoreDisplay[p].SetZoomY( 1.0 ); m_ScoreDisplay[p].SetDiffuse( PlayerToColor(p) ); this->AddChild( &m_ScoreDisplay[p] ); } @@ -511,10 +512,10 @@ ScreenEvaluation::ScreenEvaluation( bool bSummary ) for( l=0; lGetPathTo("Numbers","evaluation score numbers") ); + m_textJudgeNumbers[l][p].LoadFromNumbers( THEME->GetPathTo("Numbers","evaluation judge numbers") ); m_textJudgeNumbers[l][p].TurnShadowOff(); m_textJudgeNumbers[l][p].SetXY( JUDGE_X(m_ResultMode==RM_ONI,p,l), JUDGE_Y(l) ); - m_textJudgeNumbers[l][p].SetZoom( 0.7f ); + m_textJudgeNumbers[l][p].SetZoom( 1.0f ); m_textJudgeNumbers[l][p].SetDiffuse( PlayerToColor(p) ); this->AddChild( &m_textJudgeNumbers[l][p] ); } diff --git a/stepmania/src/ScreenGameplay.cpp b/stepmania/src/ScreenGameplay.cpp index 349a7315fb..fa56d0ff61 100644 --- a/stepmania/src/ScreenGameplay.cpp +++ b/stepmania/src/ScreenGameplay.cpp @@ -46,6 +46,7 @@ #define SONG_NUMBER_Y( p, e ) THEME->GetMetricF("ScreenGameplay",ssprintf("SongNumberP%d%sY",p+1,e?"Extra":"")) #define SCORE_X( p ) THEME->GetMetricF("ScreenGameplay",ssprintf("ScoreP%dX",p+1)) #define SCORE_Y( p, e ) THEME->GetMetricF("ScreenGameplay",ssprintf("ScoreP%d%sY",p+1,e?"Extra":"")) +#define SCORE_ZOOM THEME->GetMetricF("ScreenGameplay","ScoreZoom") #define PLAYER_OPTIONS_X( p ) THEME->GetMetricF("ScreenGameplay",ssprintf("PlayerOptionsP%dX",p+1)) #define PLAYER_OPTIONS_Y( p, e ) THEME->GetMetricF("ScreenGameplay",ssprintf("PlayerOptionsP%d%sY",p+1,e?"Extra":"")) #define SONG_OPTIONS_X THEME->GetMetricF("ScreenGameplay","SongOptionsX") @@ -279,7 +280,7 @@ ScreenGameplay::ScreenGameplay() m_pScoreDisplay[p]->Init( (PlayerNumber)p ); m_pScoreDisplay[p]->SetXY( SCORE_X(p), SCORE_Y(p,bExtra) ); - m_pScoreDisplay[p]->SetZoom( 0.8f ); + m_pScoreDisplay[p]->SetZoom( SCORE_ZOOM ); m_pScoreDisplay[p]->SetDiffuse( PlayerToColor(p) ); this->AddChild( m_pScoreDisplay[p] ); diff --git a/stepmania/src/ScreenHowToPlay.cpp b/stepmania/src/ScreenHowToPlay.cpp index 6753d6a17d..c8408f10c1 100644 --- a/stepmania/src/ScreenHowToPlay.cpp +++ b/stepmania/src/ScreenHowToPlay.cpp @@ -35,7 +35,7 @@ ScreenHowToPlay::ScreenHowToPlay() LOG->Trace( "ScreenHowToPlay::ScreenHowToPlay()" ); m_Menu.Load( - THEME->GetPathTo("Graphics","How To Play Background"), + THEME->GetPathTo("BGAnimations","How To Play"), THEME->GetPathTo("Graphics","How To Play Top Edge"), HELP_TEXT, false, true, TIMER_SECONDS ); diff --git a/stepmania/src/ScreenInputOptions.cpp b/stepmania/src/ScreenInputOptions.cpp index d29e085fd6..20a9ca735d 100644 --- a/stepmania/src/ScreenInputOptions.cpp +++ b/stepmania/src/ScreenInputOptions.cpp @@ -43,7 +43,7 @@ OptionRowData g_InputOptionsLines[NUM_INPUT_OPTIONS_LINES] = { ScreenInputOptions::ScreenInputOptions() : ScreenOptions( - THEME->GetPathTo("Graphics","input options background"), + THEME->GetPathTo("BGAnimations","input options"), THEME->GetPathTo("Graphics","input options page"), THEME->GetPathTo("Graphics","input options top edge") ) diff --git a/stepmania/src/ScreenMachineOptions.cpp b/stepmania/src/ScreenMachineOptions.cpp index b286dca047..782880064a 100644 --- a/stepmania/src/ScreenMachineOptions.cpp +++ b/stepmania/src/ScreenMachineOptions.cpp @@ -47,7 +47,7 @@ OptionRowData g_MachineOptionsLines[NUM_MACHINE_OPTIONS_LINES] = { ScreenMachineOptions::ScreenMachineOptions() : ScreenOptions( - THEME->GetPathTo("Graphics","machine options background"), + THEME->GetPathTo("BGAnimations","machine options"), THEME->GetPathTo("Graphics","machine options page"), THEME->GetPathTo("Graphics","machine options top edge") ) diff --git a/stepmania/src/ScreenManager.cpp b/stepmania/src/ScreenManager.cpp index e57fd94dc0..da91e21629 100644 --- a/stepmania/src/ScreenManager.cpp +++ b/stepmania/src/ScreenManager.cpp @@ -23,10 +23,13 @@ ScreenManager* SCREENMAN = NULL; // global and accessable from anywhere in our program -#define STATS_X THEME->GetMetricF("ScreenManager","StatsX") -#define STATS_Y THEME->GetMetricF("ScreenManager","StatsY") -#define CREDITS_X( p ) THEME->GetMetricF("ScreenManager",ssprintf("CreditsP%dX",p+1)) -#define CREDITS_Y( p ) THEME->GetMetricF("ScreenManager",ssprintf("CreditsP%dY",p+1)) +#define STATS_X THEME->GetMetricF("ScreenManager","StatsX") +#define STATS_Y THEME->GetMetricF("ScreenManager","StatsY") +#define CREDITS_X( p ) THEME->GetMetricF("ScreenManager",ssprintf("CreditsP%dX",p+1)) +#define CREDITS_Y( p ) THEME->GetMetricF("ScreenManager",ssprintf("CreditsP%dY",p+1)) +#define CREDITS_COLOR THEME->GetMetricC("ScreenManager","CreditsColor") +#define CREDITS_SHADOW_LENGTH THEME->GetMetricF("ScreenManager","CreditsShadowLength") +#define CREDITS_ZOOM THEME->GetMetricF("ScreenManager","CreditsZoom") ScreenManager::ScreenManager() @@ -40,14 +43,7 @@ ScreenManager::ScreenManager() m_textStats.SetZoom( 0.5f ); m_textStats.SetShadowLength( 2 ); - for( int p=0; pGetPathTo("Fonts","credits") ); - m_textCreditInfo[p].SetXY( CREDITS_X(p), CREDITS_Y(p) ); - m_textCreditInfo[p].SetZoom( 0.5f ); - m_textCreditInfo[p].SetDiffuse( D3DXCOLOR(1,1,1,1) ); - m_textCreditInfo[p].SetShadowLength( 2 ); - } + // set credits properties on RefreshCreditsMessage m_textSystemMessage.LoadFromFont( THEME->GetPathTo("Fonts","normal") ); m_textSystemMessage.SetHorizAlign( Actor::align_left ); @@ -243,8 +239,9 @@ void ScreenManager::LoadPreppedScreen() void ScreenManager::SetNewScreen( Screen *pNewScreen ) { - // move current screen to ScreenToDelete RefreshCreditsMessages(); + + // move current screen to ScreenToDelete m_ScreensToDelete.Copy( m_ScreenStack ); m_ScreenStack.RemoveAll(); @@ -327,8 +324,14 @@ void ScreenManager::RefreshCreditsMessages() // update joined for( int p=0; pGetPathTo("Fonts","credits") ); + m_textCreditInfo[p].SetXY( CREDITS_X(p), CREDITS_Y(p) ); + m_textCreditInfo[p].SetZoom( CREDITS_ZOOM ); + m_textCreditInfo[p].SetDiffuse( CREDITS_COLOR ); + m_textCreditInfo[p].SetShadowLength( CREDITS_SHADOW_LENGTH ); + if( GAMESTATE->m_bSideIsJoined[p] ) m_textCreditInfo[p].SetText( "" ); else if( GAMESTATE->m_bPlayersCanJoin ) m_textCreditInfo[p].SetText( "PRESS START" ); - else m_textCreditInfo[p].SetText( "CREDIT(s) 0 / 0" ); + else m_textCreditInfo[p].SetText( "CREDIT(S) 0 / 0" ); } } \ No newline at end of file diff --git a/stepmania/src/ScreenMusicScroll.cpp b/stepmania/src/ScreenMusicScroll.cpp index 6cbd8265a9..9553d5b246 100644 --- a/stepmania/src/ScreenMusicScroll.cpp +++ b/stepmania/src/ScreenMusicScroll.cpp @@ -42,7 +42,7 @@ const CString CREDIT_LINES[] = "", "", "GRAPHICS:", - "TofuBoy (Lucas Tang)", + "v1ral (Lucas Tang)", "SPiGuMuS", "DJ McFox (Ryan McKanna)", "Cloud34 (Lamden Travis)", @@ -140,9 +140,8 @@ ScreenMusicScroll::ScreenMusicScroll() GAMESTATE->Reset(); // so that credits message for both players will show - m_sprBackground.Load( THEME->GetPathTo("Graphics","music scroll background") ); - m_sprBackground.StretchTo( CRect(SCREEN_LEFT,SCREEN_TOP,SCREEN_RIGHT,SCREEN_BOTTOM) ); - this->AddChild( &m_sprBackground ); + m_Background.LoadFromAniDir( THEME->GetPathTo("BGAnimations","music scroll") ); + this->AddChild( &m_Background ); CArray arraySongs; diff --git a/stepmania/src/ScreenMusicScroll.h b/stepmania/src/ScreenMusicScroll.h index 492bd709ef..a978d3bc4d 100644 --- a/stepmania/src/ScreenMusicScroll.h +++ b/stepmania/src/ScreenMusicScroll.h @@ -38,10 +38,10 @@ public: private: - Sprite m_sprBackground; - BitmapText m_textLines[MAX_TOTAL_LINES]; - int m_iNumLines; - float m_fTimeLeftInScreen; + BackgroundAnimation m_Background; + BitmapText m_textLines[MAX_TOTAL_LINES]; + int m_iNumLines; + float m_fTimeLeftInScreen; TransitionFade m_Fade; diff --git a/stepmania/src/ScreenPlayerOptions.cpp b/stepmania/src/ScreenPlayerOptions.cpp index 621c3ff3d3..4d9615e633 100644 --- a/stepmania/src/ScreenPlayerOptions.cpp +++ b/stepmania/src/ScreenPlayerOptions.cpp @@ -46,7 +46,7 @@ OptionRowData g_PlayerOptionsLines[NUM_PLAYER_OPTIONS_LINES] = { ScreenPlayerOptions::ScreenPlayerOptions() : ScreenOptions( - THEME->GetPathTo("Graphics","player options background"), + THEME->GetPathTo("BGAnimations","player options"), THEME->GetPathTo("Graphics","player options page"), THEME->GetPathTo("Graphics","player options top edge") ) diff --git a/stepmania/src/ScreenSelectCourse.cpp b/stepmania/src/ScreenSelectCourse.cpp index 628c398fb4..53754a7807 100644 --- a/stepmania/src/ScreenSelectCourse.cpp +++ b/stepmania/src/ScreenSelectCourse.cpp @@ -67,7 +67,7 @@ ScreenSelectCourse::ScreenSelectCourse() m_bGoToOptions = false; m_Menu.Load( - THEME->GetPathTo("Graphics","select course background"), + THEME->GetPathTo("BGAnimations","select course"), THEME->GetPathTo("Graphics","select course top edge"), HELP_TEXT, true, true, TIMER_SECONDS ); diff --git a/stepmania/src/ScreenSelectDifficulty.cpp b/stepmania/src/ScreenSelectDifficulty.cpp index f285a3dbb1..3cdade564b 100644 --- a/stepmania/src/ScreenSelectDifficulty.cpp +++ b/stepmania/src/ScreenSelectDifficulty.cpp @@ -89,7 +89,7 @@ ScreenSelectDifficulty::ScreenSelectDifficulty() int p; m_Menu.Load( - THEME->GetPathTo("Graphics","select difficulty background"), + THEME->GetPathTo("BGAnimations","select difficulty"), THEME->GetPathTo("Graphics","select difficulty top edge"), HELP_TEXT, true, true, TIMER_SECONDS ); diff --git a/stepmania/src/ScreenSelectGame.cpp b/stepmania/src/ScreenSelectGame.cpp index 1c52688eb1..8519832a9e 100644 --- a/stepmania/src/ScreenSelectGame.cpp +++ b/stepmania/src/ScreenSelectGame.cpp @@ -42,7 +42,7 @@ OptionRowData g_SelectGameLines[NUM_SELECT_GAME_LINES] = ScreenSelectGame::ScreenSelectGame() : ScreenOptions( - THEME->GetPathTo("Graphics","select game background"), + THEME->GetPathTo("BGAnimations","select game"), THEME->GetPathTo("Graphics","select game page"), THEME->GetPathTo("Graphics","select game top edge") ) diff --git a/stepmania/src/ScreenSelectGame.h b/stepmania/src/ScreenSelectGame.h index d0c373c9aa..90d745301c 100644 --- a/stepmania/src/ScreenSelectGame.h +++ b/stepmania/src/ScreenSelectGame.h @@ -1,21 +1,15 @@ /* ----------------------------------------------------------------------------- - File: ScreenSelectGame.h + File: ScreenSelectGame - Desc: Select a song. + Desc: Switch the current game Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved. + Chris Danford ----------------------------------------------------------------------------- */ -#include "Screen.h" #include "ScreenOptions.h" -#include "Sprite.h" -#include "BitmapText.h" -#include "RandomSample.h" -#include "TransitionFade.h" -#include "Quad.h" -#include "AnnouncerManager.h" class ScreenSelectGame : public ScreenOptions { diff --git a/stepmania/src/ScreenSelectGroup.cpp b/stepmania/src/ScreenSelectGroup.cpp index a6566d9055..1201e30392 100644 --- a/stepmania/src/ScreenSelectGroup.cpp +++ b/stepmania/src/ScreenSelectGroup.cpp @@ -116,7 +116,7 @@ ScreenSelectGroup::ScreenSelectGroup() m_bChosen = false; m_Menu.Load( - THEME->GetPathTo("Graphics","select group background") , + THEME->GetPathTo("BGAnimations","select group") , THEME->GetPathTo("Graphics","select group top edge"), HELP_TEXT, true, true, TIMER_SECONDS ); diff --git a/stepmania/src/ScreenSelectMusic.cpp b/stepmania/src/ScreenSelectMusic.cpp index f130b7c9d6..4adf0ae2d3 100644 --- a/stepmania/src/ScreenSelectMusic.cpp +++ b/stepmania/src/ScreenSelectMusic.cpp @@ -89,7 +89,7 @@ ScreenSelectMusic::ScreenSelectMusic() int p; m_Menu.Load( - THEME->GetPathTo("Graphics","select music background"), + THEME->GetPathTo("BGAnimations","select music"), THEME->GetPathTo("Graphics","select music top edge"), HELP_TEXT, true, true, TIMER_SECONDS ); diff --git a/stepmania/src/ScreenSelectStyle.cpp b/stepmania/src/ScreenSelectStyle.cpp index f05ca2803e..8b059fff71 100644 --- a/stepmania/src/ScreenSelectStyle.cpp +++ b/stepmania/src/ScreenSelectStyle.cpp @@ -88,7 +88,7 @@ ScreenSelectStyle::ScreenSelectStyle() m_Menu.Load( - THEME->GetPathTo("Graphics","select style background"), + THEME->GetPathTo("BGAnimations","select style"), THEME->GetPathTo("Graphics","select style top edge"), HELP_TEXT, false, true, TIMER_SECONDS ); diff --git a/stepmania/src/ScreenSelectStyle5th.cpp b/stepmania/src/ScreenSelectStyle5th.cpp index 6339d8e6d1..b62a996142 100644 --- a/stepmania/src/ScreenSelectStyle5th.cpp +++ b/stepmania/src/ScreenSelectStyle5th.cpp @@ -165,7 +165,7 @@ ScreenSelectStyle5th::ScreenSelectStyle5th() this->AddChild( &m_textExplanation2 ); m_Menu.Load( - THEME->GetPathTo("Graphics","select style background"), + THEME->GetPathTo("BGAnimations","select style"), THEME->GetPathTo("Graphics","select style top edge"), HELP_TEXT, false, true, TIMER_SECONDS ); diff --git a/stepmania/src/ScreenSongOptions.cpp b/stepmania/src/ScreenSongOptions.cpp index 9995074aee..62c6efb5f9 100644 --- a/stepmania/src/ScreenSongOptions.cpp +++ b/stepmania/src/ScreenSongOptions.cpp @@ -41,7 +41,7 @@ OptionRowData g_SongOptionsLines[NUM_SONG_OPTIONS_LINES] = { ScreenSongOptions::ScreenSongOptions() : ScreenOptions( - THEME->GetPathTo("Graphics","song options background"), + THEME->GetPathTo("BGAnimations","song options"), THEME->GetPathTo("Graphics","song options page"), THEME->GetPathTo("Graphics","song options top edge") ) diff --git a/stepmania/src/ScreenTitleMenu.cpp b/stepmania/src/ScreenTitleMenu.cpp index 557b41d24f..6afb130386 100644 --- a/stepmania/src/ScreenTitleMenu.cpp +++ b/stepmania/src/ScreenTitleMenu.cpp @@ -97,9 +97,8 @@ ScreenTitleMenu::ScreenTitleMenu() - m_sprBG.Load( THEME->GetPathTo("Graphics","title menu background") ); - m_sprBG.StretchTo( CRect(0,0,SCREEN_WIDTH,SCREEN_HEIGHT) ); - this->AddChild( &m_sprBG ); + m_Background.LoadFromAniDir( THEME->GetPathTo("BGAnimations","title menu") ); + this->AddChild( &m_Background ); m_sprLogo.Load( THEME->GetPathTo("Graphics",ssprintf("title menu logo %s",GAMESTATE->GetCurrentGameDef()->m_szName)) ); m_sprLogo.SetXY( LOGO_X, LOGO_Y ); diff --git a/stepmania/src/ScreenTitleMenu.h b/stepmania/src/ScreenTitleMenu.h index 512289f3aa..af1ea11a56 100644 --- a/stepmania/src/ScreenTitleMenu.h +++ b/stepmania/src/ScreenTitleMenu.h @@ -15,6 +15,7 @@ #include "TransitionFade.h" #include "RandomSample.h" #include "RandomStream.h" +#include "BackgroundAnimation.h" @@ -50,14 +51,14 @@ private: TitleMenuChoice m_TitleMenuChoice; - Sprite m_sprBG; - Sprite m_sprLogo; - BitmapText m_textHelp; - BitmapText m_textVersion; - BitmapText m_textSongs; - BitmapText m_textChoice[NUM_TITLE_MENU_CHOICES]; + BackgroundAnimation m_Background; + Sprite m_sprLogo; + BitmapText m_textHelp; + BitmapText m_textVersion; + BitmapText m_textSongs; + BitmapText m_textChoice[NUM_TITLE_MENU_CHOICES]; - TransitionFade m_Fade; + TransitionFade m_Fade; RandomStream m_soundAttract; RandomSample m_soundChange; diff --git a/stepmania/src/ThemeManager.cpp b/stepmania/src/ThemeManager.cpp index 7e41f4ad37..91aca80bfd 100644 --- a/stepmania/src/ThemeManager.cpp +++ b/stepmania/src/ThemeManager.cpp @@ -145,11 +145,13 @@ try_element_again: static const char *sound_masks[] = { ".set", ".mp3", ".ogg", ".wav", ".redir", NULL }; static const char *font_masks[] = { " 16x16.png", ".redir", NULL }; static const char *numbers_masks[] = { " 5x3.png", ".redir", NULL }; + static const char *bganimations_masks[] = { ".", ".redir", NULL }; const char **asset_masks = NULL; if( sAssetCategory == "graphics" ) asset_masks = graphic_masks; else if( sAssetCategory == "sounds" ) asset_masks = sound_masks; else if( sAssetCategory == "fonts" ) asset_masks = font_masks; else if( sAssetCategory == "numbers" ) asset_masks = numbers_masks; + else if( sAssetCategory == "bganimations" ) asset_masks = bganimations_masks; else ASSERT(0); // Unknown theme asset category int i; for(i = 0; asset_masks[i]; ++i)