Consistent user warnings.
This commit is contained in:
@@ -134,7 +134,7 @@ static RString FindLargestInitialSubstring( const RString &string1, const RStrin
|
||||
return string1.substr( 0, i );
|
||||
}
|
||||
|
||||
static StepsType DetermineStepsType( int iPlayer, const NoteData &nd )
|
||||
static StepsType DetermineStepsType( int iPlayer, const NoteData &nd, const RString &sPath )
|
||||
{
|
||||
ASSERT( NUM_BMS_TRACKS == nd.GetNumTracks() );
|
||||
|
||||
@@ -197,7 +197,7 @@ static StepsType DetermineStepsType( int iPlayer, const NoteData &nd )
|
||||
default: return STEPS_TYPE_INVALID;
|
||||
}
|
||||
default:
|
||||
LOG->UserLog( "Invalid #PLAYER value %d", iPlayer );
|
||||
LOG->UserLog( RageLog::LogType_SongFile, sPath, "has an invalid #PLAYER value %d.", iPlayer );
|
||||
return STEPS_TYPE_INVALID;
|
||||
}
|
||||
}
|
||||
@@ -394,7 +394,7 @@ bool BMSLoader::LoadFromBMSFile( const RString &sPath, const NameToData_t &mapNa
|
||||
ndNotes.SetTapNote( iTrack, iBegin, TAP_ORIGINAL_TAP );
|
||||
}
|
||||
|
||||
out.m_StepsType = DetermineStepsType( iPlayer, ndNotes );
|
||||
out.m_StepsType = DetermineStepsType( iPlayer, ndNotes, sPath );
|
||||
if( out.m_StepsType == STEPS_TYPE_BEAT_SINGLE5 && GetTagFromMap( mapNameToData, "#title", sData ) )
|
||||
{
|
||||
/* Hack: guess at 6-panel. */
|
||||
@@ -410,7 +410,7 @@ bool BMSLoader::LoadFromBMSFile( const RString &sPath, const NameToData_t &mapNa
|
||||
|
||||
if( out.m_StepsType == STEPS_TYPE_INVALID )
|
||||
{
|
||||
LOG->UserLog( "Couldn't determine note type of file '%s'", sPath.c_str() );
|
||||
LOG->UserLog( RageLog::LogType_SongFile, sPath, "has an unknown steps type" );
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -429,7 +429,7 @@ bool BMSLoader::LoadFromBMSFile( const RString &sPath, const NameToData_t &mapNa
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG->UserLog( "In BMS file \"%s\", there is no room to shift the autokeysound tracks.", sPath.c_str() );
|
||||
LOG->UserLog( RageLog::LogType_SongFile, sPath, "has no room to shift the autokeysound tracks." );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -556,7 +556,7 @@ bool BMSLoader::ReadBMSFile( const RString &sPath, NameToData_t &mapNameToData )
|
||||
RageFile file;
|
||||
if( !file.Open(sPath) )
|
||||
{
|
||||
LOG->UserLog( "Failed to open \"%s\" for reading: %s", sPath.c_str(), file.GetError().c_str() );
|
||||
LOG->UserLog( RageLog::LogType_SongFile, sPath, "couldn't be opened: %s", file.GetError().c_str() );
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -565,7 +565,7 @@ bool BMSLoader::ReadBMSFile( const RString &sPath, NameToData_t &mapNameToData )
|
||||
RString line;
|
||||
if( file.GetLine(line) == -1 )
|
||||
{
|
||||
LOG->UserLog( "Error reading \"%s\": %s", sPath.c_str(), file.GetError().c_str() );
|
||||
LOG->UserLog( RageLog::LogType_SongFile, sPath, "had a read error: %s", file.GetError().c_str() );
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -652,8 +652,8 @@ void BMSLoader::ReadGlobalTags( const NameToData_t &mapNameToData, Song &out )
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG->UserLog( "In BMS file \"%s\", there is an invalid BPM change at beat %f, BPM %f.",
|
||||
out.GetSongFilePath().c_str(), NoteRowToBeat(0), fBPM );
|
||||
LOG->UserLog( RageLog::LogType_SongFile, m_sDir, "has an invalid BPM change at beat %f, BPM %f.",
|
||||
NoteRowToBeat(0), fBPM );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -687,8 +687,7 @@ void BMSLoader::ReadGlobalTags( const NameToData_t &mapNameToData, Song &out )
|
||||
}
|
||||
}
|
||||
if( !IsAFile(out.GetSongDir()+sData) )
|
||||
LOG->UserLog( "Song \"%s\" references key \"%s\" that can't be found",
|
||||
m_sDir.c_str(), sData.c_str() );
|
||||
LOG->UserLog( RageLog::LogType_SongFile, m_sDir, "references key \"%s\" that can't be found", sData.c_str() );
|
||||
|
||||
sWavID.MakeUpper(); // HACK: undo the MakeLower()
|
||||
out.m_vsKeysoundFile.push_back( sData );
|
||||
@@ -735,8 +734,8 @@ void BMSLoader::ReadGlobalTags( const NameToData_t &mapNameToData, Song &out )
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG->UserLog( "In BMS file \"%s\", there is an invalid BPM change at beat %f, BPM %d.",
|
||||
out.GetSongFilePath().c_str(), fBeat, iVal );
|
||||
LOG->UserLog( RageLog::LogType_SongFile, m_sDir, "has an invalid BPM change at beat %f, BPM %d.",
|
||||
fBeat, iVal );
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -756,13 +755,13 @@ void BMSLoader::ReadGlobalTags( const NameToData_t &mapNameToData, Song &out )
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG->UserLog( "In BMS file \"%s\", there is an invalid BPM change at beat %f, BPM %f",
|
||||
out.GetSongFilePath().c_str(), fBeat, fBPM );
|
||||
LOG->UserLog( RageLog::LogType_SongFile, m_sDir, "has an invalid BPM change at beat %f, BPM %f",
|
||||
fBeat, fBPM );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG->UserLog( "Couldn't find tag '%s' in '%s'.", sTagToLookFor.c_str(), m_sDir.c_str() );
|
||||
LOG->UserLog( RageLog::LogType_SongFile, m_sDir, "has tag \"%s\" which cannot be found.", sTagToLookFor.c_str() );
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -783,7 +782,7 @@ void BMSLoader::ReadGlobalTags( const NameToData_t &mapNameToData, Song &out )
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG->UserLog( "Couldn't find tag '%s' in '%s'.", sTagToLookFor.c_str(), m_sDir.c_str() );
|
||||
LOG->UserLog( RageLog::LogType_SongFile, m_sDir, "has tag \"%s\" which cannot be found.", sTagToLookFor.c_str() );
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -813,13 +812,13 @@ void BMSLoader::ReadGlobalTags( const NameToData_t &mapNameToData, Song &out )
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG->UserLog( "In BMS file \"%s\", there is an invalid BPM change at beat %f, BPM %f.",
|
||||
out.GetSongFilePath().c_str(), NoteRowToBeat(iStepIndex), fBPM );
|
||||
LOG->UserLog( RageLog::LogType_SongFile, m_sDir, "has an invalid BPM change at beat %f, BPM %f.",
|
||||
NoteRowToBeat(iStepIndex), fBPM );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG->UserLog( "Couldn't find tag '%s' in '%s'.", sTagToLookFor.c_str(), m_sDir.c_str() );
|
||||
LOG->UserLog( RageLog::LogType_SongFile, m_sDir, "has tag \"%s\" which cannot be found.", sTagToLookFor.c_str() );
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -949,7 +948,7 @@ bool BMSLoader::LoadFromDir( const RString &sDir, Song &out )
|
||||
{
|
||||
// All bets are off; the titles don't match at all.
|
||||
// At this rate we're lucky if we even get the title right.
|
||||
LOG->UserLog( "BMS files in %s have inconsistent titles", sDir.c_str() );
|
||||
LOG->UserLog( RageLog::LogType_Song, sDir, "has BMS files with inconsistent titles." );
|
||||
}
|
||||
|
||||
/* Create a Steps for each. */
|
||||
|
||||
Reference in New Issue
Block a user