99% fix scoring with warps and fakes.

Now all charts can seek 100%.

This does force yet another cache reload.

Hopefully it won't slow first loads too much.
This commit is contained in:
Jason Felds
2011-06-08 16:14:11 -04:00
parent 06efa5c726
commit fc9f07158a
7 changed files with 43 additions and 10 deletions
+6
View File
@@ -8,6 +8,12 @@ ________________________________________________________________________________
StepMania 5.0 Preview 2 | 20110???
--------------------------------------------------------------------------------
2011/06/08
----------
* Any notes in a fake segment or warp segment are completely ignored for
scoring purposes. Now you can get 100% on your warping goodness!
[Wolfman2000]
2011/06/06
----------
* [PlayerOptions] Removed the ScoreDisplay mod choices. Use lua to make your
+21 -8
View File
@@ -9,6 +9,7 @@
#include "RageUtil.h"
#include "RageLog.h"
#include "XmlFile.h"
#include "GameState.h" // blame radar calculations.
#include "Foreach.h"
#include "RageUtil_AutoPtr.h"
@@ -467,7 +468,8 @@ int NoteData::GetNumTapNotes( int iStartIndex, int iEndIndex ) const
{
const TapNote &tn = GetTapNote(t, r);
if( tn.type != TapNote::empty && tn.type != TapNote::mine
&& tn.type != TapNote::lift && tn.type != TapNote::fake )
&& tn.type != TapNote::lift && tn.type != TapNote::fake
&& GAMESTATE->GetProcessedTimingData()->IsJudgableAtRow(r) )
iNumNotes++;
}
}
@@ -485,7 +487,7 @@ int NoteData::GetNumRowsWithTap( int iStartIndex, int iEndIndex ) const
{
int iNumNotes = 0;
FOREACH_NONEMPTY_ROW_ALL_TRACKS_RANGE( *this, r, iStartIndex, iEndIndex )
if( IsThereATapAtRow(r) )
if( IsThereATapAtRow(r) && GAMESTATE->GetProcessedTimingData()->IsJudgableAtRow(r) )
iNumNotes++;
return iNumNotes;
@@ -498,7 +500,8 @@ int NoteData::GetNumMines( int iStartIndex, int iEndIndex ) const
for( int t=0; t<GetNumTracks(); t++ )
{
FOREACH_NONEMPTY_ROW_IN_TRACK_RANGE( *this, t, r, iStartIndex, iEndIndex )
if( GetTapNote(t, r).type == TapNote::mine )
if( GetTapNote(t, r).type == TapNote::mine
&& GAMESTATE->GetProcessedTimingData()->IsJudgableAtRow(r))
iNumMines++;
}
@@ -509,7 +512,7 @@ int NoteData::GetNumRowsWithTapOrHoldHead( int iStartIndex, int iEndIndex ) cons
{
int iNumNotes = 0;
FOREACH_NONEMPTY_ROW_ALL_TRACKS_RANGE( *this, r, iStartIndex, iEndIndex )
if( IsThereATapOrHoldHeadAtRow(r) )
if( IsThereATapOrHoldHeadAtRow(r) && GAMESTATE->GetProcessedTimingData()->IsJudgableAtRow(r) )
iNumNotes++;
return iNumNotes;
@@ -560,7 +563,8 @@ int NoteData::GetNumRowsWithSimultaneousPresses( int iMinSimultaneousPresses, in
{
if( !RowNeedsAtLeastSimultaneousPresses(iMinSimultaneousPresses,r) )
continue;
if (!GAMESTATE->GetProcessedTimingData()->IsJudgableAtRow(r))
continue;
iNum++;
}
@@ -576,7 +580,10 @@ int NoteData::GetNumRowsWithSimultaneousTaps( int iMinTaps, int iStartIndex, int
for( int t=0; t<GetNumTracks(); t++ )
{
const TapNote &tn = GetTapNote(t, r);
if( tn.type != TapNote::mine && tn.type != TapNote::empty && tn.type != TapNote::fake ) // mines don't count
if( tn.type != TapNote::mine // mines don't count.
&& tn.type != TapNote::empty
&& tn.type != TapNote::fake
&& GAMESTATE->GetProcessedTimingData()->IsJudgableAtRow(r))
iNumNotesThisIndex++;
}
if( iNumNotesThisIndex >= iMinTaps )
@@ -598,6 +605,8 @@ int NoteData::GetNumHoldNotes( int iStartIndex, int iEndIndex ) const
if( lBegin->second.type != TapNote::hold_head ||
lBegin->second.subType != TapNote::hold_head_hold )
continue;
if (!GAMESTATE->GetProcessedTimingData()->IsJudgableAtRow(lBegin->first))
continue;
iNumHolds++;
}
}
@@ -616,6 +625,8 @@ int NoteData::GetNumRolls( int iStartIndex, int iEndIndex ) const
if( lBegin->second.type != TapNote::hold_head ||
lBegin->second.subType != TapNote::hold_head_roll )
continue;
if (!GAMESTATE->GetProcessedTimingData()->IsJudgableAtRow(lBegin->first))
continue;
iNumRolls++;
}
}
@@ -629,7 +640,8 @@ int NoteData::GetNumLifts( int iStartIndex, int iEndIndex ) const
for( int t=0; t<GetNumTracks(); t++ )
{
FOREACH_NONEMPTY_ROW_IN_TRACK_RANGE( *this, t, r, iStartIndex, iEndIndex )
if( GetTapNote(t, r).type == TapNote::lift )
if( GetTapNote(t, r).type == TapNote::lift
&& GAMESTATE->GetProcessedTimingData()->IsJudgableAtRow(r))
iNumLifts++;
}
@@ -643,7 +655,8 @@ int NoteData::GetNumFakes( int iStartIndex, int iEndIndex ) const
for( int t=0; t<GetNumTracks(); t++ )
{
FOREACH_NONEMPTY_ROW_IN_TRACK_RANGE( *this, t, r, iStartIndex, iEndIndex )
if( GetTapNote(t, r).type == TapNote::fake )
if( GetTapNote(t, r).type == TapNote::fake
|| !GAMESTATE->GetProcessedTimingData()->IsJudgableAtRow(r))
iNumFakes++;
}
+5
View File
@@ -799,6 +799,11 @@ RadarStats CalculateRadarStatsFast( const NoteData &in, RadarStats &out )
{
FOREACH_NONEMPTY_ROW_IN_TRACK_RANGE( in, t, r, 0, MAX_NOTE_ROW )
{
/* This function deals strictly with taps, jumps, hands, and quads.
* As such, all rows in here have to be judgable. */
if (!GAMESTATE->GetProcessedTimingData()->IsJudgableAtRow(r))
continue;
const TapNote &tn = in.GetTapNote(t, r);
switch( tn.type )
{
+4
View File
@@ -219,6 +219,8 @@ void ScoreKeeperNormal::OnNextSong( int iSongInCourseIndex, const Steps* pSteps,
ASSERT( m_iMaxPossiblePoints >= 0 );
m_iMaxScoreSoFar += m_iMaxPossiblePoints;
GAMESTATE->SetProcessedTimingData(const_cast<TimingData *>(&pSteps->m_Timing));
m_iNumTapsAndHolds = pNoteData->GetNumRowsWithTapOrHoldHead() + pNoteData->GetNumHoldNotes()
+ pNoteData->GetNumRolls();
@@ -232,6 +234,8 @@ void ScoreKeeperNormal::OnNextSong( int iSongInCourseIndex, const Steps* pSteps,
ASSERT( m_iPointBonus >= 0 );
m_iTapNotesHit = 0;
GAMESTATE->SetProcessedTimingData(NULL);
}
static int GetScore(int p, int Z, int S, int n)
+5
View File
@@ -1152,6 +1152,9 @@ void ScreenEdit::UpdateTextInfo()
sText += ssprintf( TAP_NOTE_TYPE_FORMAT.GetValue(), TAP_NOTE_TYPE.GetValue().c_str(), TapNoteTypeToString( m_selectedTap.type ).c_str() );
break;
}
GAMESTATE->SetProcessedTimingData(&m_pSteps->m_Timing);
sText += ssprintf( NUM_STEPS_FORMAT.GetValue(), TAP_STEPS.GetValue().c_str(), m_NoteDataEdit.GetNumTapNotes() );
sText += ssprintf( NUM_JUMPS_FORMAT.GetValue(), JUMPS.GetValue().c_str(), m_NoteDataEdit.GetNumJumps() );
sText += ssprintf( NUM_HANDS_FORMAT.GetValue(), HANDS.GetValue().c_str(), m_NoteDataEdit.GetNumHands() );
@@ -1182,6 +1185,8 @@ void ScreenEdit::UpdateTextInfo()
}
m_textInfo.SetText( sText );
GAMESTATE->SetProcessedTimingData(NULL);
}
void ScreenEdit::DrawPrimitives()
+1 -1
View File
@@ -2299,9 +2299,9 @@ void ScreenGameplay::SaveStats()
GAMESTATE->SetProcessedTimingData(&GAMESTATE->m_pCurSteps[pn]->m_Timing);
NoteDataUtil::CalculateRadarValues( nd, fMusicLen, rv );
pss.m_radarPossible += rv;
GAMESTATE->SetProcessedTimingData(NULL);
NoteDataWithScoring::GetActualRadarValues( nd, pss, fMusicLen, rv );
pss.m_radarActual += rv;
GAMESTATE->SetProcessedTimingData(NULL);
}
}
+1 -1
View File
@@ -41,7 +41,7 @@
* @brief The internal version of the cache for StepMania.
*
* Increment this value to invalidate the current cache. */
const int FILE_CACHE_VERSION = 179;
const int FILE_CACHE_VERSION = 180;
/** @brief How long does a song sample last by default? */
const float DEFAULT_MUSIC_SAMPLE_LENGTH = 12.f;