diff --git a/stepmania/src/Judgement.cpp b/stepmania/src/Judgement.cpp index 934015df89..bf1a5f8d68 100644 --- a/stepmania/src/Judgement.cpp +++ b/stepmania/src/Judgement.cpp @@ -13,7 +13,7 @@ #include "RageUtil.h" #include "GameConstantsAndTypes.h" #include "ThemeManager.h" - +#include "GameManager.h" const float JUDGEMENT_DISPLAY_TIME = 0.8f; @@ -59,6 +59,17 @@ void Judgement::SetJudgement( TapNoteScore score ) default: ASSERT( false ); } + if ( GAMEMAN->m_CurGame == GAME_EZ2 ) // Resize Judgement graphics for Ez2. + { + m_sprJudgement.SetHeight( 22.0f * 2.1f ); + m_sprJudgement.SetWidth( 143.0f * 2.1f ); + if ( score == TNS_PERFECT || score == TNS_GREAT ) + { + m_sprJudgement.SetHeight( 22.0f * 2.6f ); + m_sprJudgement.SetWidth( 143.0f * 2.8f ); + } + } + m_fDisplayCountdown = JUDGEMENT_DISPLAY_TIME; m_sprJudgement.SetEffectNone(); diff --git a/stepmania/src/ScoreDisplayRolling.cpp b/stepmania/src/ScoreDisplayRolling.cpp index f742fac0bc..c488f78c18 100644 --- a/stepmania/src/ScoreDisplayRolling.cpp +++ b/stepmania/src/ScoreDisplayRolling.cpp @@ -15,7 +15,7 @@ #include "RageLog.h" #include "ThemeManager.h" #include "RageLog.h" - +#include "PrefsManager.h" const float SCORE_TWEEN_TIME = 0.5f; @@ -79,6 +79,11 @@ void ScoreDisplayRolling::Update( float fDeltaTime ) void ScoreDisplayRolling::Draw() { + if( PREFSMAN->m_bAutoPlay ) + { + m_fScore = 0 ; + } // No Scoring on Autoplay! + if( m_fScore == 0 ) { CString sFormat = ssprintf( "%%%d.0d", NUM_SCORE_DIGITS ); diff --git a/stepmania/src/ScreenEvaluation.cpp b/stepmania/src/ScreenEvaluation.cpp index dfd47c5820..21792f1a6c 100644 --- a/stepmania/src/ScreenEvaluation.cpp +++ b/stepmania/src/ScreenEvaluation.cpp @@ -32,8 +32,10 @@ const float GRADE_Y = BANNER_Y; const float JUDGE_LABELS_X = CENTER_X; const float JUDGE_NUMBERS_X[NUM_PLAYERS]= { CENTER_X-88, CENTER_X+88 }; +const float JUDGE_NUMBERS_X_EZ2[NUM_PLAYERS]= { CENTER_X-88, CENTER_X+68 }; const float JUDGE_START_Y = CENTER_Y - 70; const float JUDGE_SPACING = 32; +const float JUDGE_EZ2_COOL_Y = CENTER_Y - 80; const float SCORE_LABEL_X = CENTER_X; const float SCORE_DISPLAY_X[NUM_PLAYERS]= { CENTER_X-170, CENTER_X+170 }; @@ -116,45 +118,46 @@ ScreenEvaluation::ScreenEvaluation( bool bSummary ) } - - /////////////////////////// - // Init the song banners depending on m_ResultMode - /////////////////////////// - switch( m_ResultMode ) + if (GAMEMAN->m_CurGame != GAME_EZ2 ) { - case RM_ARCADE_STAGE: - m_BannerWithFrame[0].LoadFromSong( SONGMAN->GetCurrentSong() ); - m_BannerWithFrame[0].SetXY( BANNER_X, BANNER_Y ); - this->AddActor( &m_BannerWithFrame[0] ); - break; - case RM_ARCADE_SUMMARY: + /////////////////////////// + // Init the song banners depending on m_ResultMode + /////////////////////////// + switch( m_ResultMode ) { - // crop down to 3 - for( int p=0; pm_aGameplayStatistics[p].GetSize() > STAGES_TO_SHOW_IN_SUMMARY ) - SONGMAN->m_aGameplayStatistics[p].RemoveAt( 0, SONGMAN->m_aGameplayStatistics[p].GetSize() - STAGES_TO_SHOW_IN_SUMMARY ); - - const int iSongsToShow = SONGMAN->m_aGameplayStatistics[0].GetSize(); - ASSERT( iSongsToShow > 0 ); - - for( int i=0; iGetCurrentSong() ); + m_BannerWithFrame[0].SetXY( BANNER_X, BANNER_Y ); + this->AddActor( &m_BannerWithFrame[0] ); + break; + case RM_ARCADE_SUMMARY: { - GameplayStatistics &GS = SONGMAN->m_aGameplayStatistics[0][i]; - m_BannerWithFrame[i].LoadFromSong( GS.pSong ); - float fBannerOffset = i - (iSongsToShow-1)/2.0f; - m_BannerWithFrame[i].SetXY( BANNER_X + fBannerOffset*32, BANNER_Y + fBannerOffset*16 ); - m_BannerWithFrame[i].SetZoom( 0.70f ); - this->AddActor( &m_BannerWithFrame[i] ); - } - } - break; - case RM_ONI: - m_BannerWithFrame[0].LoadFromGroup( SONGMAN->m_sPreferredGroup ); - m_BannerWithFrame[0].SetXY( BANNER_X, BANNER_Y ); - this->AddActor( &m_BannerWithFrame[0] ); - break; - } + // crop down to 3 + for( int p=0; pm_aGameplayStatistics[p].GetSize() > STAGES_TO_SHOW_IN_SUMMARY ) + SONGMAN->m_aGameplayStatistics[p].RemoveAt( 0, SONGMAN->m_aGameplayStatistics[p].GetSize() - STAGES_TO_SHOW_IN_SUMMARY ); + const int iSongsToShow = SONGMAN->m_aGameplayStatistics[0].GetSize(); + ASSERT( iSongsToShow > 0 ); + + for( int i=0; im_aGameplayStatistics[0][i]; + m_BannerWithFrame[i].LoadFromSong( GS.pSong ); + float fBannerOffset = i - (iSongsToShow-1)/2.0f; + m_BannerWithFrame[i].SetXY( BANNER_X + fBannerOffset*32, BANNER_Y + fBannerOffset*16 ); + m_BannerWithFrame[i].SetZoom( 0.70f ); + this->AddActor( &m_BannerWithFrame[i] ); + } + } + break; + case RM_ONI: + m_BannerWithFrame[0].LoadFromGroup( SONGMAN->m_sPreferredGroup ); + m_BannerWithFrame[0].SetXY( BANNER_X, BANNER_Y ); + this->AddActor( &m_BannerWithFrame[0] ); + break; + } + } @@ -170,15 +173,17 @@ ScreenEvaluation::ScreenEvaluation( bool bSummary ) this->AddActor( &m_Menu ); - for( l=0; lGetPathTo(GRAPHIC_EVALUATION_JUDGE_LABELS) ); - m_sprJudgeLabels[l].StopAnimating(); - m_sprJudgeLabels[l].SetState( l ); - m_sprJudgeLabels[l].SetXY( JUDGE_LABELS_X, JUDGE_START_Y + l*JUDGE_SPACING ); - m_sprJudgeLabels[l].SetZoom( 1.0f ); - this->AddActor( &m_sprJudgeLabels[l] ); + if (GAMEMAN->m_CurGame != GAME_EZ2) + { + m_sprJudgeLabels[l].Load( THEME->GetPathTo(GRAPHIC_EVALUATION_JUDGE_LABELS) ); + m_sprJudgeLabels[l].StopAnimating(); + m_sprJudgeLabels[l].SetState( l ); + m_sprJudgeLabels[l].SetXY( JUDGE_LABELS_X, JUDGE_START_Y + l*JUDGE_SPACING ); + m_sprJudgeLabels[l].SetZoom( 1.0f ); + this->AddActor( &m_sprJudgeLabels[l] ); + } for( int p=0; pm_CurGame == GAME_EZ2) // Change Position For Ez2dancer + { + m_textJudgeNumbers[l][p].SetXY( JUDGE_NUMBERS_X_EZ2[p], JUDGE_EZ2_COOL_Y); + } + else if (l == 2 && GAMEMAN->m_CurGame == GAME_EZ2) + { + m_textJudgeNumbers[l][p].SetXY( JUDGE_NUMBERS_X_EZ2[p], JUDGE_EZ2_COOL_Y + 55); + } + else if (l == 4 && GAMEMAN->m_CurGame == GAME_EZ2) + { + m_textJudgeNumbers[l][p].SetXY( JUDGE_NUMBERS_X_EZ2[p], JUDGE_EZ2_COOL_Y + 120); + } + else if ((l == 1 || l == 3 || l == 5) && GAMEMAN->m_CurGame == GAME_EZ2) + { + m_textJudgeNumbers[l][p].SetZoomX(0); // Hide These Ones + } + this->AddActor( &m_textJudgeNumbers[l][p] ); } } - m_sprScoreLabel.Load( THEME->GetPathTo(GRAPHIC_EVALUATION_SCORE_LABELS) ); - m_sprScoreLabel.StopAnimating(); - m_sprScoreLabel.SetXY( SCORE_LABEL_X, SCORE_Y ); - m_sprScoreLabel.SetZoom( 1.0f ); - this->AddActor( &m_sprScoreLabel ); + if (GAMEMAN->m_CurGame != GAME_EZ2) + { + m_sprScoreLabel.Load( THEME->GetPathTo(GRAPHIC_EVALUATION_SCORE_LABELS) ); + m_sprScoreLabel.StopAnimating(); + m_sprScoreLabel.SetXY( SCORE_LABEL_X, SCORE_Y ); + m_sprScoreLabel.SetZoom( 1.0f ); + this->AddActor( &m_sprScoreLabel ); + } for( p=0; pIsPlayerEnabled( (PlayerNumber)p ) ) + if( !GAMEMAN->IsPlayerEnabled( (PlayerNumber)p ) || GAMEMAN->m_CurGame == GAME_EZ2 ) continue; // skip m_ScoreDisplay[p].SetXY( SCORE_DISPLAY_X[p], SCORE_Y ); @@ -210,7 +239,6 @@ ScreenEvaluation::ScreenEvaluation( bool bSummary ) - Grade grade[NUM_PLAYERS]; ////////////////////////// @@ -252,6 +280,7 @@ ScreenEvaluation::ScreenEvaluation( bool bSummary ) GS[p].ng += GSstage.ng; GS[p].max_combo = max( GS[p].max_combo, GSstage.max_combo ); GS[p].score += GSstage.score; + for( int i=0; im_CurGame == GAME_EZ2) // Fake COOL! / GOOD / OOPS for Ez2dancer using the DDR Rankings. + { + GS[p].perfect += GS[p].great; + GS[p].great = 0; + GS[p].miss += GS[p].boo; + GS[p].boo = 0; + } grade[p] = GS[p].GetGrade(); m_textJudgeNumbers[0][p].SetText( ssprintf("%4d", GS[p].perfect) ); @@ -285,7 +318,6 @@ ScreenEvaluation::ScreenEvaluation( bool bSummary ) m_BonusInfoFrame[p].SetBonusInfo( (PlayerNumber)p, GS[p].fRadarPossible, GS[p].fRadarActual, GS[p].max_combo ); - switch( m_ResultMode ) { case RM_ARCADE_STAGE: @@ -337,7 +369,7 @@ ScreenEvaluation::ScreenEvaluation( bool bSummary ) for( p=0; pIsPlayerEnabled( (PlayerNumber)p ) ) + if( !GAMEMAN->IsPlayerEnabled( (PlayerNumber)p ) || GAMEMAN->m_CurGame == GAME_EZ2 ) continue; // skip m_sprGradeFrame[p].Load( THEME->GetPathTo(GRAPHIC_EVALUATION_GRADE_FRAME) ); @@ -440,11 +472,14 @@ void ScreenEvaluation::TweenOnScreen() for( i=0; im_CurGame != GAME_EZ2) + { + fOriginalY = m_sprJudgeLabels[i].GetY(); + m_sprJudgeLabels[i].SetY( fOriginalY + SCREEN_HEIGHT ); + m_sprJudgeLabels[i].BeginTweeningQueued( 0.2f + 0.1f*i ); + m_sprJudgeLabels[i].BeginTweeningQueued( MENU_ELEMENTS_TWEEN_TIME, Actor::TWEEN_BIAS_BEGIN ); + m_sprJudgeLabels[i].SetTweenY( fOriginalY ); + } for( int p=0; pm_CurGame != GAME_EZ2) { - fOriginalX = m_ScoreDisplay[p].GetX(); - m_ScoreDisplay[p].SetX( fOriginalX + SCREEN_WIDTH/2*(p==PLAYER_1 ? 1 : -1) ); - m_ScoreDisplay[p].BeginTweeningQueued( 0.8f + 0.1f*i ); - m_ScoreDisplay[p].BeginTweeningQueued( MENU_ELEMENTS_TWEEN_TIME, Actor::TWEEN_BIAS_BEGIN ); - m_ScoreDisplay[p].SetTweenX( fOriginalX ); + + fOriginalY = m_sprScoreLabel.GetY(); + m_sprScoreLabel.SetY( fOriginalY + SCREEN_HEIGHT ); + m_sprScoreLabel.BeginTweeningQueued( 0.8f + 0.1f*i ); + m_sprScoreLabel.BeginTweeningQueued( MENU_ELEMENTS_TWEEN_TIME, Actor::TWEEN_BIAS_BEGIN ); + m_sprScoreLabel.SetTweenY( fOriginalY ); + + for( p=0; pm_CurGame != GAME_EZ2) + { + m_sprJudgeLabels[i].BeginTweeningQueued( MENU_ELEMENTS_TWEEN_TIME, Actor::TWEEN_BIAS_END ); + m_sprJudgeLabels[i].SetTweenZoomY( 0 ); + } for( int p=0; pm_CurGame != GAME_EZ2) { - m_ScoreDisplay[p].BeginTweeningQueued( MENU_ELEMENTS_TWEEN_TIME, Actor::TWEEN_BIAS_END ); - m_ScoreDisplay[p].SetTweenZoomY( 0 ); - } + m_sprScoreLabel.BeginTweeningQueued( MENU_ELEMENTS_TWEEN_TIME, Actor::TWEEN_BIAS_END ); + m_sprScoreLabel.SetTweenZoomY( 0 ); + + for( p=0; pSetNewScreen( new ScreenEvaluation(false) ); + SCREENMAN->SetNewScreen( new ScreenEvaluation(false) ); break; diff --git a/stepmania/src/SongManager.cpp b/stepmania/src/SongManager.cpp index 24175dddf5..f82badbefa 100644 --- a/stepmania/src/SongManager.cpp +++ b/stepmania/src/SongManager.cpp @@ -50,7 +50,10 @@ SongManager::SongManager() SongManager::~SongManager() { - SaveStatisticsToDisk(); + if( !PREFSMAN->m_bAutoPlay ) // BUG FIX: Stats will no longer save if you're in autoplay mode - Andy. + { + SaveStatisticsToDisk(); + } FreeSongArray(); }