Add sorting by Block level

(cherry picked from commit e1c8326a6a71f4a15c3f123391dc3f3331ee4a7b)
This commit is contained in:
Crash Cringle
2024-02-25 09:36:21 -08:00
committed by teejusb
parent 3fd0bd8ade
commit d788071d4d
9 changed files with 125 additions and 47 deletions
+7 -1
View File
@@ -142,13 +142,14 @@ public:
* @return the songs within the game that have at least one valid Step. */
const std::vector<Song *> &GetAllSongsOfCurrentGame() const;
std::map<int, std::vector<Song*>> GetMeterToSongsMap() const { return m_mapSongsByDifficulty; }
void GetPreferredSortSongs( std::vector<Song*> &AddTo ) const;
std::map<RString, std::vector<Song*>> GetPreferredSortSongsMap() const { return m_mapPreferredSectionToSongs;};
RString SongToPreferredSortSectionName( const Song *pSong ) const;
std::vector<RString> GetPreferredSortSectionNames() const;
std::vector<Song*> GetPreferredSortSongsBySectionName( const RString &sSectionName ) const;
void GetPreferredSortSongsBySectionName( const RString &sSectionName, std::vector<Song*> &AddTo ) const;
std::vector<Song*> GetSongsByMeter( int iMeter ) const;
const std::vector<Course*> &GetPopularCourses( CourseType ct ) const { return m_pPopularCourses[ct]; }
Song *FindSong( RString sPath ) const;
Song *FindSong( RString sGroup, RString sSong ) const;
@@ -188,6 +189,7 @@ public:
void UpdatePopular();
void UpdateShuffled(); // re-shuffle songs and courses
void UpdateMeterSort();
void SetPreferredSongs(RString sPreferredSongs, bool bIsAbsolute = false);
void SetPreferredCourses(RString sPreferredCourses, bool bIsAbsolute = false);
void UpdatePreferredSort(RString sPreferredSongs = "PreferredSongs.txt", RString sPreferredCourses = "PreferredCourses.txt");
@@ -225,6 +227,10 @@ protected:
/** @brief The most popular songs ranked by number of plays. */
std::vector<Song*> m_pPopularSongs;
std::vector<Song*> m_pShuffledSongs; // used by GetRandomSong
/** @brief Meter numbers and the songs with Steps that are within.*/
std::map<int, std::vector<Song*>> m_mapSongsByDifficulty;
struct PreferredSortSection
{
RString sName;