Adding comments to the code.
This commit is contained in:
@@ -31,6 +31,11 @@
|
|||||||
#define FOOTER_TEXT THEME->GetMetric ("CatalogXml","FooterText")
|
#define FOOTER_TEXT THEME->GetMetric ("CatalogXml","FooterText")
|
||||||
#define FOOTER_LINK THEME->GetMetric ("CatalogXml","FooterLink")
|
#define FOOTER_LINK THEME->GetMetric ("CatalogXml","FooterLink")
|
||||||
|
|
||||||
|
/*
|
||||||
|
* These RStrings store where the Catalog* files are located, and what they
|
||||||
|
* called.
|
||||||
|
*/
|
||||||
|
|
||||||
const RString CATALOG_XML = "Catalog.xml";
|
const RString CATALOG_XML = "Catalog.xml";
|
||||||
const RString CATALOG_XSL = "Catalog.xsl";
|
const RString CATALOG_XSL = "Catalog.xsl";
|
||||||
const RString CATALOG_XML_FILE = "Save/" + CATALOG_XML;
|
const RString CATALOG_XML_FILE = "Save/" + CATALOG_XML;
|
||||||
@@ -82,16 +87,29 @@ void SaveCatalogXml( LoadingWindow *loading_window )
|
|||||||
FOREACH_CONST( Song*, vpSongsInGroup, i )
|
FOREACH_CONST( Song*, vpSongsInGroup, i )
|
||||||
{
|
{
|
||||||
Song *pSong = *i;
|
Song *pSong = *i;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Not all songs should be stored in Catalog.xml. Tutorial songs
|
||||||
|
* are meant to learn how to play the game, not for playing for
|
||||||
|
* a grade. Locked songs aren't shown to keep them a surprise
|
||||||
|
* until such a time when they are unlocked.
|
||||||
|
*/
|
||||||
|
|
||||||
if( pSong->IsTutorial() )
|
if( pSong->IsTutorial() )
|
||||||
continue; // skip
|
continue; // skip: Tutorial song.
|
||||||
if( UNLOCKMAN->SongIsLocked(pSong) )
|
if( UNLOCKMAN->SongIsLocked(pSong) )
|
||||||
continue; // skip
|
continue; // skip: Locked song.
|
||||||
iTotalSongs++;
|
iTotalSongs++;
|
||||||
iNumSongsInGroup++;
|
iNumSongsInGroup++;
|
||||||
|
|
||||||
FOREACH_CONST( Difficulty, CommonMetrics::DIFFICULTIES_TO_SHOW.GetValue(), dc )
|
FOREACH_CONST( Difficulty, CommonMetrics::DIFFICULTIES_TO_SHOW.GetValue(), dc )
|
||||||
{
|
{
|
||||||
Steps* pSteps = pSong->GetStepsByDifficulty( *st, *dc, false ); // no autogen
|
Steps* pSteps = pSong->GetStepsByDifficulty( *st, *dc, false ); // no autogen
|
||||||
|
|
||||||
|
/*
|
||||||
|
* There is no point in storing the steps if either there
|
||||||
|
* are no steps, or the song is locked.
|
||||||
|
*/
|
||||||
|
|
||||||
if( pSteps == NULL )
|
if( pSteps == NULL )
|
||||||
continue; // skip
|
continue; // skip
|
||||||
if( UNLOCKMAN->StepsIsLocked(pSong,pSteps) )
|
if( UNLOCKMAN->StepsIsLocked(pSong,pSteps) )
|
||||||
@@ -153,10 +171,17 @@ void SaveCatalogXml( LoadingWindow *loading_window )
|
|||||||
{
|
{
|
||||||
Song* pSong = vpSongs[i];
|
Song* pSong = vpSongs[i];
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Not all songs should be stored in Catalog.xml. Tutorial songs
|
||||||
|
* are meant to learn how to play the game, not for playing for
|
||||||
|
* a grade. Locked songs aren't shown to keep them a surprise
|
||||||
|
* until such a time when they are unlocked.
|
||||||
|
*/
|
||||||
|
|
||||||
if( pSong->IsTutorial() )
|
if( pSong->IsTutorial() )
|
||||||
continue; // skip
|
continue; // skip: Tutorial song.
|
||||||
if( UNLOCKMAN->SongIsLocked(pSong) )
|
if( UNLOCKMAN->SongIsLocked(pSong) )
|
||||||
continue; // skip
|
continue; // skip: Locked song.
|
||||||
|
|
||||||
SongID songID;
|
SongID songID;
|
||||||
songID.FromSong( pSong );
|
songID.FromSong( pSong );
|
||||||
|
|||||||
Reference in New Issue
Block a user