add steps/song count by group, StepsType
This commit is contained in:
@@ -50,10 +50,31 @@ void SaveCatalogXml( LoadingWindow *loading_window )
|
|||||||
|
|
||||||
{
|
{
|
||||||
XNode* pNode = xml.AppendChild( "Totals" );
|
XNode* pNode = xml.AppendChild( "Totals" );
|
||||||
|
XNode* pNumSongsByGroup = pNode->AppendChild( "NumSongsByGroup" );
|
||||||
|
XNode* pNumStepsByGroup = pNode->AppendChild( "NumStepsByGroup" );
|
||||||
|
|
||||||
int iTotalSongs = 0;
|
int iTotalSongs = 0;
|
||||||
int iTotalSteps = 0;
|
int iTotalSteps = 0;
|
||||||
FOREACH_CONST( Song*, SONGMAN->GetAllSongs(), i )
|
vector<CString> vsGroups;
|
||||||
|
SONGMAN->GetGroupNames( vsGroups );
|
||||||
|
FOREACH_CONST( CString, vsGroups, sGroup )
|
||||||
|
{
|
||||||
|
XNode* p1 = pNumSongsByGroup->AppendChild( "Group" );
|
||||||
|
p1->AppendAttr( "Name", *sGroup );
|
||||||
|
XNode* p2 = pNumStepsByGroup->AppendChild( "Group" );
|
||||||
|
p2->AppendAttr( "Name", *sGroup );
|
||||||
|
|
||||||
|
int iNumSongsInGroup = 0;
|
||||||
|
vector<Song*> vpSongsInGroup;
|
||||||
|
SONGMAN->GetSongs( vpSongsInGroup, *sGroup );
|
||||||
|
FOREACH_CONST( StepsType, vStepsTypesToShow, st )
|
||||||
|
{
|
||||||
|
XNode* p3 = p2->AppendChild( "StepsType" );
|
||||||
|
p3->AppendAttr( "StepsType", GAMEMAN->StepsTypeToString(*st) );
|
||||||
|
|
||||||
|
int iNumStepsInGroupAndStepsType[NUM_DIFFICULTIES];
|
||||||
|
ZERO( iNumStepsInGroupAndStepsType );
|
||||||
|
FOREACH_CONST( Song*, vpSongsInGroup, i )
|
||||||
{
|
{
|
||||||
Song *pSong = *i;
|
Song *pSong = *i;
|
||||||
if( pSong->IsTutorial() )
|
if( pSong->IsTutorial() )
|
||||||
@@ -61,9 +82,8 @@ void SaveCatalogXml( LoadingWindow *loading_window )
|
|||||||
if( UNLOCKMAN->SongIsLocked(pSong) )
|
if( UNLOCKMAN->SongIsLocked(pSong) )
|
||||||
continue; // skip
|
continue; // skip
|
||||||
iTotalSongs++;
|
iTotalSongs++;
|
||||||
|
iNumSongsInGroup++;
|
||||||
|
|
||||||
FOREACH_CONST( StepsType, vStepsTypesToShow, st )
|
|
||||||
{
|
|
||||||
FOREACH_CONST( Difficulty, DIFFICULTIES_TO_SHOW.GetValue(), dc )
|
FOREACH_CONST( Difficulty, DIFFICULTIES_TO_SHOW.GetValue(), dc )
|
||||||
{
|
{
|
||||||
Steps* pSteps = pSong->GetStepsByDifficulty( *st, *dc, false ); // no autogen
|
Steps* pSteps = pSong->GetStepsByDifficulty( *st, *dc, false ); // no autogen
|
||||||
@@ -72,8 +92,14 @@ void SaveCatalogXml( LoadingWindow *loading_window )
|
|||||||
if( UNLOCKMAN->StepsIsLocked(pSong,pSteps) )
|
if( UNLOCKMAN->StepsIsLocked(pSong,pSteps) )
|
||||||
continue; // skip
|
continue; // skip
|
||||||
iTotalSteps++;
|
iTotalSteps++;
|
||||||
|
iNumStepsInGroupAndStepsType[pSteps->GetDifficulty()]++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
FOREACH_Difficulty( dc )
|
||||||
|
p3->AppendChild( DifficultyToString(dc), iNumStepsInGroupAndStepsType[dc] );
|
||||||
|
}
|
||||||
|
|
||||||
|
p1->AppendAttr( "Num", iNumSongsInGroup );
|
||||||
}
|
}
|
||||||
|
|
||||||
int iTotalCourses = 0;
|
int iTotalCourses = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user