diff --git a/src/NoteField.cpp b/src/NoteField.cpp index f1e85ad126..2d193df715 100644 --- a/src/NoteField.cpp +++ b/src/NoteField.cpp @@ -209,23 +209,23 @@ void NoteField::Load( memset( m_pDisplays, 0, sizeof(m_pDisplays) ); FOREACH_EnabledPlayer( pn ) { - RString sNoteSkinLC = GAMESTATE->m_pPlayerState[pn]->m_PlayerOptions.GetCurrent().m_sNoteSkin; + sNoteSkinLower = GAMESTATE->m_pPlayerState[pn]->m_PlayerOptions.GetCurrent().m_sNoteSkin; // XXX: Re-setup sNoteSkinLower. Unsure if inserting the skin again is needed. - if (sNoteSkinLC.empty()) + if (sNoteSkinLower.empty()) { - sNoteSkinLC = GAMESTATE->m_pPlayerState[pn]->m_PlayerOptions.GetPreferred().m_sNoteSkin; + sNoteSkinLower = GAMESTATE->m_pPlayerState[pn]->m_PlayerOptions.GetPreferred().m_sNoteSkin; - if (sNoteSkinLC.empty()) + if (sNoteSkinLower.empty()) { - sNoteSkinLC = "default"; + sNoteSkinLower = "default"; } - m_NoteDisplays.insert(pair (sNoteSkinLC, badIdea)); + m_NoteDisplays.insert(pair (sNoteSkinLower, badIdea)); } - sNoteSkinLC.MakeLower(); - it = m_NoteDisplays.find( sNoteSkinLC ); - ASSERT_M( it != m_NoteDisplays.end(), sNoteSkinLC ); + sNoteSkinLower.MakeLower(); + it = m_NoteDisplays.find( sNoteSkinLower ); + ASSERT_M( it != m_NoteDisplays.end(), sNoteSkinLower ); m_pDisplays[pn] = it->second; } } @@ -1005,8 +1005,8 @@ void NoteField::DrawPrimitives() m_pNoteData->GetTapNoteRange( c, iFirstRowToDraw, iLastRowToDraw+1, begin, end ); for( ; begin != end; ++begin ) { - int j = begin->first; - const TapNote &tn = begin->second; //m_pNoteData->GetTapNote(c, j); + int q = begin->first; + const TapNote &tn = begin->second; //m_pNoteData->GetTapNote(c, q); // Switch modified by Wolfman2000, tested by Saturn2888 // Fixes hold head overlapping issue, but not the rolls. @@ -1031,10 +1031,11 @@ void NoteField::DrawPrimitives() // TRICKY: If boomerang is on, then all notes in the range // [iFirstRowToDraw,iLastRowToDraw] aren't necessarily visible. // Test every note to make sure it's on screen before drawing. - if( !IsOnScreen( NoteRowToBeat(j), c, iDrawDistanceAfterTargetsPixels, iDrawDistanceBeforeTargetsPixels ) ) + if( !IsOnScreen( NoteRowToBeat(q), c, iDrawDistanceAfterTargetsPixels, iDrawDistanceBeforeTargetsPixels ) ) continue; // skip - ASSERT_M( NoteRowToBeat(j) > -2000, ssprintf("%i %i %i, %f %f", j, iLastRowToDraw, iFirstRowToDraw, GAMESTATE->m_fSongBeat, GAMESTATE->m_fMusicSeconds) ); + ASSERT_M( NoteRowToBeat(q) > -2000, ssprintf("%i %i %i, %f %f", q, iLastRowToDraw, + iFirstRowToDraw, GAMESTATE->m_fSongBeat, GAMESTATE->m_fMusicSeconds) ); // See if there is a hold step that begins on this index. // Only do this if the noteskin cares. @@ -1043,7 +1044,7 @@ void NoteField::DrawPrimitives() { for( int c2=0; c2GetNumTracks(); c2++ ) { - if( m_pNoteData->GetTapNote(c2, j).type == TapNote::hold_head) + if( m_pNoteData->GetTapNote(c2, q).type == TapNote::hold_head) { bHoldNoteBeginsOnThisBeat = true; break; @@ -1053,15 +1054,18 @@ void NoteField::DrawPrimitives() bool bIsInSelectionRange = false; if( m_iBeginMarker!=-1 && m_iEndMarker!=-1 ) - bIsInSelectionRange = m_iBeginMarker<=i && idisplay[c].DrawTap( tn, c, NoteRowToBeat(i), bHoldNoteBeginsOnThisBeat, bUseAdditionColoring, bIsInSelectionRange ? fSelectedRangeGlow : m_fPercentFadeToFail, m_fYReverseOffsetPixels, iDrawDistanceAfterTargetsPixels, iDrawDistanceBeforeTargetsPixels, FADE_BEFORE_TARGETS_PERCENT ); + displayCols->display[c].DrawTap( tn, c, NoteRowToBeat(q), bHoldNoteBeginsOnThisBeat, + bUseAdditionColoring, bIsInSelectionRange ? fSelectedRangeGlow : m_fPercentFadeToFail, + m_fYReverseOffsetPixels, iDrawDistanceAfterTargetsPixels, iDrawDistanceBeforeTargetsPixels, + FADE_BEFORE_TARGETS_PERCENT ); - bool bNoteIsUpcoming = NoteRowToBeat(j) > GAMESTATE->m_fSongBeat; + bool bNoteIsUpcoming = NoteRowToBeat(q) > GAMESTATE->m_fSongBeat; bAnyUpcomingInThisCol |= bNoteIsUpcoming; }