From a88c866164be0eb74219263fd37f254cdf1b0483 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Sun, 12 Jan 2003 02:10:55 +0000 Subject: [PATCH] fixed: inaccurate boo timing, generous AAA grade, ugly scrolling grades on ScreenEvaluation --- stepmania/src/GameConstantsAndTypes.h | 2 +- stepmania/src/GameState.cpp | 12 ++++++++++-- stepmania/src/GradeDisplay.cpp | 6 ++++-- stepmania/src/Player.cpp | 6 ++---- 4 files changed, 17 insertions(+), 9 deletions(-) diff --git a/stepmania/src/GameConstantsAndTypes.h b/stepmania/src/GameConstantsAndTypes.h index e5dc2bd39d..6be41c8d16 100644 --- a/stepmania/src/GameConstantsAndTypes.h +++ b/stepmania/src/GameConstantsAndTypes.h @@ -132,7 +132,7 @@ inline int TapNoteScoreToDancePoints( TapNoteScore tns ) { switch( tns ) { - case TNS_MARVELOUS: return +3; + case TNS_MARVELOUS: return +2; // this should be +3, but only in Oni. Figure out how to support this later case TNS_PERFECT: return +2; case TNS_GREAT: return +1; case TNS_GOOD: return +0; diff --git a/stepmania/src/GameState.cpp b/stepmania/src/GameState.cpp index 85f40da961..0b60778c6e 100644 --- a/stepmania/src/GameState.cpp +++ b/stepmania/src/GameState.cpp @@ -343,8 +343,16 @@ Grade GameState::GetCurrentGrade( PlayerNumber pn ) LOG->Trace( "iPossibleDancePoints: %i", m_iPossibleDancePoints[pn] ); LOG->Trace( "fPercentDancePoints: %f", fPercentDancePoints ); - if ( fPercentDancePoints >= 1+1/3.0f ) return GRADE_AAAA; - if ( fPercentDancePoints >= 1.00 ) return GRADE_AAA; + // check for "AAAA" + if( m_TapNoteScores[pn][TNS_MARVELOUS] > 0 && + m_TapNoteScores[pn][TNS_PERFECT] == 0 && + m_TapNoteScores[pn][TNS_GREAT] == 0 && + m_TapNoteScores[pn][TNS_GOOD] == 0 && + m_TapNoteScores[pn][TNS_BOO] == 0 && + m_TapNoteScores[pn][TNS_MISS] == 0 ) + return GRADE_AAAA; + + if ( fPercentDancePoints == 1.00 ) return GRADE_AAA; else if( fPercentDancePoints >= 0.93 ) return GRADE_AA; else if( fPercentDancePoints >= 0.80 ) return GRADE_A; else if( fPercentDancePoints >= 0.65 ) return GRADE_B; diff --git a/stepmania/src/GradeDisplay.cpp b/stepmania/src/GradeDisplay.cpp index 5b4fc7b6c8..fb7ca7b2e7 100644 --- a/stepmania/src/GradeDisplay.cpp +++ b/stepmania/src/GradeDisplay.cpp @@ -19,14 +19,16 @@ const float SCROLL_TIME = 5.0f; const float QUICK_SCROLL_TIME = .25f; -const int NUM_GRADE_FRAMES = 7; +const int NUM_GRADE_FRAMES = 8; const float GRADE_FRAME_HEIGHT = 1/(float)NUM_GRADE_FRAMES; const float GRADES_TO_SCROLL = NUM_GRADE_FRAMES*4; GradeDisplay::GradeDisplay() { - Load( THEME->GetPathTo("Graphics","evaluation grades 1x8") ); + RageTextureID id( THEME->GetPathTo("Graphics",ssprintf("evaluation grades 1x%d",NUM_GRADE_FRAMES)) ); + id.bStretch = true; + Load( id ); StopAnimating(); m_fTimeLeftInScroll = 0; diff --git a/stepmania/src/Player.cpp b/stepmania/src/Player.cpp index 691bd2bd79..28f3ce1299 100644 --- a/stepmania/src/Player.cpp +++ b/stepmania/src/Player.cpp @@ -400,9 +400,8 @@ void Player::Step( int col ) // compute the score for this hit const float fStepBeat = NoteRowToBeat( (float)iIndexOverlappingNote ); const float fBeatsUntilStep = fStepBeat - fSongBeat; - const float fSecondsFromPerfect = fabsf( fBeatsUntilStep / GAMESTATE->m_fCurBPS ); -// const float fPercentFromPerfect = fabsf( fBeatsUntilStep / GetMaxBeatDifference() ); const float fNoteOffset = fBeatsUntilStep / GAMESTATE->m_fCurBPS; //the offset from the actual step in seconds + const float fSecondsFromPerfect = fabsf( fNoteOffset ); TapNoteScore score; @@ -412,8 +411,7 @@ void Player::Step( int col ) else if( fSecondsFromPerfect <= PREFSMAN->m_fJudgeWindowPerfectSeconds ) score = TNS_PERFECT; else if( fSecondsFromPerfect <= PREFSMAN->m_fJudgeWindowGreatSeconds ) score = TNS_GREAT; else if( fSecondsFromPerfect <= PREFSMAN->m_fJudgeWindowGoodSeconds ) score = TNS_GOOD; - //we have to mark boo's as better than MISS's now that the window is expanded - else if( fSecondsFromPerfect <= 1.0f ) score = TNS_BOO; + else if( fSecondsFromPerfect <= PREFSMAN->m_fJudgeWindowBooSeconds ) score = TNS_BOO; else score = TNS_NONE; if( !GAMESTATE->m_bEditing && (GAMESTATE->m_bDemonstration || PREFSMAN->m_bAutoPlay) )