From 11e1d160089f8df174b9c43bfbed064a8ab8823a Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sun, 3 Nov 2002 21:38:22 +0000 Subject: [PATCH] use a vector for hold note scores --- stepmania/src/NoteDataWithScoring.cpp | 17 +++++++---------- stepmania/src/NoteDataWithScoring.h | 17 +++++++---------- stepmania/src/NoteField.cpp | 7 +------ stepmania/src/Player.cpp | 2 +- 4 files changed, 16 insertions(+), 27 deletions(-) diff --git a/stepmania/src/NoteDataWithScoring.cpp b/stepmania/src/NoteDataWithScoring.cpp index 4c340b4932..6a809362b0 100644 --- a/stepmania/src/NoteDataWithScoring.cpp +++ b/stepmania/src/NoteDataWithScoring.cpp @@ -19,23 +19,20 @@ NoteDataWithScoring::NoteDataWithScoring() Init(); } -void NoteDataWithScoring::Init() +void NoteDataWithScoring::Init(int taps, int holds) { NoteData::Init(); - InitScoringData(); -} -void NoteDataWithScoring::InitScoringData() -{ for( int t=0; t 0.0 when the HoldNote ends, then - // m_HoldScore becomes HSS_OK. - + vector m_HoldNoteScores; + /* 1.0 means this HoldNote has full life. + * 0.0 means this HoldNote is dead + * When this value hits 0.0 for the first time, m_HoldScore becomes HSS_NG. + * If the life is > 0.0 when the HoldNote ends, then m_HoldScore becomes HSS_OK. */ + vector m_fHoldNoteLife; // statistics int GetNumTapNotesWithScore( TapNoteScore tns, const float fStartBeat = 0, const float fEndBeat = MAX_BEATS ); diff --git a/stepmania/src/NoteField.cpp b/stepmania/src/NoteField.cpp index 1107583375..9e5d799512 100644 --- a/stepmania/src/NoteField.cpp +++ b/stepmania/src/NoteField.cpp @@ -51,7 +51,7 @@ void NoteField::Load( NoteData* pNoteData, PlayerNumber pn, int iPixelsToDrawBeh m_fPercentFadeToFail = -1; - NoteDataWithScoring::Init(); + NoteDataWithScoring::Init(pNoteData->GetNumTapNotes(), pNoteData->GetNumHoldNotes()); for( int i=0; iGetCurrentStyleDef()->m_iColsPerPlayer ); } diff --git a/stepmania/src/Player.cpp b/stepmania/src/Player.cpp index b6d7415153..55dd0fe443 100644 --- a/stepmania/src/Player.cpp +++ b/stepmania/src/Player.cpp @@ -117,7 +117,7 @@ void Player::Load( PlayerNumber pn, NoteData* pNoteData, LifeMeter* pLM, ScoreDi const StyleDef* pStyleDef = GAMESTATE->GetCurrentStyleDef(); // init scoring - NoteDataWithScoring::Init(); + NoteDataWithScoring::Init(pNoteData->GetNumTapNotes(), pNoteData->GetNumHoldNotes()); // copy note data this->CopyAll( pNoteData );