and SORT_GRADE fixes
This commit is contained in:
@@ -532,7 +532,7 @@ void MusicWheel::BuildWheelItemDatas( vector<WheelItemData> &arrayWheelItemDatas
|
||||
* so don't re-sort for them. */
|
||||
// /* We're using sections, so use the section name as the top-level
|
||||
// * sort. */
|
||||
if( so != SORT_BPM )
|
||||
if( so != SORT_GRADE && so != SORT_BPM )
|
||||
SortSongPointerArrayBySectionName(arraySongs, so);
|
||||
|
||||
// make WheelItemDatas with sections
|
||||
|
||||
@@ -1298,11 +1298,11 @@ void SortSongPointerArrayByBPM( vector<Song*> &arraySongPointers )
|
||||
|
||||
void AppendOctal( int n, int digits, CString &out )
|
||||
{
|
||||
for( int p = digits; p >= 0; --p )
|
||||
for( int p = digits-1; p >= 0; --p )
|
||||
{
|
||||
const int shift = p*3;
|
||||
int n2 = (n >> shift) & 0x7;
|
||||
out.insert( out.begin(), (char) n2 );
|
||||
out.insert( out.end(), (char) (n2+'0') );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1324,7 +1324,7 @@ void SortSongPointerArrayByGrade( vector<Song*> &arraySongPointers )
|
||||
|
||||
CString foo;
|
||||
foo.reserve(256);
|
||||
for( int g=NUM_GRADES-1; g>GRADE_NO_DATA; g-- )
|
||||
for( int g=GRADE_TIER_1; g<=GRADE_NO_DATA; ++g )
|
||||
{
|
||||
int n = pSong->GetNumNotesWithGrade( (Grade)g );
|
||||
AppendOctal( n, 3, foo );
|
||||
|
||||
Reference in New Issue
Block a user