From dbf1097d4dd93ca250b6c922f3e0c2b0f7cbd281 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Fri, 3 Dec 2004 23:39:50 +0000 Subject: [PATCH] eliminating brute-force search --- stepmania/src/ScreenGameplay.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/stepmania/src/ScreenGameplay.cpp b/stepmania/src/ScreenGameplay.cpp index 537fa1085f..f3ac52890f 100644 --- a/stepmania/src/ScreenGameplay.cpp +++ b/stepmania/src/ScreenGameplay.cpp @@ -1559,10 +1559,11 @@ void ScreenGameplay::UpdateLights() bCrossedABeat = fBeatLast != fBeatNow; - for( int r=iRowLastCrossed+1; r<=iRowNow; r++ ) // for each index we crossed since the last update - { - FOREACH_CabinetLight( cl ) - { + FOREACH_CabinetLight( cl ) + { + // for each index we crossed since the last update: + FOREACH_NONEMPTY_ROW_IN_TRACK_RANGE( m_CabinetLightsNoteData, cl, r, iRowLastCrossed+1, iRowNow ) + { bool bBlink = (m_CabinetLightsNoteData.GetTapNote( cl, r ).type != TapNote::empty ); bBlinkCabinetLight[cl] |= bBlink; }