[CourseLoaderCRS] Fixed loading of Player's Best/Most Played courses, probably others too.

This commit is contained in:
AJ Kelly
2011-04-23 16:04:40 -05:00
parent 3a8395820b
commit 1d0fb92ebe
2 changed files with 7 additions and 1 deletions
+5
View File
@@ -13,6 +13,11 @@ _____________________________________________________________________________
sm-ssc v1.2.5 | 201104?? sm-ssc v1.2.5 | 201104??
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
20110423
--------
* [CourseLoaderCRS] Fixed loading of Player's Best/Most Played courses,
probably others too. [AJ]
20110422 20110422
-------- --------
* [Banner] Added ScrollSpeedDivisor metric; controls the scroll speed of * [Banner] Added ScrollSpeedDivisor metric; controls the scroll speed of
+2 -1
View File
@@ -161,6 +161,7 @@ bool CourseLoaderCRS::LoadFromMsd( const RString &sPath, const MsdFile &msd, Cou
// infer entry::Type from the first param // infer entry::Type from the first param
// todo: make sure these aren't generating bogus entries due // todo: make sure these aren't generating bogus entries due
// to a lack of songs. -aj // to a lack of songs. -aj
LOG->Trace("[CourseLoaderCRS] sParams[1] = %s",sParams[1].c_str());
// most played // most played
if( sParams[1].Left(strlen("BEST")) == "BEST" ) if( sParams[1].Left(strlen("BEST")) == "BEST" )
{ {
@@ -176,7 +177,7 @@ bool CourseLoaderCRS::LoadFromMsd( const RString &sPath, const MsdFile &msd, Cou
new_entry.songSort = SongSort_FewestPlays; new_entry.songSort = SongSort_FewestPlays;
} }
// best grades // best grades
if( sParams[1].Left(strlen("GRADEBEST")) == "GRADEBEST" ) else if( sParams[1].Left(strlen("GRADEBEST")) == "GRADEBEST" )
{ {
new_entry.iChooseIndex = atoi( sParams[1].Right(sParams[1].size()-strlen("GRADEBEST")) ) - 1; new_entry.iChooseIndex = atoi( sParams[1].Right(sParams[1].size()-strlen("GRADEBEST")) ) - 1;
CLAMP( new_entry.iChooseIndex, 0, 500 ); CLAMP( new_entry.iChooseIndex, 0, 500 );