This commit is contained in:
Glenn Maynard
2004-03-08 05:11:26 +00:00
parent 0f8d41e7ed
commit c5d53f7611
+7 -7
View File
@@ -143,10 +143,10 @@ bool BMSLoader::LoadFromBMSFile( const CString &sPath, Steps &out )
pNoteData->SetNumTracks( MAX_NOTE_TRACKS ); pNoteData->SetNumTracks( MAX_NOTE_TRACKS );
ResetTracksMagic(); ResetTracksMagic();
RageFile file(sPath); RageFile file;
if( !file.Open(sPath) )
RageException::Throw( "Failed to open \"%s\": %s", sPath.c_str(), file.GetError().c_str() );
if (!file.IsOpen())
RageException::Throw("Failed to open %s for reading.", sPath.c_str());
while( !file.AtEOF() ) while( !file.AtEOF() )
{ {
CString line = file.GetLine(); CString line = file.GetLine();
@@ -195,7 +195,7 @@ bool BMSLoader::LoadFromBMSFile( const CString &sPath, Steps &out )
out.m_StepsType = STEPS_TYPE_DANCE_DOUBLE; out.m_StepsType = STEPS_TYPE_DANCE_DOUBLE;
break; break;
default: default:
LOG->Warn( "Invalid value '%d' for '#player'", atoi(value_data) ); LOG->Warn( "Invalid #PLAYER in \"%s\": \"%s\"", sPath.c_str(), value_data.c_str() );
delete pNoteData; delete pNoteData;
return false; return false;
} }
@@ -278,7 +278,7 @@ bool BMSLoader::LoadFromBMSFile( const CString &sPath, Steps &out )
// we're done reading in all of the BMS values // we're done reading in all of the BMS values
if( out.m_StepsType == STEPS_TYPE_INVALID ) if( out.m_StepsType == STEPS_TYPE_INVALID )
{ {
LOG->Warn("Couldn't determine note types of file '%s'", sPath.c_str() ); LOG->Warn( "Couldn't determine note type of file '%s'", sPath.c_str() );
delete pNoteData; delete pNoteData;
return false; return false;
} }
@@ -603,7 +603,7 @@ bool BMSLoader::LoadFromDir( CString sDir, Song &out )
} }
if( fBPM == -1 ) // we didn't find the line we were looking for if( fBPM == -1 ) // we didn't find the line we were looking for
LOG->Trace( "WARNING: Couldn't find tag '%s' in '%s'.", sTagToLookFor.c_str(), sPath.c_str() ); LOG->Warn( "Couldn't find tag '%s' in '%s'.", sTagToLookFor.c_str(), sPath.c_str() );
else else
{ {
BPMSegment newSeg( NoteRowToBeat(iStepIndex), fBPM ); BPMSegment newSeg( NoteRowToBeat(iStepIndex), fBPM );
@@ -679,7 +679,7 @@ bool BMSLoader::LoadFromDir( CString sDir, Song &out )
if( fFreezeSecs == -1 ) // we didn't find the line we were looking for if( fFreezeSecs == -1 ) // we didn't find the line we were looking for
{ {
LOG->Trace( "WARNING: Couldn't find tag '%s' in '%s'.", sTagToLookFor.c_str(), sPath.c_str() ); LOG->Warn( "Couldn't find tag '%s' in '%s'.", sTagToLookFor.c_str(), sPath.c_str() );
} }
else else
{ {