From f89817e192ee844f11111f94c93025cf1aff2bbd Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Fri, 17 Jun 2005 00:58:51 +0000 Subject: [PATCH] committing old changes: no need for floating point in loading this --- stepmania/src/NotesLoaderKSF.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/stepmania/src/NotesLoaderKSF.cpp b/stepmania/src/NotesLoaderKSF.cpp index 9595aa9d64..1eb3089369 100644 --- a/stepmania/src/NotesLoaderKSF.cpp +++ b/stepmania/src/NotesLoaderKSF.cpp @@ -171,8 +171,7 @@ bool KSFLoader::LoadFromKSFFile( const CString &sPath, Steps &out, const Song &s sRowString.erase( 0, 2 ); // the length of a note in a row depends on TICKCOUNT - float fBeatThisRow = r/(float)iTickCount; - int row = BeatToNoteRow(fBeatThisRow); + int row = (r * ROWS_PER_BEAT) / iTickCount; for( int t=0; t < notedata.GetNumTracks(); t++ ) { if( sRowString[t] == '4' ) @@ -186,7 +185,9 @@ bool KSFLoader::LoadFromKSFFile( const CString &sPath, Steps &out, const Song &s if( iHoldStartRow[t] != -1 ) // this ends the hold { - notedata.AddHoldNote( t, BeatToNoteRow(iHoldStartRow[t]/(float)iTickCount), BeatToNoteRow((r-1)/(float)iTickCount), TAP_ORIGINAL_HOLD_HEAD ); + int iEndKSFRow = r-1; + int iEndRow = (iEndKSFRow * ROWS_PER_BEAT) / iTickCount; + notedata.AddHoldNote( t, iHoldStartRow[t], iEndRow , TAP_ORIGINAL_HOLD_HEAD ); iHoldStartRow[t] = -1; }