hide songs loaded from AdditionalSongFolders
This commit is contained in:
@@ -57,7 +57,7 @@ void EditMenu::GetSongsToShowForGroup( const RString &sGroup, vector<Song*> &vpS
|
|||||||
for( int i=vpSongsOut.size()-1; i>=0; i-- )
|
for( int i=vpSongsOut.size()-1; i>=0; i-- )
|
||||||
{
|
{
|
||||||
const Song* pSong = vpSongsOut[i];
|
const Song* pSong = vpSongsOut[i];
|
||||||
if( UNLOCKMAN->SongIsLocked(pSong) || pSong->IsTutorial() )
|
if( UNLOCKMAN->SongIsLocked(pSong) || pSong->IsTutorial() || SONGMAN->WasLoadedFromAdditionalSongs(pSong) )
|
||||||
vpSongsOut.erase( vpSongsOut.begin()+i );
|
vpSongsOut.erase( vpSongsOut.begin()+i );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -37,8 +37,9 @@
|
|||||||
|
|
||||||
SongManager* SONGMAN = NULL; // global and accessable from anywhere in our program
|
SongManager* SONGMAN = NULL; // global and accessable from anywhere in our program
|
||||||
|
|
||||||
const RString SONGS_DIR = "Songs/";
|
const RString SONGS_DIR = "/Songs/";
|
||||||
const RString COURSES_DIR = "Courses/";
|
const RString ADDITIONAL_SONGS_DIR = "/AdditionalSongs/";
|
||||||
|
const RString COURSES_DIR = "/Courses/";
|
||||||
|
|
||||||
static const ThemeMetric<RageColor> EXTRA_COLOR ("SongManager","ExtraColor");
|
static const ThemeMetric<RageColor> EXTRA_COLOR ("SongManager","ExtraColor");
|
||||||
static const ThemeMetric<int> EXTRA_COLOR_METER ("SongManager","ExtraColorMeter");
|
static const ThemeMetric<int> EXTRA_COLOR_METER ("SongManager","ExtraColorMeter");
|
||||||
@@ -103,6 +104,7 @@ void SongManager::InitSongsFromDisk( LoadingWindow *ld )
|
|||||||
{
|
{
|
||||||
RageTimer tm;
|
RageTimer tm;
|
||||||
LoadStepManiaSongDir( SONGS_DIR, ld );
|
LoadStepManiaSongDir( SONGS_DIR, ld );
|
||||||
|
LoadStepManiaSongDir( ADDITIONAL_SONGS_DIR, ld );
|
||||||
LOG->Trace( "Found %d songs in %f seconds.", (int)m_pSongs.size(), tm.GetDeltaTime() );
|
LOG->Trace( "Found %d songs in %f seconds.", (int)m_pSongs.size(), tm.GetDeltaTime() );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -937,6 +939,12 @@ void SongManager::DeleteSteps( Steps *pSteps )
|
|||||||
pSong->DeleteSteps( pSteps );
|
pSong->DeleteSteps( pSteps );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool SongManager::WasLoadedFromAdditionalSongs( const Song *pSong ) const
|
||||||
|
{
|
||||||
|
RString sDir = pSong->GetSongDir();
|
||||||
|
return BeginsWith( sDir, ADDITIONAL_SONGS_DIR );
|
||||||
|
}
|
||||||
|
|
||||||
void SongManager::GetAllCourses( vector<Course*> &AddTo, bool bIncludeAutogen )
|
void SongManager::GetAllCourses( vector<Course*> &AddTo, bool bIncludeAutogen )
|
||||||
{
|
{
|
||||||
for( unsigned i=0; i<m_pCourses.size(); i++ )
|
for( unsigned i=0; i<m_pCourses.size(); i++ )
|
||||||
|
|||||||
@@ -95,6 +95,7 @@ public:
|
|||||||
void GetStepsLoadedFromProfile( vector<Steps*> &AddTo, ProfileSlot slot );
|
void GetStepsLoadedFromProfile( vector<Steps*> &AddTo, ProfileSlot slot );
|
||||||
Song *GetSongFromSteps( Steps *pSteps );
|
Song *GetSongFromSteps( Steps *pSteps );
|
||||||
void DeleteSteps( Steps *pSteps ); // transfers ownership of pSteps
|
void DeleteSteps( Steps *pSteps ); // transfers ownership of pSteps
|
||||||
|
bool WasLoadedFromAdditionalSongs( const Song *pSong ) const;
|
||||||
|
|
||||||
void GetAllCourses( vector<Course*> &AddTo, bool bIncludeAutogen );
|
void GetAllCourses( vector<Course*> &AddTo, bool bIncludeAutogen );
|
||||||
void GetCourses( CourseType ct, vector<Course*> &AddTo, bool bIncludeAutogen );
|
void GetCourses( CourseType ct, vector<Course*> &AddTo, bool bIncludeAutogen );
|
||||||
|
|||||||
@@ -975,7 +975,7 @@ int main(int argc, char* argv[])
|
|||||||
vector<RString> dirs;
|
vector<RString> dirs;
|
||||||
split( PREFSMAN->m_sAdditionalSongFolders, ",", dirs, true );
|
split( PREFSMAN->m_sAdditionalSongFolders, ",", dirs, true );
|
||||||
for( unsigned i=0; i < dirs.size(); i++)
|
for( unsigned i=0; i < dirs.size(); i++)
|
||||||
FILEMAN->Mount( "dir", dirs[i], "/Songs" );
|
FILEMAN->Mount( "dir", dirs[i], "/AdditionalSongs" );
|
||||||
}
|
}
|
||||||
MountTreeOfZips( ZIPS_DIR );
|
MountTreeOfZips( ZIPS_DIR );
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user