Added MUSIC tag to note data to allow each chart in a simfile to use a different music file.

This commit is contained in:
Kyzentun
2015-03-02 18:44:01 -07:00
parent 9381276fd3
commit 846f79879c
15 changed files with 167 additions and 5 deletions
+18
View File
@@ -899,6 +899,24 @@ bool SongUtil::ValidateCurrentStepsCredit( const RString &sAnswer, RString &sErr
return true;
}
static LocalizedString MUSIC_DOES_NOT_EXIST("SongUtil", "The music file '%s' does not exist.");
bool SongUtil::ValidateCurrentStepsMusic(const RString &answer, RString &error)
{
if(answer.empty())
return true;
Steps *pSteps = GAMESTATE->m_pCurSteps[PLAYER_1];
RString real_file= pSteps->GetMusicFile();
pSteps->SetMusicFile(answer);
RString path= pSteps->GetMusicPath();
bool valid= DoesFileExist(path);
pSteps->SetMusicFile(real_file);
if(!valid)
{
error= ssprintf(MUSIC_DOES_NOT_EXIST.GetValue(), answer.c_str());
}
return valid;
}
void SongUtil::GetAllSongGenres( vector<RString> &vsOut )
{
set<RString> genres;