NoteField::m_fBeginMarker, m_fEndMarker -> m_iBeginMarker, m_iEndMarker
go back to storing BPM as a float, until I'm sure it won't cause precision problems
This commit is contained in:
@@ -146,8 +146,7 @@ bool KSFLoader::LoadFromKSFFile( const CString &sPath, Steps &out, const Song &s
|
||||
}
|
||||
|
||||
int iHoldStartRow[13];
|
||||
int t;
|
||||
for( t=0; t<13; t++ )
|
||||
for( int t=0; t<13; t++ )
|
||||
iHoldStartRow[t] = -1;
|
||||
|
||||
for( unsigned r=0; r<asRows.size(); r++ )
|
||||
@@ -203,7 +202,10 @@ bool KSFLoader::LoadFromKSFFile( const CString &sPath, Steps &out, const Song &s
|
||||
{
|
||||
case '0': tap = TAP_EMPTY; break;
|
||||
case '1': tap = TAP_ORIGINAL_TAP; break;
|
||||
default: ASSERT(0); tap = TAP_EMPTY; break;
|
||||
default:
|
||||
LOG->Warn( "File %s had an invalid row (\"%s\"); corrupt notes ignored",
|
||||
sPath.c_str(), sRowString.c_str() );
|
||||
return false;
|
||||
}
|
||||
|
||||
notedata.SetTapNote(t, row, tap);
|
||||
@@ -283,7 +285,7 @@ bool KSFLoader::LoadGlobalData( const CString &sPath, Song &out )
|
||||
if( 0==stricmp(sValueName,"TITLE") )
|
||||
LoadTags(sParams[1], out);
|
||||
else if( 0==stricmp(sValueName,"BPM") )
|
||||
out.AddBPMSegment( BPMSegment(0, BeatToNoteRow(strtof(sParams[1], NULL))) );
|
||||
out.AddBPMSegment( BPMSegment(0, strtof(sParams[1], NULL)) );
|
||||
else if( 0==stricmp(sValueName,"BPM2") )
|
||||
BPM2 = strtof( sParams[1], NULL );
|
||||
else if( 0==stricmp(sValueName,"BPM3") )
|
||||
@@ -310,7 +312,7 @@ bool KSFLoader::LoadGlobalData( const CString &sPath, Song &out )
|
||||
const float beat = BPMPos2 * BeatsPerSecond;
|
||||
LOG->Trace("BPM %f, BPS %f, BPMPos2 %f, beat %f",
|
||||
out.GetBPMAtBeat(0), BeatsPerSecond, BPMPos2, beat);
|
||||
out.AddBPMSegment( BPMSegment(BeatToNoteRow(beat), BeatToNoteRow(BPM2)) );
|
||||
out.AddBPMSegment( BPMSegment(BeatToNoteRow(beat), BPM2) );
|
||||
}
|
||||
|
||||
if( BPM3 > 0 && BPMPos3 > 0 )
|
||||
@@ -319,7 +321,7 @@ bool KSFLoader::LoadGlobalData( const CString &sPath, Song &out )
|
||||
const float beat = BPMPos3 * BeatsPerSecond;
|
||||
LOG->Trace("BPM %f, BPS %f, BPMPos3 %f, beat %f",
|
||||
out.GetBPMAtBeat(0), BeatsPerSecond, BPMPos3, beat);
|
||||
out.AddBPMSegment( BPMSegment(BeatToNoteRow(beat), BeatToNoteRow(BPM3)) );
|
||||
out.AddBPMSegment( BPMSegment(BeatToNoteRow(beat), BPM3) );
|
||||
}
|
||||
|
||||
/* Try to fill in missing bits of information from the pathname. */
|
||||
|
||||
Reference in New Issue
Block a user