keep track of last played for each song
add metric: ScreenRanking::ShowOnlyMostRecentScores
This commit is contained in:
@@ -3368,8 +3368,10 @@ TimerSeconds=-1
|
|||||||
StepsTypesToHide=dance-couple,dance-solo,pump-halfdouble
|
StepsTypesToHide=dance-couple,dance-solo,pump-halfdouble
|
||||||
ShowCategories=1
|
ShowCategories=1
|
||||||
CoursesToShow=Courses/DDRMAX/NaokiStandard.crs,Courses/DDRMAX/ParanoiaBrothers.crs,Courses/Samples/PlayersBest1-4.crs
|
CoursesToShow=Courses/DDRMAX/NaokiStandard.crs,Courses/DDRMAX/ParanoiaBrothers.crs,Courses/Samples/PlayersBest1-4.crs
|
||||||
ShowAllStepsScores=0
|
ShowStepsScores=0
|
||||||
ShowAllCourseScores=0
|
ShowCourseScores=0
|
||||||
|
ShowOnlyMostRecentScores=0
|
||||||
|
NumMostRecentScoresToShow=10
|
||||||
DifficultiesToShow=easy,medium,hard,challenge
|
DifficultiesToShow=easy,medium,hard,challenge
|
||||||
SecondsPerPage=5
|
SecondsPerPage=5
|
||||||
PageFadeSeconds=1.0
|
PageFadeSeconds=1.0
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
#include "XmlFile.h"
|
#include "XmlFile.h"
|
||||||
#include "GameState.h"
|
#include "GameState.h"
|
||||||
#include "Style.h"
|
#include "Style.h"
|
||||||
|
#include "Foreach.h"
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -92,23 +93,23 @@ static bool CompareCoursePointersByRanking(const Course* pCourse1, const Course*
|
|||||||
return iNum1 < iNum2;
|
return iNum1 < iNum2;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CourseUtil::SortCoursePointerArrayByDifficulty( vector<Course*> &apCourses )
|
void CourseUtil::SortCoursePointerArrayByDifficulty( vector<Course*> &vpCoursesInOut )
|
||||||
{
|
{
|
||||||
sort( apCourses.begin(), apCourses.end(), CompareCoursePointersByDifficulty );
|
sort( vpCoursesInOut.begin(), vpCoursesInOut.end(), CompareCoursePointersByDifficulty );
|
||||||
}
|
}
|
||||||
|
|
||||||
void CourseUtil::SortCoursePointerArrayByRanking( vector<Course*> &apCourses )
|
void CourseUtil::SortCoursePointerArrayByRanking( vector<Course*> &vpCoursesInOut )
|
||||||
{
|
{
|
||||||
for(unsigned i=0; i<apCourses.size(); i++)
|
for(unsigned i=0; i<vpCoursesInOut.size(); i++)
|
||||||
apCourses[i]->UpdateCourseStats( GAMESTATE->GetCurrentStyle()->m_StepsType );
|
vpCoursesInOut[i]->UpdateCourseStats( GAMESTATE->GetCurrentStyle()->m_StepsType );
|
||||||
sort( apCourses.begin(), apCourses.end(), CompareCoursePointersByRanking );
|
sort( vpCoursesInOut.begin(), vpCoursesInOut.end(), CompareCoursePointersByRanking );
|
||||||
}
|
}
|
||||||
|
|
||||||
void CourseUtil::SortCoursePointerArrayByTotalDifficulty( vector<Course*> &apCourses )
|
void CourseUtil::SortCoursePointerArrayByTotalDifficulty( vector<Course*> &vpCoursesInOut )
|
||||||
{
|
{
|
||||||
for(unsigned i=0; i<apCourses.size(); i++)
|
for(unsigned i=0; i<vpCoursesInOut.size(); i++)
|
||||||
apCourses[i]->UpdateCourseStats( GAMESTATE->GetCurrentStyle()->m_StepsType );
|
vpCoursesInOut[i]->UpdateCourseStats( GAMESTATE->GetCurrentStyle()->m_StepsType );
|
||||||
sort( apCourses.begin(), apCourses.end(), CompareCoursePointersByTotalDifficulty );
|
sort( vpCoursesInOut.begin(), vpCoursesInOut.end(), CompareCoursePointersByTotalDifficulty );
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool CompareCoursePointersByType(const Course* pCourse1, const Course* pCourse2)
|
static bool CompareCoursePointersByType(const Course* pCourse1, const Course* pCourse2)
|
||||||
@@ -116,17 +117,17 @@ static bool CompareCoursePointersByType(const Course* pCourse1, const Course* pC
|
|||||||
return pCourse1->GetPlayMode() < pCourse2->GetPlayMode();
|
return pCourse1->GetPlayMode() < pCourse2->GetPlayMode();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CourseUtil::SortCoursePointerArrayByType( vector<Course*> &apCourses )
|
void CourseUtil::SortCoursePointerArrayByType( vector<Course*> &vpCoursesInOut )
|
||||||
{
|
{
|
||||||
stable_sort( apCourses.begin(), apCourses.end(), CompareCoursePointersByType );
|
stable_sort( vpCoursesInOut.begin(), vpCoursesInOut.end(), CompareCoursePointersByType );
|
||||||
}
|
}
|
||||||
|
|
||||||
void CourseUtil::MoveRandomToEnd( vector<Course*> &apCourses )
|
void CourseUtil::MoveRandomToEnd( vector<Course*> &vpCoursesInOut )
|
||||||
{
|
{
|
||||||
stable_sort( apCourses.begin(), apCourses.end(), CompareRandom );
|
stable_sort( vpCoursesInOut.begin(), vpCoursesInOut.end(), CompareRandom );
|
||||||
}
|
}
|
||||||
|
|
||||||
static map<const Course*, float> course_sort_val;
|
static map<const Course*, CString> course_sort_val;
|
||||||
|
|
||||||
bool CompareCoursePointersBySortValueAscending(const Course *pSong1, const Course *pSong2)
|
bool CompareCoursePointersBySortValueAscending(const Course *pSong1, const Course *pSong2)
|
||||||
{
|
{
|
||||||
@@ -143,44 +144,65 @@ bool CompareCoursePointersByTitle( const Course *pCourse1, const Course *pCourse
|
|||||||
return CompareCoursePointersByName( pCourse1, pCourse2 );
|
return CompareCoursePointersByName( pCourse1, pCourse2 );
|
||||||
}
|
}
|
||||||
|
|
||||||
void CourseUtil::SortCoursePointerArrayByTitle( vector<Course*> &apCourses )
|
void CourseUtil::SortCoursePointerArrayByTitle( vector<Course*> &vpCoursesInOut )
|
||||||
{
|
{
|
||||||
sort( apCourses.begin(), apCourses.end(), CompareCoursePointersByTitle );
|
sort( vpCoursesInOut.begin(), vpCoursesInOut.end(), CompareCoursePointersByTitle );
|
||||||
}
|
}
|
||||||
|
|
||||||
void CourseUtil::SortCoursePointerArrayByAvgDifficulty( vector<Course*> &apCourses )
|
void CourseUtil::SortCoursePointerArrayByAvgDifficulty( vector<Course*> &vpCoursesInOut )
|
||||||
{
|
{
|
||||||
RageTimer foo;
|
RageTimer foo;
|
||||||
course_sort_val.clear();
|
course_sort_val.clear();
|
||||||
for(unsigned i = 0; i < apCourses.size(); ++i)
|
for(unsigned i = 0; i < vpCoursesInOut.size(); ++i)
|
||||||
{
|
{
|
||||||
const Trail* pTrail = apCourses[i]->GetTrail( GAMESTATE->GetCurrentStyle()->m_StepsType );
|
const Trail* pTrail = vpCoursesInOut[i]->GetTrail( GAMESTATE->GetCurrentStyle()->m_StepsType );
|
||||||
course_sort_val[apCourses[i]] = pTrail != NULL? (float) pTrail->GetMeter(): 0.0f;
|
course_sort_val[vpCoursesInOut[i]] = pTrail != NULL? (float) pTrail->GetMeter(): 0.0f;
|
||||||
}
|
}
|
||||||
sort( apCourses.begin(), apCourses.end(), CompareCoursePointersByTitle );
|
sort( vpCoursesInOut.begin(), vpCoursesInOut.end(), CompareCoursePointersByTitle );
|
||||||
stable_sort( apCourses.begin(), apCourses.end(), CompareCoursePointersBySortValueAscending );
|
stable_sort( vpCoursesInOut.begin(), vpCoursesInOut.end(), CompareCoursePointersBySortValueAscending );
|
||||||
|
|
||||||
stable_sort( apCourses.begin(), apCourses.end(), MovePlayersBestToEnd );
|
stable_sort( vpCoursesInOut.begin(), vpCoursesInOut.end(), MovePlayersBestToEnd );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void CourseUtil::SortCoursePointerArrayByNumPlays( vector<Course*> &arrayCoursePointers, ProfileSlot slot, bool bDescending )
|
void CourseUtil::SortCoursePointerArrayByNumPlays( vector<Course*> &vpCoursesInOut, ProfileSlot slot, bool bDescending )
|
||||||
{
|
{
|
||||||
Profile* pProfile = PROFILEMAN->GetProfile(slot);
|
Profile* pProfile = PROFILEMAN->GetProfile(slot);
|
||||||
if( pProfile == NULL )
|
if( pProfile == NULL )
|
||||||
return; // nothing to do since we don't have data
|
return; // nothing to do since we don't have data
|
||||||
SortCoursePointerArrayByNumPlays( arrayCoursePointers, pProfile, bDescending );
|
SortCoursePointerArrayByNumPlays( vpCoursesInOut, pProfile, bDescending );
|
||||||
}
|
}
|
||||||
|
|
||||||
void CourseUtil::SortCoursePointerArrayByNumPlays( vector<Course*> &arrayCoursePointers, const Profile* pProfile, bool bDescending )
|
void CourseUtil::SortCoursePointerArrayByNumPlays( vector<Course*> &vpCoursesInOut, const Profile* pProfile, bool bDescending )
|
||||||
{
|
{
|
||||||
ASSERT( pProfile );
|
ASSERT( pProfile );
|
||||||
for(unsigned i = 0; i < arrayCoursePointers.size(); ++i)
|
for(unsigned i = 0; i < vpCoursesInOut.size(); ++i)
|
||||||
course_sort_val[arrayCoursePointers[i]] = (float) pProfile->GetCourseNumTimesPlayed(arrayCoursePointers[i]);
|
course_sort_val[vpCoursesInOut[i]] = (float) pProfile->GetCourseNumTimesPlayed(vpCoursesInOut[i]);
|
||||||
stable_sort( arrayCoursePointers.begin(), arrayCoursePointers.end(), bDescending ? CompareCoursePointersBySortValueDescending : CompareCoursePointersBySortValueAscending );
|
stable_sort( vpCoursesInOut.begin(), vpCoursesInOut.end(), bDescending ? CompareCoursePointersBySortValueDescending : CompareCoursePointersBySortValueAscending );
|
||||||
course_sort_val.clear();
|
course_sort_val.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CourseUtil::SortByMostRecentlyPlayedForMachine( vector<Course*> &vpCoursesInOut )
|
||||||
|
{
|
||||||
|
Profile *pProfile = PROFILEMAN->GetMachineProfile();
|
||||||
|
|
||||||
|
FOREACH_CONST( Course*, vpCoursesInOut, c )
|
||||||
|
{
|
||||||
|
int iNumTimesPlayed = pProfile->GetCourseNumTimesPlayed( *c );
|
||||||
|
CString val = iNumTimesPlayed ? pProfile->GetCourseLastPlayedDateTime(*c).GetString() : "9999999999999";
|
||||||
|
course_sort_val[*c] = val;
|
||||||
|
}
|
||||||
|
|
||||||
|
stable_sort( vpCoursesInOut.begin(), vpCoursesInOut.end(), CompareCoursePointersBySortValueAscending );
|
||||||
|
course_sort_val.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//////////////////////////////////
|
||||||
|
// CourseID
|
||||||
|
//////////////////////////////////
|
||||||
|
|
||||||
void CourseID::FromCourse( const Course *p )
|
void CourseID::FromCourse( const Course *p )
|
||||||
{
|
{
|
||||||
if( p )
|
if( p )
|
||||||
|
|||||||
@@ -11,16 +11,17 @@ struct XNode;
|
|||||||
|
|
||||||
namespace CourseUtil
|
namespace CourseUtil
|
||||||
{
|
{
|
||||||
void SortCoursePointerArrayByDifficulty( vector<Course*> &apCourses );
|
void SortCoursePointerArrayByDifficulty( vector<Course*> &vpCoursesInOut );
|
||||||
void SortCoursePointerArrayByType( vector<Course*> &apCourses );
|
void SortCoursePointerArrayByType( vector<Course*> &vpCoursesInOut );
|
||||||
void SortCoursePointerArrayByTitle( vector<Course*> &apCourses );
|
void SortCoursePointerArrayByTitle( vector<Course*> &vpCoursesInOut );
|
||||||
void SortCoursePointerArrayByAvgDifficulty( vector<Course*> &apCourses );
|
void SortCoursePointerArrayByAvgDifficulty( vector<Course*> &vpCoursesInOut );
|
||||||
void SortCoursePointerArrayByTotalDifficulty( vector<Course*> &apCourses );
|
void SortCoursePointerArrayByTotalDifficulty( vector<Course*> &vpCoursesInOut );
|
||||||
void SortCoursePointerArrayByRanking( vector<Course*> &apCourses );
|
void SortCoursePointerArrayByRanking( vector<Course*> &vpCoursesInOut );
|
||||||
void SortCoursePointerArrayByNumPlays( vector<Course*> &arrayCoursePointers, ProfileSlot slot, bool bDescending );
|
void SortCoursePointerArrayByNumPlays( vector<Course*> &vpCoursesInOut, ProfileSlot slot, bool bDescending );
|
||||||
void SortCoursePointerArrayByNumPlays( vector<Course*> &arrayCoursePointers, const Profile* pProfile, bool bDescending );
|
void SortCoursePointerArrayByNumPlays( vector<Course*> &vpCoursesInOut, const Profile* pProfile, bool bDescending );
|
||||||
|
void SortByMostRecentlyPlayedForMachine( vector<Course*> &vpCoursesInOut );
|
||||||
|
|
||||||
void MoveRandomToEnd( vector<Course*> &apCourses );
|
void MoveRandomToEnd( vector<Course*> &vpCoursesInOut );
|
||||||
};
|
};
|
||||||
|
|
||||||
class CourseID
|
class CourseID
|
||||||
|
|||||||
@@ -139,6 +139,12 @@ void HighScoreList::AddHighScore( HighScore hs, int &iIndexOut, bool bIsMachine
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void HighScoreList::IncrementPlayCount( DateTime dtLastPlayed )
|
||||||
|
{
|
||||||
|
dtLastPlayed = dtLastPlayed;
|
||||||
|
iNumTimesPlayed++;
|
||||||
|
}
|
||||||
|
|
||||||
const HighScore& HighScoreList::GetTopScore() const
|
const HighScore& HighScoreList::GetTopScore() const
|
||||||
{
|
{
|
||||||
if( vHighScores.empty() )
|
if( vHighScores.empty() )
|
||||||
@@ -180,6 +186,10 @@ void HighScoreList::LoadFromNode( const XNode* pHighScoreList )
|
|||||||
{
|
{
|
||||||
p->GetValue( iNumTimesPlayed );
|
p->GetValue( iNumTimesPlayed );
|
||||||
}
|
}
|
||||||
|
else if( p->m_sName == "LastPlayed" )
|
||||||
|
{
|
||||||
|
p->GetValue( dtLastPlayed );
|
||||||
|
}
|
||||||
else if( p->m_sName == "HighScore" )
|
else if( p->m_sName == "HighScore" )
|
||||||
{
|
{
|
||||||
vHighScores.resize( vHighScores.size()+1 );
|
vHighScores.resize( vHighScores.size()+1 );
|
||||||
|
|||||||
@@ -75,26 +75,37 @@ struct HighScore
|
|||||||
|
|
||||||
struct HighScoreList
|
struct HighScoreList
|
||||||
{
|
{
|
||||||
int iNumTimesPlayed;
|
public:
|
||||||
vector<HighScore> vHighScores;
|
|
||||||
|
|
||||||
|
|
||||||
HighScoreList()
|
HighScoreList()
|
||||||
{
|
{
|
||||||
iNumTimesPlayed = 0;
|
iNumTimesPlayed = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Init();
|
void Init();
|
||||||
|
|
||||||
void AddHighScore( HighScore hs, int &iIndexOut, bool bIsMachine );
|
int GetNumTimesPlayed() const
|
||||||
|
{
|
||||||
|
return iNumTimesPlayed;
|
||||||
|
}
|
||||||
|
DateTime GetLastPlayed() const
|
||||||
|
{
|
||||||
|
ASSERT( iNumTimesPlayed > 0 ); // don't call this unless the song has been played
|
||||||
|
return dtLastPlayed;
|
||||||
|
}
|
||||||
const HighScore& GetTopScore() const;
|
const HighScore& GetTopScore() const;
|
||||||
|
|
||||||
|
void AddHighScore( HighScore hs, int &iIndexOut, bool bIsMachine );
|
||||||
|
void IncrementPlayCount( DateTime dtLastPlayed );
|
||||||
|
void RemoveAllButOneOfEachName();
|
||||||
|
void ClampSize( bool bIsMachine );
|
||||||
|
|
||||||
XNode* CreateNode() const;
|
XNode* CreateNode() const;
|
||||||
void LoadFromNode( const XNode* pNode );
|
void LoadFromNode( const XNode* pNode );
|
||||||
|
|
||||||
void RemoveAllButOneOfEachName();
|
vector<HighScore> vHighScores;
|
||||||
void ClampSize( bool bIsMachine );
|
private:
|
||||||
|
int iNumTimesPlayed;
|
||||||
|
DateTime dtLastPlayed; // meaningless if iNumTimesPlayed == 0
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Screenshot
|
struct Screenshot
|
||||||
|
|||||||
+57
-10
@@ -475,7 +475,7 @@ int Profile::GetSongNumTimesPlayed( const SongID& songID ) const
|
|||||||
{
|
{
|
||||||
const HighScoresForASteps &hsSteps = j->second;
|
const HighScoresForASteps &hsSteps = j->second;
|
||||||
|
|
||||||
iTotalNumTimesPlayed += hsSteps.hsl.iNumTimesPlayed;
|
iTotalNumTimesPlayed += hsSteps.hsl.GetNumTimesPlayed();
|
||||||
}
|
}
|
||||||
return iTotalNumTimesPlayed;
|
return iTotalNumTimesPlayed;
|
||||||
}
|
}
|
||||||
@@ -541,12 +541,35 @@ HighScoreList& Profile::GetStepsHighScoreList( const Song* pSong, const Steps* p
|
|||||||
|
|
||||||
int Profile::GetStepsNumTimesPlayed( const Song* pSong, const Steps* pSteps ) const
|
int Profile::GetStepsNumTimesPlayed( const Song* pSong, const Steps* pSteps ) const
|
||||||
{
|
{
|
||||||
return GetStepsHighScoreList(pSong,pSteps).iNumTimesPlayed;
|
return GetStepsHighScoreList(pSong,pSteps).GetNumTimesPlayed();
|
||||||
|
}
|
||||||
|
|
||||||
|
DateTime Profile::GetSongLastPlayedDateTime( const Song* pSong ) const
|
||||||
|
{
|
||||||
|
SongID id;
|
||||||
|
id.FromSong( pSong );
|
||||||
|
std::map<SongID,HighScoresForASong>::const_iterator iter = m_SongHighScores.find( id );
|
||||||
|
|
||||||
|
// don't call this unless has been played once
|
||||||
|
ASSERT( iter != m_SongHighScores.end() );
|
||||||
|
ASSERT( !iter->second.m_StepsHighScores.empty() );
|
||||||
|
|
||||||
|
DateTime dtLatest; // starts out zeroed
|
||||||
|
FOREACHM_CONST( StepsID, HighScoresForASteps, iter->second.m_StepsHighScores, i )
|
||||||
|
{
|
||||||
|
const HighScoreList &hsl = i->second.hsl;
|
||||||
|
if( hsl.GetNumTimesPlayed() == 0 )
|
||||||
|
continue;
|
||||||
|
if( dtLatest < hsl.GetLastPlayed() )
|
||||||
|
dtLatest = hsl.GetLastPlayed();
|
||||||
|
}
|
||||||
|
return dtLatest;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Profile::IncrementStepsPlayCount( const Song* pSong, const Steps* pSteps )
|
void Profile::IncrementStepsPlayCount( const Song* pSong, const Steps* pSteps )
|
||||||
{
|
{
|
||||||
GetStepsHighScoreList(pSong,pSteps).iNumTimesPlayed++;
|
DateTime now = DateTime::GetNowDate();
|
||||||
|
GetStepsHighScoreList(pSong,pSteps).IncrementPlayCount( now );
|
||||||
}
|
}
|
||||||
|
|
||||||
void Profile::GetGrades( const Song* pSong, StepsType st, int iCounts[NUM_GRADES] ) const
|
void Profile::GetGrades( const Song* pSong, StepsType st, int iCounts[NUM_GRADES] ) const
|
||||||
@@ -624,14 +647,37 @@ int Profile::GetCourseNumTimesPlayed( const CourseID &courseID ) const
|
|||||||
{
|
{
|
||||||
const HighScoresForATrail &hsTrail = j->second;
|
const HighScoresForATrail &hsTrail = j->second;
|
||||||
|
|
||||||
iTotalNumTimesPlayed += hsTrail.hsl.iNumTimesPlayed;
|
iTotalNumTimesPlayed += hsTrail.hsl.GetNumTimesPlayed();
|
||||||
}
|
}
|
||||||
return iTotalNumTimesPlayed;
|
return iTotalNumTimesPlayed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DateTime Profile::GetCourseLastPlayedDateTime( const Course* pCourse ) const
|
||||||
|
{
|
||||||
|
CourseID id;
|
||||||
|
id.FromCourse( pCourse );
|
||||||
|
std::map<CourseID,HighScoresForACourse>::const_iterator iter = m_CourseHighScores.find( id );
|
||||||
|
|
||||||
|
// don't call this unless has been played once
|
||||||
|
ASSERT( iter != m_CourseHighScores.end() );
|
||||||
|
ASSERT( !iter->second.m_TrailHighScores.empty() );
|
||||||
|
|
||||||
|
DateTime dtLatest; // starts out zeroed
|
||||||
|
FOREACHM_CONST( TrailID, HighScoresForATrail, iter->second.m_TrailHighScores, i )
|
||||||
|
{
|
||||||
|
const HighScoreList &hsl = i->second.hsl;
|
||||||
|
if( hsl.GetNumTimesPlayed() == 0 )
|
||||||
|
continue;
|
||||||
|
if( dtLatest < hsl.GetLastPlayed() )
|
||||||
|
dtLatest = hsl.GetLastPlayed();
|
||||||
|
}
|
||||||
|
return dtLatest;
|
||||||
|
}
|
||||||
|
|
||||||
void Profile::IncrementCoursePlayCount( const Course* pCourse, const Trail* pTrail )
|
void Profile::IncrementCoursePlayCount( const Course* pCourse, const Trail* pTrail )
|
||||||
{
|
{
|
||||||
GetCourseHighScoreList(pCourse,pTrail).iNumTimesPlayed++;
|
DateTime now = DateTime::GetNowDate();
|
||||||
|
GetCourseHighScoreList(pCourse,pTrail).IncrementPlayCount( now );
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -656,13 +702,14 @@ int Profile::GetCategoryNumTimesPlayed( StepsType st ) const
|
|||||||
{
|
{
|
||||||
int iNumTimesPlayed = 0;
|
int iNumTimesPlayed = 0;
|
||||||
FOREACH_RankingCategory( rc )
|
FOREACH_RankingCategory( rc )
|
||||||
iNumTimesPlayed += m_CategoryHighScores[st][rc].iNumTimesPlayed;
|
iNumTimesPlayed += m_CategoryHighScores[st][rc].GetNumTimesPlayed();
|
||||||
return iNumTimesPlayed;
|
return iNumTimesPlayed;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Profile::IncrementCategoryPlayCount( StepsType st, RankingCategory rc )
|
void Profile::IncrementCategoryPlayCount( StepsType st, RankingCategory rc )
|
||||||
{
|
{
|
||||||
m_CategoryHighScores[st][rc].iNumTimesPlayed++;
|
DateTime now = DateTime::GetNowDate();
|
||||||
|
m_CategoryHighScores[st][rc].IncrementPlayCount( now );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1204,7 +1251,7 @@ XNode* Profile::SaveSongScoresCreateNode() const
|
|||||||
const HighScoreList &hsl = hsSteps.hsl;
|
const HighScoreList &hsl = hsSteps.hsl;
|
||||||
|
|
||||||
// skip steps that have never been played
|
// skip steps that have never been played
|
||||||
if( hsl.iNumTimesPlayed == 0 )
|
if( hsl.GetNumTimesPlayed() == 0 )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
XNode* pStepsNode = pSongNode->AppendChild( stepsID.CreateNode() );
|
XNode* pStepsNode = pSongNode->AppendChild( stepsID.CreateNode() );
|
||||||
@@ -1287,7 +1334,7 @@ XNode* Profile::SaveCourseScoresCreateNode() const
|
|||||||
const HighScoreList &hsl = hsTrail.hsl;
|
const HighScoreList &hsl = hsTrail.hsl;
|
||||||
|
|
||||||
// skip steps that have never been played
|
// skip steps that have never been played
|
||||||
if( hsl.iNumTimesPlayed == 0 )
|
if( hsl.GetNumTimesPlayed() == 0 )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
XNode* pTrailNode = pCourseNode->AppendChild( trailID.CreateNode() );
|
XNode* pTrailNode = pCourseNode->AppendChild( trailID.CreateNode() );
|
||||||
@@ -1357,7 +1404,7 @@ XNode* Profile::SaveCategoryScoresCreateNode() const
|
|||||||
FOREACH_RankingCategory( rc )
|
FOREACH_RankingCategory( rc )
|
||||||
{
|
{
|
||||||
// skip steps types/categories that have never been played
|
// skip steps types/categories that have never been played
|
||||||
if( pProfile->GetCategoryHighScoreList(st,rc).iNumTimesPlayed == 0 )
|
if( pProfile->GetCategoryHighScoreList(st,rc).GetNumTimesPlayed() == 0 )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
XNode* pRankingCategoryNode = pStepsTypeNode->AppendChild( "RankingCategory" );
|
XNode* pRankingCategoryNode = pStepsTypeNode->AppendChild( "RankingCategory" );
|
||||||
|
|||||||
@@ -77,8 +77,6 @@ public:
|
|||||||
float GetCoursesPercentComplete( StepsType st, CourseDifficulty cd ) const;
|
float GetCoursesPercentComplete( StepsType st, CourseDifficulty cd ) const;
|
||||||
float GetSongsAndCoursesPercentCompleteAllDifficulties( StepsType st ) const;
|
float GetSongsAndCoursesPercentCompleteAllDifficulties( StepsType st ) const;
|
||||||
static CString GetProfileDisplayNameFromDir( CString sDir );
|
static CString GetProfileDisplayNameFromDir( CString sDir );
|
||||||
int GetSongNumTimesPlayed( const Song* pSong ) const;
|
|
||||||
int GetSongNumTimesPlayed( const SongID& songID ) const;
|
|
||||||
bool GetDefaultModifiers( const Game* pGameType, CString &sModifiersOut ) const;
|
bool GetDefaultModifiers( const Game* pGameType, CString &sModifiersOut ) const;
|
||||||
void SetDefaultModifiers( const Game* pGameType, const CString &sModifiers );
|
void SetDefaultModifiers( const Game* pGameType, const CString &sModifiers );
|
||||||
bool IsCodeUnlocked( int iCode ) const;
|
bool IsCodeUnlocked( int iCode ) const;
|
||||||
@@ -157,7 +155,9 @@ public:
|
|||||||
int GetStepsNumTimesPlayed( const Song* pSong, const Steps* pSteps ) const;
|
int GetStepsNumTimesPlayed( const Song* pSong, const Steps* pSteps ) const;
|
||||||
void IncrementStepsPlayCount( const Song* pSong, const Steps* pSteps );
|
void IncrementStepsPlayCount( const Song* pSong, const Steps* pSteps );
|
||||||
void GetGrades( const Song* pSong, StepsType st, int iCounts[NUM_GRADES] ) const;
|
void GetGrades( const Song* pSong, StepsType st, int iCounts[NUM_GRADES] ) const;
|
||||||
|
int GetSongNumTimesPlayed( const Song* pSong ) const;
|
||||||
|
int GetSongNumTimesPlayed( const SongID& songID ) const;
|
||||||
|
DateTime GetSongLastPlayedDateTime( const Song* pSong ) const;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Course high scores
|
// Course high scores
|
||||||
@@ -179,6 +179,7 @@ public:
|
|||||||
const HighScoreList& GetCourseHighScoreList( const Course* pCourse, const Trail* pTrail ) const;
|
const HighScoreList& GetCourseHighScoreList( const Course* pCourse, const Trail* pTrail ) const;
|
||||||
int GetCourseNumTimesPlayed( const Course* pCourse ) const;
|
int GetCourseNumTimesPlayed( const Course* pCourse ) const;
|
||||||
int GetCourseNumTimesPlayed( const CourseID& courseID ) const;
|
int GetCourseNumTimesPlayed( const CourseID& courseID ) const;
|
||||||
|
DateTime GetCourseLastPlayedDateTime( const Course* pCourse ) const;
|
||||||
void IncrementCoursePlayCount( const Course* pCourse, const Trail* pTrail );
|
void IncrementCoursePlayCount( const Course* pCourse, const Trail* pTrail );
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ AutoScreenMessage( SM_ShowNextPage )
|
|||||||
AutoScreenMessage( SM_HidePage )
|
AutoScreenMessage( SM_HidePage )
|
||||||
|
|
||||||
|
|
||||||
static void GetAllSongsToShow( vector<Song*> &vpOut )
|
static void GetAllSongsToShow( vector<Song*> &vpOut, bool bShowOnlyMostRecentScores, int iNumMostRecentScoresToShow )
|
||||||
{
|
{
|
||||||
vpOut.clear();
|
vpOut.clear();
|
||||||
FOREACH_CONST( Song*, SONGMAN->GetAllSongs(), s )
|
FOREACH_CONST( Song*, SONGMAN->GetAllSongs(), s )
|
||||||
@@ -59,12 +59,18 @@ static void GetAllSongsToShow( vector<Song*> &vpOut )
|
|||||||
continue; // skip
|
continue; // skip
|
||||||
vpOut.push_back( *s );
|
vpOut.push_back( *s );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( bShowOnlyMostRecentScores )
|
||||||
|
{
|
||||||
|
SongUtil::SortByMostRecentlyPlayedForMachine( vpOut );
|
||||||
|
if( vpOut.size() > iNumMostRecentScoresToShow )
|
||||||
|
vpOut.erase( vpOut.begin()+iNumMostRecentScoresToShow, vpOut.end() );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void GetAllCoursesToShow( vector<Course*> &vpOut )
|
static void GetAllCoursesToShow( vector<Course*> &vpOut, bool bShowOnlyMostRecentScores, int iNumMostRecentScoresToShow )
|
||||||
{
|
{
|
||||||
vpOut.clear();
|
vpOut.clear();
|
||||||
|
|
||||||
vector<Course*> vpCourses;
|
vector<Course*> vpCourses;
|
||||||
SONGMAN->GetAllCourses( vpCourses, false );
|
SONGMAN->GetAllCourses( vpCourses, false );
|
||||||
|
|
||||||
@@ -76,6 +82,12 @@ static void GetAllCoursesToShow( vector<Course*> &vpOut )
|
|||||||
continue; // skip
|
continue; // skip
|
||||||
vpOut.push_back( *c );
|
vpOut.push_back( *c );
|
||||||
}
|
}
|
||||||
|
if( bShowOnlyMostRecentScores )
|
||||||
|
{
|
||||||
|
CourseUtil::SortByMostRecentlyPlayedForMachine( vpOut );
|
||||||
|
if( vpOut.size() > iNumMostRecentScoresToShow )
|
||||||
|
vpOut.erase( vpOut.begin()+iNumMostRecentScoresToShow, vpOut.end() );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -87,8 +99,10 @@ ScreenRanking::ScreenRanking( CString sClassName ) : ScreenAttract( sClassName )
|
|||||||
DIFFICULTIES_TO_SHOW (m_sName,"DifficultiesToShow"),
|
DIFFICULTIES_TO_SHOW (m_sName,"DifficultiesToShow"),
|
||||||
|
|
||||||
SHOW_CATEGORIES (m_sName,"ShowCategories"),
|
SHOW_CATEGORIES (m_sName,"ShowCategories"),
|
||||||
SHOW_ALL_STEPS_SCORES (m_sName,"ShowAllStepsScores"),
|
SHOW_STEPS_SCORES (m_sName,"ShowStepsScores"),
|
||||||
SHOW_ALL_COURSE_SCORES (m_sName,"ShowAllCourseScores"),
|
SHOW_COURSE_SCORES (m_sName,"ShowCourseScores"),
|
||||||
|
SHOW_ONLY_MOST_RECENT_SCORES (m_sName,"ShowOnlyMostRecentScores"),
|
||||||
|
NUM_MOST_RECENT_SCORES_TO_SHOW (m_sName,"NumMostRecentScoresToShow"),
|
||||||
SECONDS_PER_PAGE (m_sName,"SecondsPerPage"),
|
SECONDS_PER_PAGE (m_sName,"SecondsPerPage"),
|
||||||
PAGE_FADE_SECONDS (m_sName,"PageFadeSeconds"),
|
PAGE_FADE_SECONDS (m_sName,"PageFadeSeconds"),
|
||||||
NO_SCORE_NAME (m_sName,"NoScoreName"),
|
NO_SCORE_NAME (m_sName,"NoScoreName"),
|
||||||
@@ -208,7 +222,7 @@ void ScreenRanking::Init()
|
|||||||
pts.type = PAGE_TYPE_CATEGORY;
|
pts.type = PAGE_TYPE_CATEGORY;
|
||||||
pts.colorIndex = i;
|
pts.colorIndex = i;
|
||||||
pts.category = (RankingCategory)c;
|
pts.category = (RankingCategory)c;
|
||||||
pts.nt = STEPS_TYPES_TO_SHOW.GetValue()[i];
|
pts.st = STEPS_TYPES_TO_SHOW.GetValue()[i];
|
||||||
m_vPagesToShow.push_back( pts );
|
m_vPagesToShow.push_back( pts );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -224,12 +238,12 @@ void ScreenRanking::Init()
|
|||||||
PageToShow pts;
|
PageToShow pts;
|
||||||
pts.type = PAGE_TYPE_TRAIL;
|
pts.type = PAGE_TYPE_TRAIL;
|
||||||
pts.colorIndex = i;
|
pts.colorIndex = i;
|
||||||
pts.nt = STEPS_TYPES_TO_SHOW.GetValue()[i];
|
pts.st = STEPS_TYPES_TO_SHOW.GetValue()[i];
|
||||||
pts.pCourse = SONGMAN->GetCourseFromPath( asCoursePaths[c] );
|
pts.pCourse = SONGMAN->GetCourseFromPath( asCoursePaths[c] );
|
||||||
if( pts.pCourse == NULL )
|
if( pts.pCourse == NULL )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
pts.pTrail = pts.pCourse->GetTrail( pts.nt );
|
pts.pTrail = pts.pCourse->GetTrail( pts.st );
|
||||||
if( pts.pTrail == NULL )
|
if( pts.pTrail == NULL )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
@@ -263,14 +277,14 @@ void ScreenRanking::Init()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
ASSERT( !SHOW_ALL_STEPS_SCORES || !SHOW_ALL_COURSE_SCORES ); // Can't do both on the same screen
|
ASSERT( !SHOW_STEPS_SCORES || !SHOW_COURSE_SCORES ); // Can't do both on the same screen
|
||||||
|
|
||||||
|
|
||||||
if( SHOW_ALL_STEPS_SCORES )
|
if( SHOW_STEPS_SCORES )
|
||||||
{
|
{
|
||||||
m_vScoreRowItem.clear();
|
m_vScoreRowItem.clear();
|
||||||
vector<Song*> vpSongs;
|
vector<Song*> vpSongs;
|
||||||
GetAllSongsToShow( vpSongs );
|
GetAllSongsToShow( vpSongs, SHOW_ONLY_MOST_RECENT_SCORES, NUM_MOST_RECENT_SCORES_TO_SHOW );
|
||||||
m_vScoreRowItem.resize( vpSongs.size() );
|
m_vScoreRowItem.resize( vpSongs.size() );
|
||||||
FOREACH_CONST( Song*, vpSongs, s )
|
FOREACH_CONST( Song*, vpSongs, s )
|
||||||
{
|
{
|
||||||
@@ -309,16 +323,16 @@ void ScreenRanking::Init()
|
|||||||
PageToShow pts;
|
PageToShow pts;
|
||||||
pts.type = PAGE_TYPE_ALL_STEPS;
|
pts.type = PAGE_TYPE_ALL_STEPS;
|
||||||
pts.colorIndex = i;
|
pts.colorIndex = i;
|
||||||
pts.nt = STEPS_TYPES_TO_SHOW.GetValue()[i];
|
pts.st = STEPS_TYPES_TO_SHOW.GetValue()[i];
|
||||||
m_vPagesToShow.push_back( pts );
|
m_vPagesToShow.push_back( pts );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( SHOW_ALL_COURSE_SCORES )
|
if( SHOW_COURSE_SCORES )
|
||||||
{
|
{
|
||||||
vector<Course*> vpCourses;
|
vector<Course*> vpCourses;
|
||||||
GetAllCoursesToShow( vpCourses );
|
GetAllCoursesToShow( vpCourses, SHOW_ONLY_MOST_RECENT_SCORES, NUM_MOST_RECENT_SCORES_TO_SHOW );
|
||||||
LOG->Trace("rankings: adding %u courses", vpCourses.size());
|
LOG->Trace("rankings: adding %u courses", vpCourses.size());
|
||||||
m_vScoreRowItem.resize( vpCourses.size() );
|
m_vScoreRowItem.resize( vpCourses.size() );
|
||||||
FOREACH_CONST( Course*, vpCourses, c )
|
FOREACH_CONST( Course*, vpCourses, c )
|
||||||
@@ -360,7 +374,7 @@ void ScreenRanking::Init()
|
|||||||
PageToShow pts;
|
PageToShow pts;
|
||||||
pts.type = PAGE_TYPE_ALL_COURSES;
|
pts.type = PAGE_TYPE_ALL_COURSES;
|
||||||
pts.colorIndex = i;
|
pts.colorIndex = i;
|
||||||
pts.nt = STEPS_TYPES_TO_SHOW.GetValue()[i];
|
pts.st = STEPS_TYPES_TO_SHOW.GetValue()[i];
|
||||||
m_vPagesToShow.push_back( pts );
|
m_vPagesToShow.push_back( pts );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -721,11 +735,11 @@ float ScreenRanking::SetPage( PageToShow pts )
|
|||||||
case PAGE_TYPE_CATEGORY:
|
case PAGE_TYPE_CATEGORY:
|
||||||
{
|
{
|
||||||
m_textCategory.SetText( ssprintf("Type %c", 'A'+pts.category) );
|
m_textCategory.SetText( ssprintf("Type %c", 'A'+pts.category) );
|
||||||
m_textStepsType.SetText( GameManager::StepsTypeToThemedString(pts.nt) );
|
m_textStepsType.SetText( GameManager::StepsTypeToThemedString(pts.st) );
|
||||||
|
|
||||||
for( int l=0; l<NUM_RANKING_LINES; l++ )
|
for( int l=0; l<NUM_RANKING_LINES; l++ )
|
||||||
{
|
{
|
||||||
HighScoreList& hsl = PROFILEMAN->GetMachineProfile()->GetCategoryHighScoreList(pts.nt,pts.category);
|
HighScoreList& hsl = PROFILEMAN->GetMachineProfile()->GetCategoryHighScoreList(pts.st,pts.category);
|
||||||
HighScore hs;
|
HighScore hs;
|
||||||
bool bRecentHighScore = false;
|
bool bRecentHighScore = false;
|
||||||
if( l < (int)hsl.vHighScores.size() )
|
if( l < (int)hsl.vHighScores.size() )
|
||||||
@@ -761,7 +775,7 @@ float ScreenRanking::SetPage( PageToShow pts )
|
|||||||
{
|
{
|
||||||
m_textCourseTitle.SetText( pts.pCourse->GetFullDisplayTitle() );
|
m_textCourseTitle.SetText( pts.pCourse->GetFullDisplayTitle() );
|
||||||
m_Banner.LoadFromCourse( pts.pCourse );
|
m_Banner.LoadFromCourse( pts.pCourse );
|
||||||
m_textStepsType.SetText( GameManager::StepsTypeToThemedString(pts.nt) );
|
m_textStepsType.SetText( GameManager::StepsTypeToThemedString(pts.st) );
|
||||||
|
|
||||||
const HighScoreList &hsl = PROFILEMAN->GetMachineProfile()->GetCourseHighScoreList( pts.pCourse, pts.pTrail );
|
const HighScoreList &hsl = PROFILEMAN->GetMachineProfile()->GetCourseHighScoreList( pts.pCourse, pts.pTrail );
|
||||||
for( int l=0; l<NUM_RANKING_LINES; l++ )
|
for( int l=0; l<NUM_RANKING_LINES; l++ )
|
||||||
@@ -810,7 +824,7 @@ float ScreenRanking::SetPage( PageToShow pts )
|
|||||||
return SECONDS_PER_PAGE;
|
return SECONDS_PER_PAGE;
|
||||||
case PAGE_TYPE_ALL_STEPS:
|
case PAGE_TYPE_ALL_STEPS:
|
||||||
{
|
{
|
||||||
m_textStepsType.SetText( GameManager::StepsTypeToThemedString(pts.nt) );
|
m_textStepsType.SetText( GameManager::StepsTypeToThemedString(pts.st) );
|
||||||
|
|
||||||
for( unsigned s=0; s<m_vScoreRowItem.size(); s++ )
|
for( unsigned s=0; s<m_vScoreRowItem.size(); s++ )
|
||||||
{
|
{
|
||||||
@@ -821,7 +835,7 @@ float ScreenRanking::SetPage( PageToShow pts )
|
|||||||
|
|
||||||
FOREACH_CONST( Difficulty, DIFFICULTIES_TO_SHOW.GetValue(), iter )
|
FOREACH_CONST( Difficulty, DIFFICULTIES_TO_SHOW.GetValue(), iter )
|
||||||
{
|
{
|
||||||
const Steps* pSteps = pSong->GetStepsByDifficulty( pts.nt, *iter, false );
|
const Steps* pSteps = pSong->GetStepsByDifficulty( pts.st, *iter, false );
|
||||||
BitmapText* pTextStepsScore = &item.m_textScore[*iter];
|
BitmapText* pTextStepsScore = &item.m_textScore[*iter];
|
||||||
|
|
||||||
if( pSteps == NULL )
|
if( pSteps == NULL )
|
||||||
@@ -853,7 +867,7 @@ float ScreenRanking::SetPage( PageToShow pts )
|
|||||||
return m_ListScoreRowItems.GetSecondsForCompleteScrollThrough();
|
return m_ListScoreRowItems.GetSecondsForCompleteScrollThrough();
|
||||||
case PAGE_TYPE_ALL_COURSES:
|
case PAGE_TYPE_ALL_COURSES:
|
||||||
{
|
{
|
||||||
m_textStepsType.SetText( GameManager::StepsTypeToThemedString(pts.nt) );
|
m_textStepsType.SetText( GameManager::StepsTypeToThemedString(pts.st) );
|
||||||
|
|
||||||
for( unsigned c=0; c<m_vScoreRowItem.size(); c++ )
|
for( unsigned c=0; c<m_vScoreRowItem.size(); c++ )
|
||||||
{
|
{
|
||||||
@@ -865,7 +879,7 @@ float ScreenRanking::SetPage( PageToShow pts )
|
|||||||
{
|
{
|
||||||
BitmapText* pTextStepsScore = &item.m_textScore[cd];
|
BitmapText* pTextStepsScore = &item.m_textScore[cd];
|
||||||
|
|
||||||
Trail *pTrail = pCourse->GetTrail( pts.nt, cd );
|
Trail *pTrail = pCourse->GetTrail( pts.st, cd );
|
||||||
pTextStepsScore->SetHidden( pTrail==NULL );
|
pTextStepsScore->SetHidden( pTrail==NULL );
|
||||||
if( pTrail == NULL )
|
if( pTrail == NULL )
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ protected:
|
|||||||
|
|
||||||
PageType type;
|
PageType type;
|
||||||
int colorIndex;
|
int colorIndex;
|
||||||
StepsType nt;
|
StepsType st;
|
||||||
RankingCategory category;
|
RankingCategory category;
|
||||||
Course* pCourse;
|
Course* pCourse;
|
||||||
Trail* pTrail;
|
Trail* pTrail;
|
||||||
@@ -105,8 +105,10 @@ protected:
|
|||||||
ThemeMetricDifficultiesToShow DIFFICULTIES_TO_SHOW;
|
ThemeMetricDifficultiesToShow DIFFICULTIES_TO_SHOW;
|
||||||
|
|
||||||
ThemeMetric<bool> SHOW_CATEGORIES;
|
ThemeMetric<bool> SHOW_CATEGORIES;
|
||||||
ThemeMetric<bool> SHOW_ALL_STEPS_SCORES;
|
ThemeMetric<bool> SHOW_STEPS_SCORES;
|
||||||
ThemeMetric<bool> SHOW_ALL_COURSE_SCORES;
|
ThemeMetric<bool> SHOW_COURSE_SCORES;
|
||||||
|
ThemeMetric<bool> SHOW_ONLY_MOST_RECENT_SCORES;
|
||||||
|
ThemeMetric<int> NUM_MOST_RECENT_SCORES_TO_SHOW;
|
||||||
ThemeMetric<float> SECONDS_PER_PAGE;
|
ThemeMetric<float> SECONDS_PER_PAGE;
|
||||||
ThemeMetric<float> PAGE_FADE_SECONDS;
|
ThemeMetric<float> PAGE_FADE_SECONDS;
|
||||||
ThemeMetric<CString> NO_SCORE_NAME;
|
ThemeMetric<CString> NO_SCORE_NAME;
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ static const ThemeMetric<int> NUM_GROUP_COLORS ("SongManager","NumGroupColors")
|
|||||||
#define GROUP_COLOR( i ) THEME->GetMetricC("SongManager",ssprintf("GroupColor%d",i+1))
|
#define GROUP_COLOR( i ) THEME->GetMetricC("SongManager",ssprintf("GroupColor%d",i+1))
|
||||||
static const ThemeMetric<RageColor> BEGINNER_COLOR ("SongManager","BeginnerColor");
|
static const ThemeMetric<RageColor> BEGINNER_COLOR ("SongManager","BeginnerColor");
|
||||||
static const ThemeMetric<RageColor> EASY_COLOR ("SongManager","EasyColor");
|
static const ThemeMetric<RageColor> EASY_COLOR ("SongManager","EasyColor");
|
||||||
static const ThemeMetric<RageColor> MEDIUM_COLOR ("SongManager","MediumColor");
|
static const ThemeMetric<RageColor> MEDIUM_COLOR ("SongManager","MediumColor");
|
||||||
static const ThemeMetric<RageColor> HARD_COLOR ("SongManager","HardColor");
|
static const ThemeMetric<RageColor> HARD_COLOR ("SongManager","HardColor");
|
||||||
static const ThemeMetric<RageColor> CHALLENGE_COLOR ("SongManager","ChallengeColor");
|
static const ThemeMetric<RageColor> CHALLENGE_COLOR ("SongManager","ChallengeColor");
|
||||||
static const ThemeMetric<RageColor> EDIT_COLOR ("SongManager","EditColor");
|
static const ThemeMetric<RageColor> EDIT_COLOR ("SongManager","EditColor");
|
||||||
|
|||||||
+58
-42
@@ -9,6 +9,7 @@
|
|||||||
#include "SongManager.h"
|
#include "SongManager.h"
|
||||||
#include "XmlFile.h"
|
#include "XmlFile.h"
|
||||||
#include "PrefsManager.h"
|
#include "PrefsManager.h"
|
||||||
|
#include "Foreach.h"
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////
|
/////////////////////////////////////
|
||||||
@@ -69,9 +70,9 @@ bool CompareSongPointersByTitle(const Song *pSong1, const Song *pSong2)
|
|||||||
return pSong1->GetSongFilePath().CompareNoCase(pSong2->GetSongFilePath()) < 0;
|
return pSong1->GetSongFilePath().CompareNoCase(pSong2->GetSongFilePath()) < 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SongUtil::SortSongPointerArrayByTitle( vector<Song*> &arraySongPointers )
|
void SongUtil::SortSongPointerArrayByTitle( vector<Song*> &vpSongsInOut )
|
||||||
{
|
{
|
||||||
sort( arraySongPointers.begin(), arraySongPointers.end(), CompareSongPointersByTitle );
|
sort( vpSongsInOut.begin(), vpSongsInOut.end(), CompareSongPointersByTitle );
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CompareSongPointersByBPM(const Song *pSong1, const Song *pSong2)
|
bool CompareSongPointersByBPM(const Song *pSong1, const Song *pSong2)
|
||||||
@@ -88,9 +89,9 @@ bool CompareSongPointersByBPM(const Song *pSong1, const Song *pSong2)
|
|||||||
return CompareCStringsAsc( pSong1->GetSongFilePath(), pSong2->GetSongFilePath() );
|
return CompareCStringsAsc( pSong1->GetSongFilePath(), pSong2->GetSongFilePath() );
|
||||||
}
|
}
|
||||||
|
|
||||||
void SongUtil::SortSongPointerArrayByBPM( vector<Song*> &arraySongPointers )
|
void SongUtil::SortSongPointerArrayByBPM( vector<Song*> &vpSongsInOut )
|
||||||
{
|
{
|
||||||
sort( arraySongPointers.begin(), arraySongPointers.end(), CompareSongPointersByBPM );
|
sort( vpSongsInOut.begin(), vpSongsInOut.end(), CompareSongPointersByBPM );
|
||||||
}
|
}
|
||||||
|
|
||||||
void AppendOctal( int n, int digits, CString &out )
|
void AppendOctal( int n, int digits, CString &out )
|
||||||
@@ -106,17 +107,17 @@ void AppendOctal( int n, int digits, CString &out )
|
|||||||
bool CompDescending( const pair<Song *, CString> &a, const pair<Song *, CString> &b )
|
bool CompDescending( const pair<Song *, CString> &a, const pair<Song *, CString> &b )
|
||||||
{ return a.second > b.second; }
|
{ return a.second > b.second; }
|
||||||
|
|
||||||
void SongUtil::SortSongPointerArrayByGrade( vector<Song*> &arraySongPointers )
|
void SongUtil::SortSongPointerArrayByGrade( vector<Song*> &vpSongsInOut )
|
||||||
{
|
{
|
||||||
/* Optimize by pre-writing a string to compare, since doing GetNumNotesWithGrade
|
/* Optimize by pre-writing a string to compare, since doing GetNumNotesWithGrade
|
||||||
* inside the sort is too slow. */
|
* inside the sort is too slow. */
|
||||||
typedef pair< Song *, CString > val;
|
typedef pair< Song *, CString > val;
|
||||||
vector<val> vals;
|
vector<val> vals;
|
||||||
vals.reserve( arraySongPointers.size() );
|
vals.reserve( vpSongsInOut.size() );
|
||||||
|
|
||||||
for( unsigned i = 0; i < arraySongPointers.size(); ++i )
|
for( unsigned i = 0; i < vpSongsInOut.size(); ++i )
|
||||||
{
|
{
|
||||||
Song *pSong = arraySongPointers[i];
|
Song *pSong = vpSongsInOut[i];
|
||||||
|
|
||||||
int iCounts[NUM_GRADES];
|
int iCounts[NUM_GRADES];
|
||||||
PROFILEMAN->GetMachineProfile()->GetGrades( pSong, GAMESTATE->GetCurrentStyle()->m_StepsType, iCounts );
|
PROFILEMAN->GetMachineProfile()->GetGrades( pSong, GAMESTATE->GetCurrentStyle()->m_StepsType, iCounts );
|
||||||
@@ -130,25 +131,25 @@ void SongUtil::SortSongPointerArrayByGrade( vector<Song*> &arraySongPointers )
|
|||||||
|
|
||||||
sort( vals.begin(), vals.end(), CompDescending );
|
sort( vals.begin(), vals.end(), CompDescending );
|
||||||
|
|
||||||
for( unsigned i = 0; i < arraySongPointers.size(); ++i )
|
for( unsigned i = 0; i < vpSongsInOut.size(); ++i )
|
||||||
arraySongPointers[i] = vals[i].first;
|
vpSongsInOut[i] = vals[i].first;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void SongUtil::SortSongPointerArrayByArtist( vector<Song*> &arraySongPointers )
|
void SongUtil::SortSongPointerArrayByArtist( vector<Song*> &vpSongsInOut )
|
||||||
{
|
{
|
||||||
for( unsigned i = 0; i < arraySongPointers.size(); ++i )
|
for( unsigned i = 0; i < vpSongsInOut.size(); ++i )
|
||||||
song_sort_val[arraySongPointers[i]] = MakeSortString( arraySongPointers[i]->GetTranslitArtist() );
|
song_sort_val[vpSongsInOut[i]] = MakeSortString( vpSongsInOut[i]->GetTranslitArtist() );
|
||||||
stable_sort( arraySongPointers.begin(), arraySongPointers.end(), CompareSongPointersBySortValueAscending );
|
stable_sort( vpSongsInOut.begin(), vpSongsInOut.end(), CompareSongPointersBySortValueAscending );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This is for internal use, not display; sorting by Unicode codepoints isn't very
|
/* This is for internal use, not display; sorting by Unicode codepoints isn't very
|
||||||
* interesting for display. */
|
* interesting for display. */
|
||||||
void SongUtil::SortSongPointerArrayByDisplayArtist( vector<Song*> &arraySongPointers )
|
void SongUtil::SortSongPointerArrayByDisplayArtist( vector<Song*> &vpSongsInOut )
|
||||||
{
|
{
|
||||||
for( unsigned i = 0; i < arraySongPointers.size(); ++i )
|
for( unsigned i = 0; i < vpSongsInOut.size(); ++i )
|
||||||
song_sort_val[arraySongPointers[i]] = MakeSortString( arraySongPointers[i]->GetDisplayArtist() );
|
song_sort_val[vpSongsInOut[i]] = MakeSortString( vpSongsInOut[i]->GetDisplayArtist() );
|
||||||
stable_sort( arraySongPointers.begin(), arraySongPointers.end(), CompareSongPointersBySortValueAscending );
|
stable_sort( vpSongsInOut.begin(), vpSongsInOut.end(), CompareSongPointersBySortValueAscending );
|
||||||
}
|
}
|
||||||
|
|
||||||
static int CompareSongPointersByGenre(const Song *pSong1, const Song *pSong2)
|
static int CompareSongPointersByGenre(const Song *pSong1, const Song *pSong2)
|
||||||
@@ -156,9 +157,9 @@ static int CompareSongPointersByGenre(const Song *pSong1, const Song *pSong2)
|
|||||||
return pSong1->m_sGenre < pSong2->m_sGenre;
|
return pSong1->m_sGenre < pSong2->m_sGenre;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SongUtil::SortSongPointerArrayByGenre( vector<Song*> &arraySongPointers )
|
void SongUtil::SortSongPointerArrayByGenre( vector<Song*> &vpSongsInOut )
|
||||||
{
|
{
|
||||||
stable_sort( arraySongPointers.begin(), arraySongPointers.end(), CompareSongPointersByGenre );
|
stable_sort( vpSongsInOut.begin(), vpSongsInOut.end(), CompareSongPointersByGenre );
|
||||||
}
|
}
|
||||||
|
|
||||||
static int CompareSongPointersByGroup(const Song *pSong1, const Song *pSong2)
|
static int CompareSongPointersByGroup(const Song *pSong1, const Song *pSong2)
|
||||||
@@ -166,10 +167,10 @@ static int CompareSongPointersByGroup(const Song *pSong1, const Song *pSong2)
|
|||||||
return pSong1->m_sGroupName < pSong2->m_sGroupName;
|
return pSong1->m_sGroupName < pSong2->m_sGroupName;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SongUtil::SortSongPointerArrayByGroupAndDifficulty( vector<Song*> &arraySongPointers )
|
void SongUtil::SortSongPointerArrayByGroupAndDifficulty( vector<Song*> &vpSongsInOut )
|
||||||
{
|
{
|
||||||
SortSongPointerArrayByMeter( arraySongPointers, DIFFICULTY_EASY );
|
SortSongPointerArrayByMeter( vpSongsInOut, DIFFICULTY_EASY );
|
||||||
stable_sort( arraySongPointers.begin(), arraySongPointers.end(), CompareSongPointersByGroup );
|
stable_sort( vpSongsInOut.begin(), vpSongsInOut.end(), CompareSongPointersByGroup );
|
||||||
}
|
}
|
||||||
|
|
||||||
int CompareSongPointersByGroupAndTitle(const Song *pSong1, const Song *pSong2)
|
int CompareSongPointersByGroupAndTitle(const Song *pSong1, const Song *pSong2)
|
||||||
@@ -186,25 +187,25 @@ int CompareSongPointersByGroupAndTitle(const Song *pSong1, const Song *pSong2)
|
|||||||
return CompareSongPointersByTitle( pSong1, pSong2 );
|
return CompareSongPointersByTitle( pSong1, pSong2 );
|
||||||
}
|
}
|
||||||
|
|
||||||
void SongUtil::SortSongPointerArrayByGroupAndTitle( vector<Song*> &arraySongPointers )
|
void SongUtil::SortSongPointerArrayByGroupAndTitle( vector<Song*> &vpSongsInOut )
|
||||||
{
|
{
|
||||||
sort( arraySongPointers.begin(), arraySongPointers.end(), CompareSongPointersByGroupAndTitle );
|
sort( vpSongsInOut.begin(), vpSongsInOut.end(), CompareSongPointersByGroupAndTitle );
|
||||||
}
|
}
|
||||||
|
|
||||||
void SongUtil::SortSongPointerArrayByNumPlays( vector<Song*> &arraySongPointers, ProfileSlot slot, bool bDescending )
|
void SongUtil::SortSongPointerArrayByNumPlays( vector<Song*> &vpSongsInOut, ProfileSlot slot, bool bDescending )
|
||||||
{
|
{
|
||||||
Profile* pProfile = PROFILEMAN->GetProfile(slot);
|
Profile* pProfile = PROFILEMAN->GetProfile(slot);
|
||||||
if( pProfile == NULL )
|
if( pProfile == NULL )
|
||||||
return; // nothing to do since we don't have data
|
return; // nothing to do since we don't have data
|
||||||
SortSongPointerArrayByNumPlays( arraySongPointers, pProfile, bDescending );
|
SortSongPointerArrayByNumPlays( vpSongsInOut, pProfile, bDescending );
|
||||||
}
|
}
|
||||||
|
|
||||||
void SongUtil::SortSongPointerArrayByNumPlays( vector<Song*> &arraySongPointers, const Profile* pProfile, bool bDescending )
|
void SongUtil::SortSongPointerArrayByNumPlays( vector<Song*> &vpSongsInOut, const Profile* pProfile, bool bDescending )
|
||||||
{
|
{
|
||||||
ASSERT( pProfile );
|
ASSERT( pProfile );
|
||||||
for(unsigned i = 0; i < arraySongPointers.size(); ++i)
|
for(unsigned i = 0; i < vpSongsInOut.size(); ++i)
|
||||||
song_sort_val[arraySongPointers[i]] = ssprintf("%9i", pProfile->GetSongNumTimesPlayed(arraySongPointers[i]));
|
song_sort_val[vpSongsInOut[i]] = ssprintf("%9i", pProfile->GetSongNumTimesPlayed(vpSongsInOut[i]));
|
||||||
stable_sort( arraySongPointers.begin(), arraySongPointers.end(), bDescending ? CompareSongPointersBySortValueDescending : CompareSongPointersBySortValueAscending );
|
stable_sort( vpSongsInOut.begin(), vpSongsInOut.end(), bDescending ? CompareSongPointersBySortValueDescending : CompareSongPointersBySortValueAscending );
|
||||||
song_sort_val.clear();
|
song_sort_val.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -309,35 +310,35 @@ CString SongUtil::GetSectionNameFromSongAndSort( const Song* pSong, SortOrder so
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SongUtil::SortSongPointerArrayBySectionName( vector<Song*> &arraySongPointers, SortOrder so )
|
void SongUtil::SortSongPointerArrayBySectionName( vector<Song*> &vpSongsInOut, SortOrder so )
|
||||||
{
|
{
|
||||||
for(unsigned i = 0; i < arraySongPointers.size(); ++i)
|
for(unsigned i = 0; i < vpSongsInOut.size(); ++i)
|
||||||
{
|
{
|
||||||
CString val = GetSectionNameFromSongAndSort( arraySongPointers[i], so );
|
CString val = GetSectionNameFromSongAndSort( vpSongsInOut[i], so );
|
||||||
|
|
||||||
/* Make sure NUM comes first and OTHER comes last. */
|
/* Make sure NUM comes first and OTHER comes last. */
|
||||||
if( val == "NUM" ) val = "0";
|
if( val == "NUM" ) val = "0";
|
||||||
else if( val == "OTHER" ) val = "2";
|
else if( val == "OTHER" ) val = "2";
|
||||||
else val = "1" + MakeSortString(val);
|
else val = "1" + MakeSortString(val);
|
||||||
|
|
||||||
song_sort_val[arraySongPointers[i]] = val;
|
song_sort_val[vpSongsInOut[i]] = val;
|
||||||
}
|
}
|
||||||
|
|
||||||
stable_sort( arraySongPointers.begin(), arraySongPointers.end(), CompareSongPointersBySortValueAscending );
|
stable_sort( vpSongsInOut.begin(), vpSongsInOut.end(), CompareSongPointersBySortValueAscending );
|
||||||
song_sort_val.clear();
|
song_sort_val.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SongUtil::SortSongPointerArrayByMeter( vector<Song*> &arraySongPointers, Difficulty dc )
|
void SongUtil::SortSongPointerArrayByMeter( vector<Song*> &vpSongsInOut, Difficulty dc )
|
||||||
{
|
{
|
||||||
song_sort_val.clear();
|
song_sort_val.clear();
|
||||||
for(unsigned i = 0; i < arraySongPointers.size(); ++i)
|
for(unsigned i = 0; i < vpSongsInOut.size(); ++i)
|
||||||
{
|
{
|
||||||
const Steps* pSteps = arraySongPointers[i]->GetClosestNotes( GAMESTATE->GetCurrentStyle()->m_StepsType, dc );
|
const Steps* pSteps = vpSongsInOut[i]->GetClosestNotes( GAMESTATE->GetCurrentStyle()->m_StepsType, dc );
|
||||||
CString &s = song_sort_val[arraySongPointers[i]];
|
CString &s = song_sort_val[vpSongsInOut[i]];
|
||||||
s = ssprintf("%03d", pSteps ? pSteps->GetMeter() : 0);
|
s = ssprintf("%03d", pSteps ? pSteps->GetMeter() : 0);
|
||||||
|
|
||||||
/* Hack: always put tutorial songs first. */
|
/* Hack: always put tutorial songs first. */
|
||||||
s += ssprintf( "%c", arraySongPointers[i]->IsTutorial()? '0':'1' );
|
s += ssprintf( "%c", vpSongsInOut[i]->IsTutorial()? '0':'1' );
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* pSteps may not be exactly the difficulty we want; for example, we may
|
* pSteps may not be exactly the difficulty we want; for example, we may
|
||||||
@@ -354,7 +355,22 @@ void SongUtil::SortSongPointerArrayByMeter( vector<Song*> &arraySongPointers, Di
|
|||||||
if( PREFSMAN->m_bSubSortByNumSteps )
|
if( PREFSMAN->m_bSubSortByNumSteps )
|
||||||
s += ssprintf("%06.0f",pSteps ? pSteps->GetRadarValues()[RADAR_NUM_TAPS_AND_HOLDS] : 0);
|
s += ssprintf("%06.0f",pSteps ? pSteps->GetRadarValues()[RADAR_NUM_TAPS_AND_HOLDS] : 0);
|
||||||
}
|
}
|
||||||
stable_sort( arraySongPointers.begin(), arraySongPointers.end(), CompareSongPointersBySortValueAscending );
|
stable_sort( vpSongsInOut.begin(), vpSongsInOut.end(), CompareSongPointersBySortValueAscending );
|
||||||
|
}
|
||||||
|
|
||||||
|
void SongUtil::SortByMostRecentlyPlayedForMachine( vector<Song*> &vpSongsInOut )
|
||||||
|
{
|
||||||
|
Profile *pProfile = PROFILEMAN->GetMachineProfile();
|
||||||
|
|
||||||
|
FOREACH_CONST( Song*, vpSongsInOut, s )
|
||||||
|
{
|
||||||
|
int iNumTimesPlayed = pProfile->GetSongNumTimesPlayed( *s );
|
||||||
|
CString val = iNumTimesPlayed ? pProfile->GetSongLastPlayedDateTime(*s).GetString() : "9999999999999";
|
||||||
|
song_sort_val[*s] = val;
|
||||||
|
}
|
||||||
|
|
||||||
|
stable_sort( vpSongsInOut.begin(), vpSongsInOut.end(), CompareSongPointersBySortValueAscending );
|
||||||
|
song_sort_val.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
//////////////////////////////////
|
//////////////////////////////////
|
||||||
|
|||||||
+13
-12
@@ -13,19 +13,20 @@ struct XNode;
|
|||||||
namespace SongUtil
|
namespace SongUtil
|
||||||
{
|
{
|
||||||
CString MakeSortString( CString s );
|
CString MakeSortString( CString s );
|
||||||
void SortSongPointerArrayByTitle( vector<Song*> &arraySongPointers );
|
void SortSongPointerArrayByTitle( vector<Song*> &vpSongsInOut );
|
||||||
void SortSongPointerArrayByBPM( vector<Song*> &arraySongPointers );
|
void SortSongPointerArrayByBPM( vector<Song*> &vpSongsInOut );
|
||||||
void SortSongPointerArrayByGrade( vector<Song*> &arraySongPointers );
|
void SortSongPointerArrayByGrade( vector<Song*> &vpSongsInOut );
|
||||||
void SortSongPointerArrayByArtist( vector<Song*> &arraySongPointers );
|
void SortSongPointerArrayByArtist( vector<Song*> &vpSongsInOut );
|
||||||
void SortSongPointerArrayByDisplayArtist( vector<Song*> &arraySongPointers );
|
void SortSongPointerArrayByDisplayArtist( vector<Song*> &vpSongsInOut );
|
||||||
void SortSongPointerArrayByGenre( vector<Song*> &arraySongPointers );
|
void SortSongPointerArrayByGenre( vector<Song*> &vpSongsInOut );
|
||||||
void SortSongPointerArrayByGroupAndDifficulty( vector<Song*> &arraySongPointers );
|
void SortSongPointerArrayByGroupAndDifficulty( vector<Song*> &vpSongsInOut );
|
||||||
void SortSongPointerArrayByGroupAndTitle( vector<Song*> &arraySongPointers );
|
void SortSongPointerArrayByGroupAndTitle( vector<Song*> &vpSongsInOut );
|
||||||
void SortSongPointerArrayByNumPlays( vector<Song*> &arraySongPointers, ProfileSlot slot, bool bDescending );
|
void SortSongPointerArrayByNumPlays( vector<Song*> &vpSongsInOut, ProfileSlot slot, bool bDescending );
|
||||||
void SortSongPointerArrayByNumPlays( vector<Song*> &arraySongPointers, const Profile* pProfile, bool bDescending );
|
void SortSongPointerArrayByNumPlays( vector<Song*> &vpSongsInOut, const Profile* pProfile, bool bDescending );
|
||||||
void SortSongPointerArrayByMeter( vector<Song*> &arraySongPointers, Difficulty dc );
|
void SortSongPointerArrayByMeter( vector<Song*> &vpSongsInOut, Difficulty dc );
|
||||||
CString GetSectionNameFromSongAndSort( const Song* pSong, SortOrder so );
|
CString GetSectionNameFromSongAndSort( const Song* pSong, SortOrder so );
|
||||||
void SortSongPointerArrayBySectionName( vector<Song*> &arraySongPointers, SortOrder so );
|
void SortSongPointerArrayBySectionName( vector<Song*> &vpSongsInOut, SortOrder so );
|
||||||
|
void SortByMostRecentlyPlayedForMachine( vector<Song*> &vpSongsInOut );
|
||||||
}
|
}
|
||||||
|
|
||||||
class SongID
|
class SongID
|
||||||
|
|||||||
@@ -14,14 +14,14 @@ namespace StepsUtil
|
|||||||
bool CompareNotesPointersByRadarValues(const Steps* pSteps1, const Steps* pSteps2);
|
bool CompareNotesPointersByRadarValues(const Steps* pSteps1, const Steps* pSteps2);
|
||||||
bool CompareNotesPointersByMeter(const Steps *pSteps1, const Steps* pSteps2);
|
bool CompareNotesPointersByMeter(const Steps *pSteps1, const Steps* pSteps2);
|
||||||
bool CompareNotesPointersByDifficulty(const Steps *pSteps1, const Steps *pSteps2);
|
bool CompareNotesPointersByDifficulty(const Steps *pSteps1, const Steps *pSteps2);
|
||||||
void SortNotesArrayByDifficulty( vector<Steps*> &arrayNotess );
|
void SortNotesArrayByDifficulty( vector<Steps*> &vpStepsInOut );
|
||||||
bool CompareStepsPointersByTypeAndDifficulty(const Steps *pStep1, const Steps *pStep2);
|
bool CompareStepsPointersByTypeAndDifficulty(const Steps *pStep1, const Steps *pStep2);
|
||||||
void SortStepsByTypeAndDifficulty( vector<Steps*> &arraySongPointers );
|
void SortStepsByTypeAndDifficulty( vector<Steps*> &vpStepsInOut );
|
||||||
void SortStepsPointerArrayByNumPlays( vector<Steps*> &vStepsPointers, ProfileSlot slot, bool bDescending );
|
void SortStepsPointerArrayByNumPlays( vector<Steps*> &vpStepsInOut, ProfileSlot slot, bool bDescending );
|
||||||
void SortStepsPointerArrayByNumPlays( vector<Steps*> &vStepsPointers, const Profile* pProfile, bool bDescending );
|
void SortStepsPointerArrayByNumPlays( vector<Steps*> &vpStepsInOut, const Profile* pProfile, bool bDescending );
|
||||||
bool CompareStepsPointersByDescription(const Steps *pStep1, const Steps *pStep2);
|
bool CompareStepsPointersByDescription(const Steps *pStep1, const Steps *pStep2);
|
||||||
void SortStepsByDescription( vector<Steps*> &vStepsPointers );
|
void SortStepsByDescription( vector<Steps*> &vpStepsInOut );
|
||||||
void RemoveLockedSteps( const Song *pSong, vector<Steps*> &arrayNotess );
|
void RemoveLockedSteps( const Song *pSong, vector<Steps*> &vpStepsInOut );
|
||||||
};
|
};
|
||||||
|
|
||||||
class StepsID
|
class StepsID
|
||||||
|
|||||||
Reference in New Issue
Block a user