From 2b19012e401ba2b02622a630c60a6ca94b55a004 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Fri, 13 Dec 2002 23:41:11 +0000 Subject: [PATCH] use GetSongDir --- stepmania/src/Background.cpp | 4 ++-- stepmania/src/Course.cpp | 4 ++-- stepmania/src/NotesLoaderBMS.cpp | 4 ++-- stepmania/src/NotesLoaderKSF.cpp | 10 +++++----- stepmania/src/SongManager.cpp | 6 +++--- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/stepmania/src/Background.cpp b/stepmania/src/Background.cpp index 185c1d48b7..1c3d22c6a7 100644 --- a/stepmania/src/Background.cpp +++ b/stepmania/src/Background.cpp @@ -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; diff --git a/stepmania/src/Course.cpp b/stepmania/src/Course.cpp index 95e9e16588..3cb673e5a8 100644 --- a/stepmania/src/Course.cpp +++ b/stepmania/src/Course.cpp @@ -79,7 +79,7 @@ void Course::LoadFromCRSFile( CString sPath, CArray &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 &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; diff --git a/stepmania/src/NotesLoaderBMS.cpp b/stepmania/src/NotesLoaderBMS.cpp index 9143ddd2d7..b702b7e27e 100644 --- a/stepmania/src/NotesLoaderBMS.cpp +++ b/stepmania/src/NotesLoaderBMS.cpp @@ -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() ) diff --git a/stepmania/src/NotesLoaderKSF.cpp b/stepmania/src/NotesLoaderKSF.cpp index 620b6deb21..c3b84c41ea 100644 --- a/stepmania/src/NotesLoaderKSF.cpp +++ b/stepmania/src/NotesLoaderKSF.cpp @@ -166,11 +166,11 @@ bool KSFLoader::LoadFromDir( CString sDir, Song &out ) for( i=0; im_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;