Changed ScreenSelectMusic and Song to look for preview.ogg and use it for a sample if it exists instead of the music file. Sample length still comes from simfile. Changed foreach_ordered to work on tables with string and number keys.

This commit is contained in:
Kyzentun
2015-03-01 15:40:16 -07:00
parent caa7d12204
commit 9381276fd3
5 changed files with 53 additions and 12 deletions
+2 -2
View File
@@ -1796,9 +1796,9 @@ void ScreenSelectMusic::AfterMusicChange()
case SampleMusicPreviewMode_Normal:
case SampleMusicPreviewMode_LastSong: // fall through
// play the sample music
m_sSampleMusicToPlay = pSong->GetMusicPath();
m_sSampleMusicToPlay = pSong->GetPreviewMusicPath();
m_pSampleMusicTimingData = &pSong->m_SongTiming;
m_fSampleStartSeconds = pSong->m_fMusicSampleStartSeconds;
m_fSampleStartSeconds = pSong->GetPreviewStartSeconds();
m_fSampleLengthSeconds = pSong->m_fMusicSampleLengthSeconds;
break;
default: