[splittiming] Force tidying up of the song.

This will force tidying up of the timing,
thus stopping the SpeedSegment crashes.
This commit is contained in:
Jason Felds
2011-05-16 23:44:06 -04:00
parent 2526413d45
commit 9701b60910
7 changed files with 10 additions and 5 deletions
+1 -1
View File
@@ -656,7 +656,7 @@ bool DWILoader::LoadFromDir( const RString &sPath_, Song &out, set<RString> &Bla
// do nothing. We don't care about this value name
}
}
out.TidyUpData();
return true;
}
+1
View File
@@ -702,6 +702,7 @@ bool KSFLoader::LoadFromDir( const RString &sDir, Song &out )
out.AddSteps( pNewNotes );
}
out.TidyUpData();
return true;
}
+2 -1
View File
@@ -883,7 +883,7 @@ skip_track:
pSteps->SetNoteData( noteData );
songOut.AddSteps( pSteps );
}
return true;
}
@@ -956,6 +956,7 @@ bool MidiLoader::LoadFromDir( const RString &sDir, Song &out )
if( !LoadFromMidi(sDir+vsFiles[0], out) )
return false;
out.TidyUpData();
return true;
}
+1 -1
View File
@@ -940,7 +940,7 @@ bool PMSLoader::LoadFromDir( const RString &sDir, Song &out )
ConvertString( out.m_sArtist, "utf-8,japanese" );
ConvertString( out.m_sGenre, "utf-8,japanese" );
out.TidyUpData();
return true;
}
+2 -1
View File
@@ -753,7 +753,7 @@ bool SMLoader::LoadFromSMFile( const RString &sPath, Song &out, bool bFromCache
else
LOG->UserLog( "Song file", sPath, "has an unexpected value named \"%s\".", sValueName.c_str() );
}
TidyUpData( out, bFromCache );
return true;
}
@@ -946,6 +946,7 @@ void SMLoader::TidyUpData( Song &song, bool bFromCache )
bg.push_back( BackgroundChange(song.m_fLastBeat,song.m_sBackgroundFile) );
} while(0);
}
song.TidyUpData();
}
/*
+2 -1
View File
@@ -711,7 +711,8 @@ bool SMALoader::LoadFromSMAFile( const RString &sPath, Song &out )
else
LOG->UserLog( "Song file", sPath, "has an unexpected value named \"%s\".", sValueName.c_str() );
}
TidyUpData(out, false);
out.TidyUpData();
return true;
}
+1
View File
@@ -625,6 +625,7 @@ bool SSCLoader::LoadFromSSCFile( const RString &sPath, Song &out, bool bFromCach
}
}
out.m_fVersion = STEPFILE_VERSION_NUMBER;
TidyUpData(out, bFromCache);
return true;
}