diff --git a/stepmania/Themes/default/Languages/de.ini b/stepmania/Themes/default/Languages/de.ini index 5ea5cc8315..925b911561 100644 --- a/stepmania/Themes/default/Languages/de.ini +++ b/stepmania/Themes/default/Languages/de.ini @@ -40,9 +40,6 @@ Successfully exported package '%s' to your Desktop.=Paket '%s' erfolgreich auf I The following packages failed to export:=Folgende Pakete konnten nicht exportiert werden: The following packages were exported to your Desktop:=Folgende Pakete wurden auf Ihr Desktop exportiert: -[CatalogXml] -Saving %s ...=Speichere %s ... - [ChangeGameSettings] Error writing file '%s': %s=Fehler beim schreiben von Datei '%s': %s diff --git a/stepmania/Themes/default/Languages/en.ini b/stepmania/Themes/default/Languages/en.ini index c93705307d..d6b9cb1103 100644 --- a/stepmania/Themes/default/Languages/en.ini +++ b/stepmania/Themes/default/Languages/en.ini @@ -32,9 +32,6 @@ Successfully exported package '%s' to your Desktop.=Successfully exported packag The following packages failed to export:=The following packages failed to export: The following packages were exported to your Desktop:=The following packages were exported to your Desktop: -[CatalogXml] -Saving %s ...=Saving %s ... - [CustomDifficulty] Beginner=Novice Easy=Easy diff --git a/stepmania/Themes/default/Languages/es.ini b/stepmania/Themes/default/Languages/es.ini index 4fe24c6705..f56e96ba7f 100644 --- a/stepmania/Themes/default/Languages/es.ini +++ b/stepmania/Themes/default/Languages/es.ini @@ -44,9 +44,6 @@ Successfully exported package '%s' to your Desktop.=Se exportó con éxito el pa The following packages failed to export:=Los siguientes paquetes no pudieron exportarse: The following packages were exported to your Desktop:=Los siguientes paquetes fueron exportados a tu Escritorio: -[CatalogXml] -Saving %s ...=Guardando %s... - [CustomDifficulty] Beginner=Novato Easy=Fácil diff --git a/stepmania/Themes/default/Languages/fr.ini b/stepmania/Themes/default/Languages/fr.ini index 3e0fbb34ef..fdc83ec734 100644 --- a/stepmania/Themes/default/Languages/fr.ini +++ b/stepmania/Themes/default/Languages/fr.ini @@ -40,9 +40,6 @@ Successfully exported package '%s' to your Desktop.=Exportation du package '%s' The following packages failed to export:=Les packages suivants n'ont pu être exportés: The following packages were exported to your Desktop:=Les packages suivants ont été exportés sur votre Bureau: -[CatalogXml] -Saving %s ...=Sauvegarde %s... - [ChangeGameSettings] Error writing file '%s': %s=Erreur d'écriture du fichier '%s': %s diff --git a/stepmania/Themes/default/Languages/it.ini b/stepmania/Themes/default/Languages/it.ini index bc4ee01f30..8f97148f7e 100644 --- a/stepmania/Themes/default/Languages/it.ini +++ b/stepmania/Themes/default/Languages/it.ini @@ -40,9 +40,6 @@ Successfully exported package '%s' to your Desktop.=Pacchetto '%s' esportato con The following packages failed to export:=Impossibile esportare i seguenti pacchetti: The following packages were exported to your Desktop:=I seguenti pacchetti sono stati esportati sulla scrivania: -[CatalogXml] -Saving %s ...=Salvo %s ... - [ChangeGameSettings] Error writing file '%s': %s=Errore nella scrittura del documento '%s': %s diff --git a/stepmania/Themes/default/Other/Profile Catalog.xsl b/stepmania/Themes/default/Other/Profile Catalog.xsl deleted file mode 100644 index 8ba3b5d540..0000000000 --- a/stepmania/Themes/default/Other/Profile Catalog.xsl +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Totals - - - - - - - - -
- -
-
- -
- - - - - - - - - Steps - Trail - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
-
-
- - - - - - - -
- diff --git a/stepmania/Themes/default/Other/Profile Common.xsl b/stepmania/Themes/default/Other/Profile Common.xsl deleted file mode 100644 index e7be81657b..0000000000 --- a/stepmania/Themes/default/Other/Profile Common.xsl +++ /dev/null @@ -1,831 +0,0 @@ - - - - - - - - - - - - JavaScript: toggleLinkClicked(event); - JavaScript: return false; - JavaScript: toggleLinkOnMouseOver(event); - JavaScript: toggleLinkOnMouseOut(event); - cursor: hand; - - - - - - - - - - - - - - - - - - - - - - <xsl:value-of select="$Catalog/ProductTitle" /><xsl:text> </xsl:text><xsl:value-of select="$DocName" /> - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - - - -
- - - - - - - button - Internet Ranking - navButton - JavaScript: window.location = ''; - - - - - - button - Upload Stats - navButton - JavaScript: window.location = '&stats_xml=' + window.location; - - - - - Machine: - - - Name: - -
- Last Played: -
- -
- -
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - , - - - - - - - - - - - - - - - - - - - % - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - : - - : - - - - - - - - - - - - true - - - false - - - - - - - - Guid= - - - _new - - - - - - - - - - - - - - - - - - - - valuename - - nowrap - - - -   - - dyndata - - nowrap - - - -     - - - - - - - - - - -
-
- - - - - - - - - - valuename - - - - - dyndata - - - -
  
- -
- - - - - - - -
- - -
-
-
- - - - - - - - - valuename - - -    - - - valuename - - - -    - - dyndata - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
-
-
-
- - - - - - - - - main - - - - - - - -
- -
-
- - - - - - - - main - - - - - - -
- -
-
- - - - - - - - main - - - - - - - -
- -
-
- - - - - - - - - - - - - -
- diff --git a/stepmania/Themes/default/Other/Profile Stats.xsl b/stepmania/Themes/default/Other/Profile Stats.xsl deleted file mode 100644 index da5f22a745..0000000000 --- a/stepmania/Themes/default/Other/Profile Stats.xsl +++ /dev/null @@ -1,1421 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Instructions - - - -

Overview

- - - - -
- This section explains all the files saved to your memory card. Please read the instructions below before modifying any files on your memory card. Modifying files may result in irreversible loss of your data. -
- -
- -

Description of Files

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Edits/ - This directory contains edit step files that you've created yourself or downloaded from the internet. - - More Info - - You can place up to 200 .edit files in this directory. The edit file format is similar to an .sm file, except that it has only two tags: -
- #SONG:<SongDirectory>; -
- #NOTES:<StepsType>:<Description>:<Difficulty>:<Meter>:<RadarValues>:<NoteData>; -
-
-
LastGood/ - This directory contains a backup of your last Stats.xml and signatures that were successfully loaded. - - More Info - - The stats on your memory card may fail to load because: -
    -
  • The Stats.xml file or its digital signatures have become corrupt.
  • -
  • The Stats.xml file has been modified outside of the game. This will cause the digital signature check to fail.
  • -
- If your saved statistics fail to load, your can restore from from the "last good" data. Copy all 3 files in the files LastGood directory into the main profile directory (one level up from LastGood). -
-
-
Screenshots/ - All in-game screenshots that you take are saved in this directory. - - More Info - - This directory contains all screenshots that you've captured while playing the game. The Screenshots section of Stats.xml shows thumbnails score details for all screens you've captured. -
- The MD5 hash for a screenshot file can be used to verify that the screenshot has not been modified since it was first saved. -
- If your memory card is full, you can free space by deleting some of the screenshot .jpg files or moving them to another disk. -
-
-
Catalog.xmlContains game data used by Stats.xsl for displaying a report of your stats.
DontShare.sig - DontShare.sig is a digital signature that's required by the game when it loads your memory card data. This is a secret file that you shouldn't share with anyone else. - - More Info - - You can freely share Stats.xml and Stats.xml.sig with other players or submit these files for internet ranking. However, you should always keep DontShare.sig private. - Without the DontShare.sig, another player will not be able to load your saved data and pass it off as their own. - - -
Editable.ini - Holds preferences that you can edit using your home computer. You can open this file using any text editor program and save changes. -
Stats.xmlYou're looking at this file now. It contains all of your saved scores, statistics, and preferences. The game reads this data when you insert your memory card.
Stats.xml.sig - This is the digital signature for Stats.xml. - - More Info - - Digital signatures are used to verify that your data hasn't been modified outside of the game. This prevents cheaters from changing their score data and passing it off as real. -
- If any of Stats.xml, Stats.xml.sig, or DontShare.sig have been modified outside of the game, your memory card data will be ignored and overridden after the next save. It's important that you don't modify any of these three files because doing so will render your data permanently unusable. -
-
-
- -
-
-
- - - - - - - - - - - General Data - - - - - - - - -
- -
- - - Song Count by PlayMode - - - - - - - - - - - - - - - - - - - - - - Song Count by Style - - - - - - - - - - - - - - - - - - - - - - Song Count by Difficulty - - - - - - - - - - - - - - - - - - - - - - Song Count by Meter - - - - - - - - - - - - - - - - - - - - - - Stages Passed by Grade - - - - - - - - - - - - - - - - - - - - - - Stages Passed by PlayMode - - - - - - - - - - - - - - - - - - - - -
-
- -
- - - - - - - - - - - Songs - Courses - - - Steps - Trail - - - - - - Popularity - - - - - Ranking - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Unplayed - - - - - - - - - - - - - - - - - - - - - - - Ranking - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - -
-
-
- -
- -
-
- -
-
-
- - - - - - - - - - Steps - Trail - - - - Top Scores - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- - - - - - - - - - - - -
-
-
-
- - - - - - - - - - - Songs - Courses - - - Steps - Trail - - - Difficulty - CourseDifficulty - - - - Completeness - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
Actual - - - - - -
Possible - - - - - -
Percentage - - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - -
- -
-
-
-
-
-
- - - - - - - - - - - - Recent Scores - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Screenshots - - - - - - - - - - - - - - - - -
- - - _new - - - 160 - 120 - border-width: 0 - - - - - - - - -
- -
-
- - - - - - - - - - Coin Counts - - - - - - - - - - - - - - - - - -
- -
-
- -
- -
-
-
- - - - - - - - - - - Calories - - - - - WARNING: Weight is not set. Calorie counts may be inaccurate. -
-
- - - - - - - - - All time - - - - - - - - Per Song - - - 0 - - - - - - - - - - Per Minute of Gameplay - - - 0 - - - - - - - - - - - -
- -

By Week

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SunMonTueWedThuFriSat
- -
-
-
- - - - - - - - - Week of - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Sunday - Monday - Tuesday - Wednesday - Thursday - Friday - Saturday - error: - - - - - - - - - - - Sun - Mon - Tue - Wed - Thu - Fri - Sat - error: - - - - - - - - - - - Jan - Feb - Mar - Apr - May - Jun - Jul - Aug - Sep - Oct - Nov - Dec - error: - - - - - - - - - - - January - February - March - April - May - June - July - August - September - October - November - December - error: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [not implemented] - - - - - 0 - - - - - - 0 - - - - - - - 12 - 0 - - 0 - - - - - - - [not implemented] - - - - - 0 - - - - - - 0 - - - - - - - AM - PM - - - - - - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [not implemented] - - - - - [not implemented] - - - - - [not implemented] - - - - - - - - - - - - - - - % - - - - - - - - - - - - - - - - - - - - - - - - - - -
- diff --git a/stepmania/Themes/default/metrics.ini b/stepmania/Themes/default/metrics.ini index ce4e0d1d77..82dba9e66d 100644 --- a/stepmania/Themes/default/metrics.ini +++ b/stepmania/Themes/default/metrics.ini @@ -3849,41 +3849,6 @@ Line15="list,AutoAdjust" Line16="conf,EditorShowBGChangesPlay" OutCancelCommand= -[CatalogXml] -ShowPlayModeRegular=true -ShowPlayModeNonstop=true -ShowPlayModeOni=true -ShowPlayModeEndless=true -ShowPlayModeBattle=true -ShowPlayModeRave=true -ShowStyleSingle=true -ShowStyleVersus=true -ShowStyleDouble=true -ShowStyleCouple=true -ShowStyleSolo=true -ShowStyleReal=true -ShowStyleRoutine=false -ShowStyleVersusReal=false -ShowStyleHalfdouble=false -ShowStyleSingle4=false -ShowStyleVersus4=false -ShowStyleSingle5=false -ShowStyleDouble5=false -ShowStyleVersus5=false -ShowStyleSingle7=false -ShowStyleDouble7=false -ShowStyleSingle8=false -ShowStyleDouble8=false -ShowStyleVersus8=false -ShowStylePopn-five=false -ShowStylePopn-nine=false -InternetRankingHomeUrl="" -InternetRankingUploadUrl="" -InternetRankingViewGuidUrl="" -ProductTitle="StepMania" -FooterText="generated by StepMania" -FooterLink="http://www.stepmania.com" - [RadarValues] WriteComplexValues=true WriteSimpleValues=true diff --git a/stepmania/src/CatalogXml.cpp b/stepmania/src/CatalogXml.cpp deleted file mode 100644 index 99a1196e89..0000000000 --- a/stepmania/src/CatalogXml.cpp +++ /dev/null @@ -1,431 +0,0 @@ -#include "global.h" -#include "CatalogXml.h" -#include "SongManager.h" -#include "RageLog.h" -#include "Song.h" -#include "Steps.h" -#include "XmlFile.h" -#include "XmlFileUtil.h" -#include "Course.h" -#include "SongUtil.h" -#include "StepsUtil.h" -#include "CourseUtil.h" -#include "TrailUtil.h" -#include "GameState.h" -#include -#include "Foreach.h" -#include "GameManager.h" -#include "StyleUtil.h" -#include "ThemeManager.h" -#include "Style.h" -#include "CommonMetrics.h" -#include "UnlockManager.h" -#include "arch/LoadingWindow/LoadingWindow.h" -#include "LocalizedString.h" -#include "Preference.h" - -#define SHOW_PLAY_MODE(pm) THEME->GetMetricB("CatalogXml",ssprintf("ShowPlayMode%s",PlayModeToString(pm).c_str())) -#define SHOW_STYLE(ps) THEME->GetMetricB("CatalogXml",ssprintf("ShowStyle%s",Capitalize((ps)->m_szName).c_str())) -#define INTERNET_RANKING_HOME_URL THEME->GetMetric ("CatalogXml","InternetRankingHomeUrl") -#define INTERNET_RANKING_UPLOAD_URL THEME->GetMetric ("CatalogXml","InternetRankingUploadUrl") -#define INTERNET_RANKING_VIEW_GUID_URL THEME->GetMetric ("CatalogXml","InternetRankingViewGuidUrl") -#define PRODUCT_TITLE THEME->GetMetric ("CatalogXml","ProductTitle") -#define FOOTER_TEXT THEME->GetMetric ("CatalogXml","FooterText") -#define FOOTER_LINK THEME->GetMetric ("CatalogXml","FooterLink") - -// Catalog file paths. -const RString CATALOG_XML = "Catalog.xml"; -const RString CATALOG_XSL = "Catalog.xsl"; -const RString CATALOG_XML_FILE = "Save/" + CATALOG_XML; - -static LocalizedString SAVING_CATALOG_XML( "CatalogXml", "Saving %s ..." ); -Preference g_bWriteCatalog( "WriteCatalog", true ); - -void CatalogXml::Save( LoadingWindow *loading_window ) -{ - ASSERT( SONGMAN ); - ASSERT( UNLOCKMAN ); - - if( !g_bWriteCatalog ) - return; - if( loading_window ) - loading_window->SetText( ssprintf(SAVING_CATALOG_XML.GetValue(),CATALOG_XML.c_str()) ); - - RString fn = CATALOG_XML_FILE; - - LOG->Trace( "Writing %s ...", fn.c_str() ); - XNode xml( "Catalog" ); - - const vector &vStepsTypesToShow = CommonMetrics::STEPS_TYPES_TO_SHOW.GetValue(); - const vector &vDifficultiesToShow = CommonMetrics::DIFFICULTIES_TO_SHOW.GetValue(); - const vector &vCourseDifficultiesToShow = CommonMetrics::COURSE_DIFFICULTIES_TO_SHOW.GetValue(); - const bool bWriteSimpleValues = RadarValues::WRITE_SIMPLE_VALIES; - const bool bWriteComplexValues = RadarValues::WRITE_COMPLEX_VALIES; - - { - XNode* pNode = xml.AppendChild( "Totals" ); - XNode* pNumSongsByGroup = pNode->AppendChild( "NumSongsByGroup" ); - XNode* pNumStepsByGroup = pNode->AppendChild( "NumStepsByGroup" ); - - int iTotalSongs = 0; - int iTotalSteps = 0; - vector vsGroups; - SONGMAN->GetSongGroupNames( vsGroups ); - FOREACH_CONST( RString, vsGroups, sGroup ) - { - XNode* p1 = pNumSongsByGroup->AppendChild( "Group" ); - p1->AppendAttr( "Name", *sGroup ); - XNode* p2 = pNumStepsByGroup->AppendChild( "Group" ); - p2->AppendAttr( "Name", *sGroup ); - - int iNumSongsInGroup = 0; - const vector &vpSongsInGroup = SONGMAN->GetSongs( *sGroup ); - FOREACH_CONST( StepsType, vStepsTypesToShow, st ) - { - XNode* p3 = p2->AppendChild( "StepsType" ); - p3->AppendAttr( "StepsType", GAMEMAN->GetStepsTypeInfo(*st).szName ); - - int iNumStepsInGroupAndStepsType[NUM_Difficulty]; - ZERO( iNumStepsInGroupAndStepsType ); - FOREACH_CONST( Song*, vpSongsInGroup, 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() ) - continue; // skip: Tutorial song. - if( !pSong->NormallyDisplayed() ) - continue; // skip: Locked song. - iTotalSongs++; - iNumSongsInGroup++; - FOREACH_CONST( Difficulty, vDifficultiesToShow, dc ) - { - Steps* pSteps = SongUtil::GetStepsByDifficulty( pSong, *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 ) - continue; // skip - if( UNLOCKMAN->StepsIsLocked(pSong,pSteps) ) - continue; // skip - iTotalSteps++; - iNumStepsInGroupAndStepsType[pSteps->GetDifficulty()]++; - } - } - FOREACH_ENUM( Difficulty, dc ) - p3->AppendChild( DifficultyToString(dc), iNumStepsInGroupAndStepsType[dc] ); - } - - p1->AppendAttr( "Num", iNumSongsInGroup ); - } - - int iTotalCourses = 0; - vector vpCourses; - SONGMAN->GetAllCourses( vpCourses, false ); - for( unsigned i=0; iAllSongsAreFixed() ) - continue; - /* Don't write locked songs to the catalog, but do write disabled songs. */ - if( UNLOCKMAN->CourseIsLocked(pCourse) & ~LOCKED_DISABLED ) - continue; - iTotalCourses++; - } - - int iNumUnlockedSongs = 0; - int iNumUnlockedSteps = 0; - int iNumUnlockedCourses = 0; - FOREACH_CONST( UnlockEntry, UNLOCKMAN->m_UnlockEntries, e ) - { - if( e->IsLocked() ) - continue; - switch( e->m_Type ) - { - case UnlockRewardType_Song: iNumUnlockedSongs++; break; - case UnlockRewardType_Steps: iNumUnlockedSteps++; break; - case UnlockRewardType_Course: iNumUnlockedCourses++; break; - } - } - - pNode->AppendChild( "TotalSongs", iTotalSongs ); - pNode->AppendChild( "TotalSteps", iTotalSteps ); - pNode->AppendChild( "TotalCourses", iTotalCourses ); - pNode->AppendChild( "NumUnlockedSongs", iNumUnlockedSongs ); - pNode->AppendChild( "NumUnlockedSteps", iNumUnlockedSteps ); - pNode->AppendChild( "NumUnlockedCourses", iNumUnlockedCourses ); - } - - { - XNode* pNode = xml.AppendChild( "Songs" ); - - const vector& vpSongs = SONGMAN->GetAllSongs(); - - for( unsigned i=0; iIsTutorial() ) - continue; // skip: Tutorial song. - if( !pSong->NormallyDisplayed() ) - continue; // skip: Locked song. - - SongID songID; - songID.FromSong( pSong ); - - XNode* pSongNode = songID.CreateNode(); - - pNode->AppendChild( pSongNode ); - - pSongNode->AppendChild( "MainTitle", pSong->GetDisplayMainTitle() ); - pSongNode->AppendChild( "SubTitle", pSong->GetDisplaySubTitle() ); - - FOREACH_CONST( StepsType, vStepsTypesToShow, st ) - { - FOREACH_CONST( Difficulty, vDifficultiesToShow, dc ) - { - Steps* pSteps = SongUtil::GetStepsByDifficulty( pSong, *st, *dc, false ); // no autogen - if( pSteps == NULL ) - continue; // skip - if( UNLOCKMAN->StepsIsLocked(pSong,pSteps) ) - continue; // skip - - StepsID stepsID; - stepsID.FromSteps( pSteps ); - - XNode* pStepsIDNode = stepsID.CreateNode(); - pSongNode->AppendChild( pStepsIDNode ); - - pStepsIDNode->AppendChild( "Meter", pSteps->GetMeter() ); - pStepsIDNode->AppendChild( pSteps->GetRadarValues(PLAYER_1).CreateNode(bWriteSimpleValues, bWriteComplexValues) ); - } - } - } - } - - { - XNode* pNode = xml.AppendChild( "Courses" ); - - vector vpCourses; - SONGMAN->GetAllCourses( vpCourses, false ); - for( unsigned i=0; iAllSongsAreFixed() ) - continue; - if( UNLOCKMAN->CourseIsLocked(pCourse) & ~LOCKED_DISABLED ) - continue; - - CourseID courseID; - courseID.FromCourse( pCourse ); - - XNode* pCourseNode = courseID.CreateNode(); - - pNode->AppendChild( pCourseNode ); - - pCourseNode->AppendChild( "MainTitle", pCourse->GetDisplayMainTitle() ); - pCourseNode->AppendChild( "SubTitle", pCourse->GetDisplaySubTitle() ); - pCourseNode->AppendChild( "HasMods", pCourse->HasMods() ); - - - FOREACH_CONST( StepsType, vStepsTypesToShow, st ) - { - FOREACH_CONST( CourseDifficulty, vCourseDifficultiesToShow, dc ) - { - Trail *pTrail = pCourse->GetTrail( *st, *dc ); - if( pTrail == NULL ) - continue; - if( !pTrail->m_vEntries.size() ) - continue; - - TrailID trailID; - trailID.FromTrail( pTrail ); - - XNode* pTrailIDNode = trailID.CreateNode(); - pCourseNode->AppendChild( pTrailIDNode ); - - pTrailIDNode->AppendChild( "Meter", pTrail->GetMeter() ); - pTrailIDNode->AppendChild( pTrail->GetRadarValues().CreateNode(bWriteSimpleValues, bWriteComplexValues) ); - } - } - } - } - - { - XNode* pNode = xml.AppendChild( "Types" ); - - { - XNode* pNode2 = pNode->AppendChild( "Difficulty" ); - FOREACH_CONST( Difficulty, vDifficultiesToShow, iter ) - { - XNode* pNode3 = pNode2->AppendChild( "Difficulty", DifficultyToString(*iter) ); - StepsType st = GAMEMAN->GetHowToPlayStyleForGame( GAMESTATE->m_pCurGame )->m_StepsType; // TODO: Is this the best thing we can do here? - pNode3->AppendAttr( "DisplayAs", CustomDifficultyToLocalizedString( GetCustomDifficulty( st, *iter, CourseType_Invalid) ) ); // TODO: Fix use of Single, Fix use of CourseType_Invalid - } - } - - { - XNode* pNode2 = pNode->AppendChild( "CourseDifficulty" ); - FOREACH_CONST( CourseDifficulty, vCourseDifficultiesToShow, iter ) - { - XNode* pNode3 = pNode2->AppendChild( "CourseDifficulty", DifficultyToString(*iter) ); - pNode3->AppendAttr( "DisplayAs", CourseDifficultyToLocalizedString(*iter) ); - } - } - - { - XNode* pNode2 = pNode->AppendChild( "StepsType" ); - FOREACH_CONST( StepsType, vStepsTypesToShow, iter ) - { - XNode* pNode3 = pNode2->AppendChild( "StepsType", GAMEMAN->GetStepsTypeInfo(*iter).szName ); - pNode3->AppendAttr( "DisplayAs", GAMEMAN->GetStepsTypeInfo(*iter).GetLocalizedString() ); - } - } - - { - XNode* pNode2 = pNode->AppendChild( "PlayMode" ); - FOREACH_ENUM( PlayMode, pm ) - { - if( !SHOW_PLAY_MODE(pm) ) - continue; - XNode* pNode3 = pNode2->AppendChild( "PlayMode", PlayModeToString(pm) ); - pNode3->AppendAttr( "DisplayAs", PlayModeToLocalizedString(pm) ); - } - } - - { - XNode* pNode2 = pNode->AppendChild( "Style" ); - vector vpStyle; - GAMEMAN->GetStylesForGame( GAMESTATE->m_pCurGame, vpStyle ); - FOREACH( const Style*, vpStyle, pStyle ) - { - if( !SHOW_STYLE(*pStyle) ) - continue; - StyleID sID; - sID.FromStyle( (*pStyle) ); - XNode* pNode3 = pNode2->AppendChild( sID.CreateNode() ); - pNode3->AppendAttr( "DisplayAs", GAMEMAN->StyleToLocalizedString(*pStyle) ); - } - } - - { - XNode* pNode2 = pNode->AppendChild( "Meter" ); - for( int i=MIN_METER; i<=MAX_METER; i++ ) - { - XNode* pNode3 = pNode2->AppendChild( "Meter", ssprintf("Meter%d",i) ); - pNode3->AppendAttr( "DisplayAs", ssprintf("%d",i) ); - } - } - - { - XNode* pNode2 = pNode->AppendChild( "Grade" ); - FOREACH_PossibleGrade( g ) - { - XNode* pNode3 = pNode2->AppendChild( "Grade", GradeToString(g) ); - pNode3->AppendAttr( "DisplayAs", GradeToLocalizedString(g) ); - } - } - - { - XNode* pNode2 = pNode->AppendChild( "TapNoteScore" ); - FOREACH_ENUM( TapNoteScore, tns ) - { - XNode* pNode3 = pNode2->AppendChild( "TapNoteScore", TapNoteScoreToString(tns) ); - pNode3->AppendAttr( "DisplayAs", TapNoteScoreToLocalizedString(tns) ); - } - } - - { - XNode* pNode2 = pNode->AppendChild( "HoldNoteScore" ); - FOREACH_ENUM( HoldNoteScore, hns ) - { - XNode* pNode3 = pNode2->AppendChild( "HoldNoteScore", HoldNoteScoreToString(hns) ); - pNode3->AppendAttr( "DisplayAs", HoldNoteScoreToLocalizedString(hns) ); - } - } - - { - XNode* pNode2 = pNode->AppendChild( "RadarValue" ); - FOREACH_ENUM( RadarCategory, rc ) - { - XNode* pNode3 = pNode2->AppendChild( "RadarValue", RadarCategoryToString(rc) ); - pNode3->AppendAttr( "DisplayAs", RadarCategoryToLocalizedString(rc) ); - } - } - - { - XNode* pNode2 = pNode->AppendChild( "Modifier" ); - vector modifiers; - THEME->GetOptionNames( modifiers ); - FOREACH_CONST( RString, modifiers, iter ) - { - PlayerOptions po; - RString s = *iter; - po.FromString( s ); - vector v; - po.GetLocalizedMods( v ); - if( v.empty() ) - continue; - XNode* pNode3 = pNode2->AppendChild( "Modifier", *iter ); - pNode3->AppendAttr( "DisplayAs", join(" ",v) ); - } - } - } - - xml.AppendChild( "InternetRankingHomeUrl", INTERNET_RANKING_HOME_URL ); - xml.AppendChild( "InternetRankingUploadUrl", INTERNET_RANKING_UPLOAD_URL ); - xml.AppendChild( "InternetRankingViewGuidUrl", INTERNET_RANKING_VIEW_GUID_URL ); - xml.AppendChild( "ProductTitle", PRODUCT_TITLE ); - xml.AppendChild( "FooterText", FOOTER_TEXT ); - xml.AppendChild( "FooterLink", FOOTER_LINK ); - - XmlFileUtil::SaveToFile( &xml, fn, CATALOG_XSL, false ); - - LOG->Trace( "Done." ); -} - -/* - * (c) 2004 Chris Danford - * All rights reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, and/or sell copies of the Software, and to permit persons to - * whom the Software is furnished to do so, provided that the above - * copyright notice(s) and this permission notice appear in all copies of - * the Software and that both the above copyright notice(s) and this - * permission notice appear in supporting documentation. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF - * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS - * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT - * OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS - * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR - * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ diff --git a/stepmania/src/CatalogXml.h b/stepmania/src/CatalogXml.h deleted file mode 100644 index fe28f1c83c..0000000000 --- a/stepmania/src/CatalogXml.h +++ /dev/null @@ -1,42 +0,0 @@ -/* CatalogXml - output catalog data based on song data */ - -#ifndef CATALOG_XML_H -#define CATALOG_XML_H - -class LoadingWindow; - -extern const RString CATALOG_XML; -extern const RString CATALOG_XSL; -extern const RString CATALOG_XML_FILE; - -namespace CatalogXml -{ - void Save( LoadingWindow *ld ); -}; - -#endif - -/* - * (c) 2004 Chris Danford - * All rights reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, and/or sell copies of the Software, and to permit persons to - * whom the Software is furnished to do so, provided that the above - * copyright notice(s) and this permission notice appear in all copies of - * the Software and that both the above copyright notice(s) and this - * permission notice appear in supporting documentation. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF - * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS - * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT - * OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS - * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR - * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ diff --git a/stepmania/src/Profile.cpp b/stepmania/src/Profile.cpp index 3dfc592981..99652b31b8 100644 --- a/stepmania/src/Profile.cpp +++ b/stepmania/src/Profile.cpp @@ -21,14 +21,11 @@ #include "XmlFile.h" #include "XmlFileUtil.h" #include "Foreach.h" -#include "CatalogXml.h" #include "Bookkeeper.h" #include "Game.h" #include "CharacterManager.h" #include "Character.h" -const RString STATS_XSL = "Stats.xsl"; -const RString COMMON_XSL = "Common.xsl"; const RString STATS_XML = "Stats.xml"; const RString STATS_XML_GZ = "Stats.xml.gz"; const RString EDITABLE_INI = "Editable.ini"; @@ -41,8 +38,6 @@ const RString UPLOAD_SUBDIR = "Upload/"; ThemeMetric SHOW_COIN_DATA( "Profile", "ShowCoinData" ); static Preference g_bProfileDataCompress( "ProfileDataCompress", false ); -static Preference g_bCopyCatalogToProfiles( "CopyCatalogToProfiles", true ); -extern Preference g_bWriteCatalog; static ThemeMetric UNLOCK_AUTH_STRING( "Profile", "UnlockAuthString" ); #define GUID_SIZE_BYTES 8 @@ -983,8 +978,6 @@ bool Profile::SaveStatsXmlToDir( RString sDir, bool bSignData ) const { RageFileObjGzip gzip( &f ); gzip.Start(); - if( !XmlFileUtil::SaveToFile( xml.get(), gzip, STATS_XSL, false ) ) - return false; if( gzip.Finish() == -1 ) return false; @@ -994,9 +987,6 @@ bool Profile::SaveStatsXmlToDir( RString sDir, bool bSignData ) const } else { - if( !XmlFileUtil::SaveToFile( xml.get(), f, STATS_XSL, false ) ) - return false; - /* After successfully saving STATS_XML, remove any stray STATS_XML_GZ. */ if( FILEMAN->IsAFile(sDir + STATS_XML_GZ) ) FILEMAN->Remove( sDir + STATS_XML_GZ ); @@ -1626,14 +1616,6 @@ void Profile::LoadCategoryScoresFromNode( const XNode* pCategoryScores ) void Profile::SaveStatsWebPageToDir( RString sDir ) const { ASSERT( PROFILEMAN ); - - FileCopy( THEME->GetPathO("Profile",STATS_XSL), sDir+STATS_XSL ); - FileCopy( THEME->GetPathO("Profile",COMMON_XSL), sDir+COMMON_XSL ); - if( g_bCopyCatalogToProfiles && g_bWriteCatalog ) - { - FileCopy( CATALOG_XML_FILE, sDir+CATALOG_XML ); - FileCopy( THEME->GetPathO("Profile",CATALOG_XSL), sDir+CATALOG_XSL ); - } } void Profile::SaveMachinePublicKeyToDir( RString sDir ) const @@ -1742,9 +1724,6 @@ static void SaveRecentScore( XNode* xml ) RString sFileNameNoExtension = Profile::MakeUniqueFileNameNoExtension(UPLOAD_SUBDIR, sDate ); RString fn = UPLOAD_SUBDIR + sFileNameNoExtension + ".xml"; - - if( !XmlFileUtil::SaveToFile( xml, fn, STATS_XSL, false ) ) - return; RString sStatsXmlSigFile = fn+SIGNATURE_APPEND; CryptManager::SignFileToFile(fn, sStatsXmlSigFile); diff --git a/stepmania/src/SongManager.cpp b/stepmania/src/SongManager.cpp index ab48a9c89b..8a3e4f5262 100644 --- a/stepmania/src/SongManager.cpp +++ b/stepmania/src/SongManager.cpp @@ -4,7 +4,6 @@ #include "AnnouncerManager.h" #include "BackgroundUtil.h" #include "BannerCache.h" -#include "CatalogXml.h" #include "CommonMetrics.h" #include "Course.h" #include "CourseLoaderCRS.h" @@ -122,8 +121,7 @@ void SongManager::Reload( bool bAllowFastLoad, LoadingWindow *ld ) // reload scores and unlocks afterward PROFILEMAN->LoadMachineProfile(); UNLOCKMAN->Reload(); - CatalogXml::Save( NULL ); - + if( !bAllowFastLoad ) PREFSMAN->m_bFastLoad.Set( OldVal ); diff --git a/stepmania/src/StepMania-net2008.vcproj b/stepmania/src/StepMania-net2008.vcproj index 02e8120197..021a6b05fa 100644 --- a/stepmania/src/StepMania-net2008.vcproj +++ b/stepmania/src/StepMania-net2008.vcproj @@ -977,14 +977,6 @@ RelativePath="BannerCache.h" > - - - - diff --git a/stepmania/src/StepMania.cpp b/stepmania/src/StepMania.cpp index 65dfdb36c0..14cfb1c328 100644 --- a/stepmania/src/StepMania.cpp +++ b/stepmania/src/StepMania.cpp @@ -31,7 +31,6 @@ #include "Game.h" #include "RageSurface.h" #include "RageSurface_Load.h" -#include "CatalogXml.h" #include "CommandLineActions.h" #if !defined(SUPPORT_OPENGL) && !defined(SUPPORT_D3D) @@ -1129,10 +1128,6 @@ int main(int argc, char* argv[]) SONGMAN->UpdatePopular(); SONGMAN->UpdatePreferredSort(); - /* This shouldn't need to be here; if it's taking long enough that this is - * even visible, we should be fixing it, not showing a progress display. */ - CatalogXml::Save( pLoadingWindow ); - NSMAN = new NetworkSyncManager( pLoadingWindow ); MESSAGEMAN = new MessageManager; STATSMAN = new StatsManager;