use GetSongDir
This commit is contained in:
@@ -103,7 +103,7 @@ BGAnimation *Background::GetBGA(const Song *pSong, const BackgroundChange &anise
|
||||
CStringArray asFiles;
|
||||
|
||||
// Look for BG movies in the song dir
|
||||
GetDirListing( pSong->m_sSongDir+aniseg.m_sBGName, asFiles, false, true );
|
||||
GetDirListing( pSong->GetSongDir()+aniseg.m_sBGName, asFiles, false, true );
|
||||
if( !asFiles.empty() )
|
||||
{
|
||||
pTempBGA = new BGAnimation;
|
||||
@@ -111,7 +111,7 @@ BGAnimation *Background::GetBGA(const Song *pSong, const BackgroundChange &anise
|
||||
return pTempBGA;
|
||||
}
|
||||
// Look for BGAnims in the song dir
|
||||
GetDirListing( pSong->m_sSongDir+aniseg.m_sBGName, asFiles, true, true );
|
||||
GetDirListing( pSong->GetSongDir()+aniseg.m_sBGName, asFiles, true, true );
|
||||
if( !asFiles.empty() )
|
||||
{
|
||||
pTempBGA = new BGAnimation;
|
||||
|
||||
@@ -79,7 +79,7 @@ void Course::LoadFromCRSFile( CString sPath, CArray<Song*,Song*> &apSongs )
|
||||
continue;
|
||||
}
|
||||
|
||||
/* m_sSongDir contains a path to the song, possibly a full path, eg:
|
||||
/* GetSongDir() contains a path to the song, possibly a full path, eg:
|
||||
* Songs\Group\SongName or
|
||||
* My Other Song Folder\Group\SongName or
|
||||
* c:\Corny J-pop\Group\SongName
|
||||
@@ -111,7 +111,7 @@ void Course::LoadFromCRSFile( CString sPath, CArray<Song*,Song*> &apSongs )
|
||||
for( unsigned i = 0; pSong == NULL && i < apSongs.size(); i++ )
|
||||
{
|
||||
CStringArray splitted;
|
||||
split( apSongs[i]->m_sSongDir, "\\", splitted, true );
|
||||
split( apSongs[i]->GetSongDir(), "\\", splitted, true );
|
||||
bool matches = true;
|
||||
|
||||
int split_no = splitted.size()-1;
|
||||
|
||||
@@ -264,7 +264,7 @@ bool BMSLoader::LoadFromDir( CString sDir, Song &out )
|
||||
{
|
||||
Notes* pNewNotes = new Notes;
|
||||
|
||||
LoadFromBMSFile( out.m_sSongDir + arrayBMSFileNames[i],
|
||||
LoadFromBMSFile( out.GetSongDir() + arrayBMSFileNames[i],
|
||||
*pNewNotes );
|
||||
if(pNewNotes->m_NotesType != NOTES_TYPE_INVALID)
|
||||
out.m_apNotes.push_back( pNewNotes );
|
||||
@@ -272,7 +272,7 @@ bool BMSLoader::LoadFromDir( CString sDir, Song &out )
|
||||
delete pNewNotes;
|
||||
}
|
||||
|
||||
CString sPath = out.m_sSongDir + arrayBMSFileNames[0];
|
||||
CString sPath = out.GetSongDir() + arrayBMSFileNames[0];
|
||||
|
||||
ifstream file(sPath);
|
||||
if( file.bad() )
|
||||
|
||||
@@ -166,11 +166,11 @@ bool KSFLoader::LoadFromDir( CString sDir, Song &out )
|
||||
for( i=0; i<arrayKSFFileNames.size(); i++ )
|
||||
{
|
||||
Notes* pNewNotes = new Notes;
|
||||
LoadFromKSFFile( out.m_sSongDir + arrayKSFFileNames[i], *pNewNotes );
|
||||
LoadFromKSFFile( out.GetSongDir() + arrayKSFFileNames[i], *pNewNotes );
|
||||
out.m_apNotes.push_back( pNewNotes );
|
||||
}
|
||||
|
||||
CString sPath = out.m_sSongDir + arrayKSFFileNames[0];
|
||||
CString sPath = out.GetSongDir() + arrayKSFFileNames[0];
|
||||
|
||||
MsdFile msd;
|
||||
bool bResult = msd.ReadFile( sPath );
|
||||
@@ -251,9 +251,9 @@ bool KSFLoader::LoadFromDir( CString sDir, Song &out )
|
||||
|
||||
// search for music with song in the file name
|
||||
CStringArray arrayPossibleMusic;
|
||||
GetDirListing( out.m_sSongDir + CString("song.mp3"), arrayPossibleMusic );
|
||||
GetDirListing( out.m_sSongDir + CString("song.ogg"), arrayPossibleMusic );
|
||||
GetDirListing( out.m_sSongDir + CString("song.wav"), arrayPossibleMusic );
|
||||
GetDirListing( out.GetSongDir() + CString("song.mp3"), arrayPossibleMusic );
|
||||
GetDirListing( out.GetSongDir() + CString("song.ogg"), arrayPossibleMusic );
|
||||
GetDirListing( out.GetSongDir() + CString("song.wav"), arrayPossibleMusic );
|
||||
|
||||
if( !arrayPossibleMusic.empty() ) // we found a match
|
||||
out.m_sMusicFile = arrayPossibleMusic[0];
|
||||
|
||||
@@ -292,7 +292,7 @@ void SongManager::ReadStatisticsFromDisk()
|
||||
Song* pSong = NULL;
|
||||
for( i=0; i<m_pSongs.size(); i++ )
|
||||
{
|
||||
if( m_pSongs[i]->m_sSongDir == szSongDir ) // match!
|
||||
if( m_pSongs[i]->GetSongDir() == szSongDir ) // match!
|
||||
{
|
||||
pSong = m_pSongs[i];
|
||||
break;
|
||||
@@ -355,7 +355,7 @@ void SongManager::SaveStatisticsToDisk()
|
||||
|
||||
// Each value has the format "SongName::NotesName=TimesPlayed::TopGrade::TopScore::MaxCombo".
|
||||
|
||||
CString sName = ssprintf( "%s::%s::%s", pSong->m_sSongDir.GetString(), GameManager::NotesTypeToString(pNotes->m_NotesType).GetString(), pNotes->m_sDescription.GetString() );
|
||||
CString sName = ssprintf( "%s::%s::%s", pSong->GetSongDir().GetString(), GameManager::NotesTypeToString(pNotes->m_NotesType).GetString(), pNotes->m_sDescription.GetString() );
|
||||
CString sValue = ssprintf(
|
||||
"%d::%s::%d::%d",
|
||||
pNotes->m_iNumTimesPlayed,
|
||||
@@ -596,7 +596,7 @@ void SongManager::GetExtraStageInfo( bool bExtra2, CString sPreferredGroup, cons
|
||||
so_out.m_DrainType = (bExtra2 ? SongOptions::DRAIN_SUDDEN_DEATH : SongOptions::DRAIN_NO_RECOVER);
|
||||
|
||||
// should we do something fancy here, like turn on different effects?
|
||||
int iSongHash = GetHashForString( pSongOut->m_sSongDir );
|
||||
int iSongHash = GetHashForString( pSongOut->GetSongDir() );
|
||||
switch( ((UINT)iSongHash) % 6 )
|
||||
{
|
||||
case 0: po_out.m_bEffects[PlayerOptions::EFFECT_DIZZY] = true; break;
|
||||
|
||||
Reference in New Issue
Block a user