From 64714a056632f9eba5928ec3d361d1be4ce3443b Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sun, 23 Jan 2005 18:21:30 +0000 Subject: [PATCH] implement NoteDataUtil::LoadTransformedSlidingWindow (not NoteDataUtil::LoadOverlapped) without 4s. Slight change of behavior: if a hold note overlaps the spot where we want to shift the offset, instead of leaving the offset where it is for another full four measures, we'll try to change it again at the next measure change. This reduces the cases where hold notes can prevent the offset from changing for long periods. --- stepmania/src/NoteDataUtil.cpp | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/stepmania/src/NoteDataUtil.cpp b/stepmania/src/NoteDataUtil.cpp index 5ce9f4ea94..7727875eb1 100644 --- a/stepmania/src/NoteDataUtil.cpp +++ b/stepmania/src/NoteDataUtil.cpp @@ -265,7 +265,7 @@ void NoteDataUtil::LoadTransformedSlidingWindow( const NoteData &in, NoteData &o } NoteData Original; - Original.To4s( in ); + Original.To2sAnd3s( in ); out.Config( in ); out.SetNumTracks( iNewNumTracks ); @@ -277,28 +277,22 @@ void NoteDataUtil::LoadTransformedSlidingWindow( const NoteData &in, NoteData &o int bOffsetIncreasing = true; int iLastMeasure = 0; + int iMeasuresSinceChange = 0; FOREACH_NONEMPTY_ROW_ALL_TRACKS( Original, r ) { - // copy notes in this measure - for( int t=0; t= 4 ) // adjust sliding window every 4 measures at most { // See if there is a hold crossing the beginning of this measure bool bHoldCrossesThisMeasure = false; - if( r ) for( int t=0; t