encapsulate hold results in HoldNoteResult (HoldNoteScore + life)

instead of moving HoldNote::iStartRow forward while a hold note is
held, set HoldNoteResult::iLastHeldRow
fixes hold heads cycling through all note colors while held (wasn't very
visible due to the hold ghost) and GetSuccessfulHands bugs
This commit is contained in:
Glenn Maynard
2004-05-07 04:57:29 +00:00
parent fec42c1a21
commit 9c1a5f6957
6 changed files with 91 additions and 31 deletions
+3 -4
View File
@@ -543,8 +543,8 @@ void NoteField::DrawPrimitives()
if( hn.iTrack != c ) // this HoldNote doesn't belong to this column
continue;
const HoldNoteScore hns = GetHoldNoteScore( hn );
if( hns == HNS_OK ) // if this HoldNote was completed
const HoldNoteResult Result = GetHoldNoteResult( hn );
if( Result.hns == HNS_OK ) // if this HoldNote was completed
continue; // don't draw anything
// If no part of this HoldNote is on the screen, skip it
@@ -565,7 +565,6 @@ void NoteField::DrawPrimitives()
const bool bIsActive = m_ActiveHoldNotes[hn];
const bool bIsHoldingNote = m_HeldHoldNotes[hn];
const float fLife = GetHoldNoteLife( hn );
if( bIsActive )
SearchForSongBeat()->m_GhostArrowRow.SetHoldIsActive( hn.iTrack );
@@ -577,7 +576,7 @@ void NoteField::DrawPrimitives()
bIsInSelectionRange = hn.ContainedByRange( BeatToNoteRow( m_fBeginMarker ), BeatToNoteRow( m_fEndMarker ) );
NoteDisplayCols *nd = CurDisplay->second;
nd->display[c].DrawHold( hn, bIsHoldingNote, bIsActive, fLife, bIsInSelectionRange ? fSelectedRangeGlow : m_fPercentFadeToFail, false, m_fYReverseOffsetPixels );
nd->display[c].DrawHold( hn, bIsHoldingNote, bIsActive, Result, bIsInSelectionRange ? fSelectedRangeGlow : m_fPercentFadeToFail, false, m_fYReverseOffsetPixels );
}