Added preview tag to NotesLoaderBMS. Changed Song to check the preview file for sample length instead of the simfile if the preview file is set.

This commit is contained in:
Kyzentun
2015-03-04 13:10:51 -07:00
parent 0318f07d2d
commit 46d215aed3
3 changed files with 23 additions and 1 deletions
+6
View File
@@ -773,6 +773,7 @@ struct BMSChartInfo {
RString stageFile;
RString musicFile;
RString overrideMusicFile;
RString previewFile;
map<int, RString> backgroundChanges;
};
@@ -894,6 +895,10 @@ void BMSChartReader::ReadHeaders()
{
info.overrideMusicFile = it->second;
}
else if (it->first == "#preview")
{
info.previewFile = it->second;
}
else if (it->first == "#offset")
{
out->m_Timing.m_fBeat0OffsetInSeconds = -StringToFloat(it->second);
@@ -1572,6 +1577,7 @@ void BMSSongLoader::AddToSong()
}
out->m_sMusicFile = main.info.musicFile;
out->m_PreviewFile= main.info.previewFile;
out->m_SongTiming = main.steps->m_Timing;
}