edits: set m_LoadedFromProfile, force m_Difficulty to DIFFICULTY_EDIT

This commit is contained in:
Glenn Maynard
2004-04-16 23:48:31 +00:00
parent b3e627f968
commit ce23a1d712
3 changed files with 6 additions and 4 deletions
+4 -2
View File
@@ -372,7 +372,7 @@ bool SMLoader::LoadFromDir( CString sPath, Song &out )
return LoadFromSMFile( sPath + aFileNames[0], out );
}
bool SMLoader::LoadEdit( CString sEditFilePath )
bool SMLoader::LoadEdit( CString sEditFilePath, ProfileSlot slot )
{
LOG->Trace( "Song::LoadEdit(%s)", sEditFilePath.c_str() );
@@ -430,7 +430,9 @@ bool SMLoader::LoadEdit( CString sEditFilePath )
LoadFromSMTokens(
sParams[1], sParams[2], sParams[3], sParams[4], sParams[5], sParams[6], (iNumParams>=8)?sParams[7]:"",
*pNewNotes);
/* XXX: set m_LoadedFromProfile, force m_Difficulty == DIFFICULTY_EDIT */
pNewNotes->SetLoadedFromProfile( slot );
pNewNotes->SetDifficulty( DIFFICULTY_EDIT );
}
else
LOG->Trace( "Unexpected value named '%s'", sValueName.c_str() );
+1 -1
View File
@@ -33,7 +33,7 @@ public:
bool LoadFromDir( CString sPath, Song &out );
static bool LoadTimingFromFile( const CString &fn, TimingData &out );
static void LoadTimingFromSMFile( const MsdFile &msd, TimingData &out );
static bool LoadEdit( CString sEditFilePath );
static bool LoadEdit( CString sEditFilePath, ProfileSlot slot );
};
#endif
+1 -1
View File
@@ -967,7 +967,7 @@ void SongManager::LoadAllFromProfiles()
{
CString sEditFileWithPath = asEditsFilesWithPath[i];
SMLoader::LoadEdit( sEditFileWithPath );
SMLoader::LoadEdit( sEditFileWithPath, (ProfileSlot) s );
}
}