evil big commit (sorry):

Remove m_HoldNote array entirely.  Remove 2sAnd3s.  Store hold note
durations in the hold head.  hold_tail only still exists when InsertHoldTails
is used, to make SM parsing a little easier (may go away).  Add helpers
for iterating over ranges while including or excluding adjacent and overlapping
hold notes.  Range operations are now [start,end) instead of [start,end].
(probably more details coming to sm-dev soon)
This commit is contained in:
Glenn Maynard
2005-01-25 05:02:35 +00:00
parent 6ece8829c4
commit bb7482e722
12 changed files with 771 additions and 762 deletions
+5 -12
View File
@@ -28,14 +28,13 @@ void KSFLoader::RemoveHoles( NoteData &out, const Song &song )
// else
// LastRow = out.GetLastRow();
NoteData tmp;
tmp.SetNumTracks(out.GetNumTracks());
tmp.CopyRange( &out, FromRow, out.GetLastRow() );
out.ClearRange( FromRow, out.GetLastRow() );
out.CopyRange( &tmp, 0, tmp.GetLastRow(), ToRow );
tmp.SetNumTracks( out.GetNumTracks() );
tmp.CopyRange( &out, FromRow, MAX_NOTE_ROW );
out.ClearRange( FromRow, MAX_NOTE_ROW );
out.CopyRange( &tmp, 0, MAX_NOTE_ROW, ToRow );
}
/*
out.ConvertHoldNotesTo2sAnd3s();
for( t = 0; t < notedata.GetNumTracks(); ++t )
{
const float CurBPM = song.GetBPMAtBeat( NoteRowToBeat(row) );
@@ -54,7 +53,6 @@ void KSFLoader::RemoveHoles( NoteData &out, const Song &song )
notedata.SetTapNote( t, row, TAP_EMPTY );
}
}
out.Convert2sAnd3sToHoldNotes();
*/
}
#endif
@@ -188,12 +186,7 @@ bool KSFLoader::LoadFromKSFFile( const CString &sPath, Steps &out, const Song &s
if( iHoldStartRow[t] != -1 ) // this ends the hold
{
HoldNote hn (
t, /* button */
BeatToNoteRow(iHoldStartRow[t]/(float)iTickCount), /* start */
BeatToNoteRow((r-1)/(float)iTickCount) /* end */
);
notedata.AddHoldNote( hn );
notedata.AddHoldNote( t, BeatToNoteRow(iHoldStartRow[t]/(float)iTickCount), BeatToNoteRow((r-1)/(float)iTickCount), TAP_ORIGINAL_HOLD_HEAD );
iHoldStartRow[t] = -1;
}