remove note capping in scoring data

This commit is contained in:
Glenn Maynard
2002-12-17 23:31:35 +00:00
parent cd49b75f54
commit cb10e7ece2
3 changed files with 14 additions and 12 deletions
+11 -9
View File
@@ -24,8 +24,10 @@ void NoteDataWithScoring::Init(int taps, int holds)
NoteData::Init(); NoteData::Init();
for( int t=0; t<MAX_NOTE_TRACKS; t++ ) for( int t=0; t<MAX_NOTE_TRACKS; t++ )
for( int i=0; i<MAX_TAP_NOTE_ROWS; i++ ) {
m_TapNoteScores[t][i] = TNS_NONE; m_TapNoteScores[t].clear();
m_TapNoteScores[t].insert(m_TapNoteScores[t].begin(), taps, TNS_NONE);
}
m_HoldNoteScores.clear(); m_HoldNoteScores.clear();
m_HoldNoteScores.insert(m_HoldNoteScores.begin(), holds, HNS_NONE); m_HoldNoteScores.insert(m_HoldNoteScores.begin(), holds, HNS_NONE);
@@ -39,10 +41,10 @@ int NoteDataWithScoring::GetNumTapNotesWithScore( TapNoteScore tns, const float
{ {
int iNumSuccessfulTapNotes = 0; int iNumSuccessfulTapNotes = 0;
int iStartIndex = BeatToNoteRow( fStartBeat ); unsigned iStartIndex = BeatToNoteRow( fStartBeat );
int iEndIndex = BeatToNoteRow( fEndBeat ); unsigned iEndIndex = BeatToNoteRow( fEndBeat );
for( int i=iStartIndex; i<min(iEndIndex, MAX_TAP_NOTE_ROWS); i++ ) for( unsigned i=iStartIndex; i<min(iEndIndex, m_TapNoteScores[0].size()); i++ )
{ {
for( int t=0; t<m_iNumTracks; t++ ) for( int t=0; t<m_iNumTracks; t++ )
{ {
@@ -58,10 +60,10 @@ int NoteDataWithScoring::GetNumDoublesWithScore( TapNoteScore tns, const float f
{ {
int iNumSuccessfulDoubles = 0; int iNumSuccessfulDoubles = 0;
int iStartIndex = BeatToNoteRow( fStartBeat ); unsigned iStartIndex = BeatToNoteRow( fStartBeat );
int iEndIndex = BeatToNoteRow( fEndBeat ); unsigned iEndIndex = BeatToNoteRow( fEndBeat );
for( int i=iStartIndex; i<min(iEndIndex, MAX_TAP_NOTE_ROWS); i++ ) for( unsigned i=iStartIndex; i<min(iEndIndex, m_TapNoteScores[0].size()); i++ )
{ {
int iNumNotesThisIndex = 0; int iNumNotesThisIndex = 0;
TapNoteScore minTapNoteScore = TNS_PERFECT; TapNoteScore minTapNoteScore = TNS_PERFECT;
@@ -160,7 +162,7 @@ float NoteDataWithScoring::GetActualChaosRadarValue( float fSongSeconds )
{ {
// count number of triplets // count number of triplets
int iNumChaosNotesCompleted = 0; int iNumChaosNotesCompleted = 0;
for( int r=0; r<MAX_TAP_NOTE_ROWS; r++ ) for( unsigned r=0; r<m_TapNoteScores[0].size(); r++ )
{ {
if( !IsRowEmpty(r) && IsRowComplete(r) && GetNoteType(r) >= NOTE_TYPE_12TH ) if( !IsRowEmpty(r) && IsRowComplete(r) && GetNoteType(r) >= NOTE_TYPE_12TH )
iNumChaosNotesCompleted++; iNumChaosNotesCompleted++;
+1 -1
View File
@@ -17,7 +17,7 @@
class NoteDataWithScoring : public NoteData class NoteDataWithScoring : public NoteData
{ {
// maintain this extra data in addition to the NoteData // maintain this extra data in addition to the NoteData
TapNoteScore m_TapNoteScores[MAX_NOTE_TRACKS][MAX_TAP_NOTE_ROWS]; vector<TapNoteScore> m_TapNoteScores[MAX_NOTE_TRACKS];
vector<HoldNoteScore> m_HoldNoteScores; vector<HoldNoteScore> m_HoldNoteScores;
+1 -1
View File
@@ -125,7 +125,7 @@ void Player::Load( PlayerNumber pn, NoteData* pNoteData, LifeMeter* pLM, ScoreDi
const StyleDef* pStyleDef = GAMESTATE->GetCurrentStyleDef(); const StyleDef* pStyleDef = GAMESTATE->GetCurrentStyleDef();
// init scoring // init scoring
NoteDataWithScoring::Init(pNoteData->GetNumTapNotes(), pNoteData->GetNumHoldNotes()); NoteDataWithScoring::Init(pNoteData->GetLastRow(), pNoteData->GetNumHoldNotes());
// copy note data // copy note data
this->CopyAll( pNoteData ); this->CopyAll( pNoteData );