Eh, better off just not *loading* incomplete songs than adding

cases for it elsewhere.  (Not going to do that until I have a place
to put warnings, though.)
This commit is contained in:
Glenn Maynard
2002-09-07 06:32:12 +00:00
parent e992012de2
commit e32ed54af2
+3 -10
View File
@@ -412,12 +412,9 @@ void Song::TidyUpData()
throw RageException( "The song in '%s' is missing a music file. You must place a music file in the song folder or remove the song", m_sSongDir ); throw RageException( "The song in '%s' is missing a music file. You must place a music file in the song folder or remove the song", m_sSongDir );
} }
if(m_sMusicFile != "") { RageSoundStream sound;
RageSoundStream sound; sound.Load( GetMusicPath() );
sound.Load( GetMusicPath() ); m_fMusicLengthSeconds = sound.GetLengthSeconds();
m_fMusicLengthSeconds = sound.GetLengthSeconds();
}
// //
@@ -572,10 +569,6 @@ void Song::GetNotesThatMatch( const StyleDef *s, int p, CArray<Notes*, Notes*>&
/* Return whether the song is playable in the given style. */ /* Return whether the song is playable in the given style. */
bool Song::SongCompleteForStyle( const StyleDef *st ) const bool Song::SongCompleteForStyle( const StyleDef *st ) const
{ {
/* If we don't have music, we're not complete. */
if(m_sMusicFile == "")
return false;
for( int pn = 0; pn < NUM_PLAYERS; ++pn ) for( int pn = 0; pn < NUM_PLAYERS; ++pn )
{ {
if(st->m_NotesTypes[pn] == NOTES_TYPE_INVALID) continue; /* unused */ if(st->m_NotesTypes[pn] == NOTES_TYPE_INVALID) continue; /* unused */