remove unnecessary/unused Catalog.xml and .xsl files

This commit is contained in:
Chris Danford
2009-08-09 04:02:34 +00:00
parent 357f803753
commit 4dabae6630
15 changed files with 1 additions and 2917 deletions
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -1,105 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:import href="Common.xsl"/>
<!-- Main Template -->
<xsl:template match="/Catalog">
<xsl:call-template name="MainTemplate">
<xsl:with-param name="FullHeader" select="0" />
<xsl:with-param name="DocName" select="name()" />
<xsl:with-param name="Content">
<xsl:apply-templates select="/Catalog/Totals" />
<xsl:apply-templates select="/Catalog/Songs" />
<xsl:apply-templates select="/Catalog/Courses" />
</xsl:with-param>
</xsl:call-template>
</xsl:template>
<!-- Totals -->
<xsl:template match="/Catalog/Totals">
<xsl:call-template name="CollapsibleTopSection">
<xsl:with-param name="title">
Totals
</xsl:with-param>
<xsl:with-param name="text">
<table class="EntityTableAttr">
<xsl:call-template name="DataTableGenerator">
<xsl:with-param name="cols" select="2" />
<xsl:with-param name="nodeset" select="*[text()]" />
</xsl:call-template>
</table>
</xsl:with-param>
</xsl:call-template>
</xsl:template>
<!-- TopScores for SongScores and CourseScores -->
<xsl:template match="/Catalog/Songs | /Catalog/Courses">
<xsl:variable name="Type" select="name()" />
<xsl:variable name="SubType">
<xsl:if test="$Type='Song'">Steps</xsl:if>
<xsl:if test="$Type='Course'">Trail</xsl:if>
</xsl:variable>
<xsl:call-template name="CollapsibleTopSection">
<xsl:with-param name="title">
<xsl:value-of select="$Type" />
</xsl:with-param>
<xsl:with-param name="text">
<xsl:apply-templates select="Song | Course" />
</xsl:with-param>
</xsl:call-template>
</xsl:template>
<xsl:template match="Song | Course">
<xsl:variable name="Dir" select="@Dir" />
<xsl:variable name="Path" select="@Path" />
<xsl:variable name="MainTitle" select="/Catalog/*/*[@Dir=$Dir or @Path=$Path]/MainTitle" />
<xsl:variable name="SubTitle" select="/Catalog/*/*[@Dir=$Dir or @Path=$Path]/SubTitle" />
<xsl:call-template name="CollapsibleSubSection">
<xsl:with-param name="title">
<xsl:apply-templates select="@Dir | @Path" />
</xsl:with-param>
<xsl:with-param name="text">
<xsl:apply-templates select="Steps | Trail" />
</xsl:with-param>
</xsl:call-template>
</xsl:template>
<xsl:template match="Steps | Trail">
<xsl:call-template name="SubSectionCompact">
<xsl:with-param name="title">
<xsl:apply-templates select="." mode="AttributeTitleGenerator" />
</xsl:with-param>
<xsl:with-param name="text">
<table class="EntityTableAttr">
<xsl:call-template name="DataTableGenerator">
<xsl:with-param name="cols" select="1" />
<xsl:with-param name="nodeset" select="*[text()] | ./*/*[text()]" />
</xsl:call-template>
</table>
</xsl:with-param>
</xsl:call-template>
</xsl:template>
<!-- Main Categories End - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- That's it -->
</xsl:stylesheet>
@@ -1,831 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!-- Global Definitions -->
<xsl:output method="html" omit-xml-declaration="no" encoding="iso-8859-1" indent="no"/>
<xsl:strip-space elements="*" />
<xsl:attribute-set name="ToggleLinkAttr">
<xsl:attribute name="onClick">JavaScript: toggleLinkClicked(event);</xsl:attribute>
<xsl:attribute name="onSelectStart">JavaScript: return false;</xsl:attribute>
<xsl:attribute name="onMouseOver">JavaScript: toggleLinkOnMouseOver(event);</xsl:attribute>
<xsl:attribute name="onMouseOut">JavaScript: toggleLinkOnMouseOut(event);</xsl:attribute>
<xsl:attribute name="style">cursor: hand;</xsl:attribute>
</xsl:attribute-set>
<!-- Global Variables -->
<xsl:variable name="Catalog" select="document('Catalog.xml')/Catalog" />
<!-- Main Template -->
<xsl:template name="MainTemplate">
<xsl:param name="FullHeader" />
<xsl:param name="DocName" />
<xsl:param name="Content" />
<html>
<head>
<title><xsl:value-of select="$Catalog/ProductTitle" /><xsl:text> </xsl:text><xsl:value-of select="$DocName" /></title>
<script language="JavaScript">
var imgOpenedSymbol = "images/arrow_down.gif";
var imgClosedSymbol = "images/arrow_right.gif";
function setDisplayAll( image ) {
var elems = document.getElementsByName("toggleImage");
for ( var i = 0; i &lt; elems.length; i++ ) {
if ( elems[i].src != image ) {
elems[i].src = image;
toggleImageChanged( elems[i] );
}
}
}
function toggleLinkClicked(e) {
var tg;
if (!e) var e = window.event;
if (e.target) tg = e.target;
else if (e.srcElement) tg = e.srcElement;
if (tg.nodeType == 3) // defeat Safari bug
tg = targ.parentNode;
var obj = tg;
if ( obj.name != "toggleImage" ) {
obj = obj.childNodes.item('toggleImage');
}
obj.src.search(imgOpenedSymbol) > -1 ? obj.src = imgClosedSymbol : obj.src = imgOpenedSymbol;
toggleImageChanged(obj);
}
function toggleImageChanged(img) {
var tg = img;
var disp;
tg.src.search(imgOpenedSymbol) > -1 ? disp = "" : disp = "none";
var obj = tg.parentNode.parentNode.parentNode.parentNode;
obj.rows[1].style.display = disp;
var cell = img.parentNode;
var spanOpen = cell.childNodes[1];
spanOpen.style.display = disp;
var spanClosed = cell.childNodes[2];
spanClosed.style.display = (disp=="" ? "none" : "");
}
function toggleLinkOnMouseOver(e) {
var tg;
if (!e) var e = window.event;
if (e.target) tg = e.target;
else if (e.srcElement) tg = e.srcElement;
if (tg.nodeType == 3) // defeat Safari bug
tg = targ.parentNode;
var obj = tg;
obj.tagName == 'IMG' ? obj = obj.parentNode : null;
obj.tagName == 'SPAN' ? obj = obj.parentNode : null;
if ( obj.className == 'main' ) {
obj.style.backgroundColor = '#C0C1C4';
} else {
obj.style.backgroundColor = '#C0C1C4';
}
}
function toggleLinkOnMouseOut(e) {
var tg;
if (!e) var e = window.event;
if (e.target) tg = e.target;
else if (e.srcElement) tg = e.srcElement;
if (tg.nodeType == 3) // defeat Safari bug
tg = targ.parentNode;
var obj = tg;
obj.tagName == 'IMG' ? obj = obj.parentNode : null;
obj.tagName == 'SPAN' ? obj = obj.parentNode : null;
if ( obj.className == 'main' ) {
obj.style.backgroundColor = '#DBE0E5';
} else {
obj.style.backgroundColor = '#DBE0E5';
}
}
function startItUp() {
setDisplayAll( imgClosedSymbol );
}
function navButtonMouseOver() {
this.src = 'images/button_' + this.imagename + '_focus.gif';
}
function navButtonMouseOut() {
this.src = 'images/button_' + this.imagename + '_up.gif';
}
function navButtonMouseDown() {
this.src = 'images/button_' + this.imagename + '_down.gif';
}
function navButtonMouseUp() {
this.src = 'images/button_' + this.imagename + '_focus.gif';
}
</script>
<style type='text/css'>
a, a:visited {
color: #0072C2;
}
a:hover, a:active {
color: #FF6E00;
}
body {
font-family: Arial,Verdana,sans-serif;
font-size: 11px;
color: #3D5066;
background: #A1ACB9;
margin: 3px;
}
.pageheader {
background: #E1E5EA;
}
.pagefooter {
background: #E1E5EA;
}
.clear {
background: #F4F6F7;
}
.valuename {
margin-bottom: 5px;
}
.visible {
}
.hidden {
display:none
}
table {
font-size: 11px;
margin-top: 2px;
margin-bottom: 5px;
background: #DBE0E5;
}
td {
vertical-align: top;
border: 0;
}
select {
font-size: 11px;
background: #F4F6F7;
}
th {
font-size: 11px;
font-weight: bold;
text-align: left;
color: #3D5066;
}
th.main {
font-size: 12px;
font-weight: bold;
text-align: left;
color: #3D5066;
}
h1 {
margin-top: 0px;
margin-bottom: 8px;
font-size: 16px;
font-weight: bold;
color: #005CB1;
}
h2 {
margin-top: 0px;
margin-bottom: 5px;
font-size: 12px;
font-weight: bold;
color: #3D5066;
}
h3 {
margin-top: 0px;
margin-bottom: 2px;
font-size: 11px;
font-weight: bold;
color: #3D5066;
}
hr {
height: 1px;
color: #DBE0E5;
}
.dyndata {
color: #005CB1;
}
.titlename {
font-size: 10px;
}
.titlevalue {
font-size: 10px;
font-weight: bold;
}
.LargeNumber {
font-size: 20px;
}
.TopLevelTableAttr {
cellpadding: 4;
cellspacing: 1;
border: 0;
width: 100%;
}
.DataTableAttr {
background: #FFFFFF;
text-align: left;
cellpadding: 3;
cellspacing: 1;
border: 0;
width: 100%;
}
.EntityTableAttr {
background: #FFFFFF;
cellpadding: 3;
cellspacing: 1;
border: 0;
}
.CollapsableTableAttr {
text-align: left;
cellpadding: 2;
cellspacing: 0;
border: 0;
}
.CompactTableAttr {
background: #FFFFFF;
text-align: left;
cellpadding: 3;
cellspacing: 1;
border: 0;
margin: 2px 2px 2px 2px;
}
.MasterContainer {
background: #FFFFFF;
}
.HeaderContainer {
background: #FFFFFF;
}
</style>
</head>
<body onLoad="JavaScript: startItUp();">
<table cellpadding="0" cellspacing="0" border="0" width="100%" height="100%">
<tr>
<td colspan="3" class="pageheader">
<table cellpadding="10" cellspacing="0" border="0" width="100%" >
<tr>
<td nowrap="nowrap" class="pageheader"><h1><xsl:value-of select="$Catalog/ProductTitle" /><xsl:text> </xsl:text><xsl:value-of select="$DocName" /></h1></td>
<td width="100%" class="pageheader"></td>
<td nowrap="nowrap" class="pageheader"><h1>&lt; &lt; &lt; &lt; &lt;</h1></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%" height="100%" valign="top" class="MasterContainer">
<br />
<table cellpadding="10" cellspacing="0" border="0" width="100%" class="HeaderContainer">
<xsl:if test="$FullHeader = 1">
<tr>
<td nowrap="nowrap">
<input type="button" value="Expand All" name="navButton" onClick="JavaScript:setDisplayAll( imgOpenedSymbol );" />
<xsl:text> </xsl:text>
<input type="button" value="Collapse All" name="navButton" onClick="JavaScript:setDisplayAll( imgClosedSymbol );" />
<xsl:text> </xsl:text>
<xsl:if test="$Catalog/InternetRankingHomeUrl != ''">
<xsl:element name="input">
<xsl:attribute name="type">button</xsl:attribute>
<xsl:attribute name="value">Internet Ranking</xsl:attribute>
<xsl:attribute name="name">navButton</xsl:attribute>
<xsl:attribute name="onClick">JavaScript: window.location = '<xsl:value-of select="$Catalog/InternetRankingHomeUrl" />';</xsl:attribute>
</xsl:element>
</xsl:if>
<xsl:text> </xsl:text>
<xsl:if test="$Catalog/InternetRankingUploadUrl != ''">
<xsl:element name="input">
<xsl:attribute name="type">button</xsl:attribute>
<xsl:attribute name="value">Upload Stats</xsl:attribute>
<xsl:attribute name="name">navButton</xsl:attribute>
<xsl:attribute name="onClick">JavaScript: window.location = '<xsl:value-of select="$Catalog/InternetRankingUploadUrl" />&amp;stats_xml=' + window.location;</xsl:attribute>
</xsl:element>
</xsl:if>
</td>
<td align="right" nowrap="nowrap" valign="top">
<xsl:if test="/Stats/GeneralData/IsMachine = 1">
<font class="titlename">Machine: </font><font class="titlevalue"><xsl:value-of select="/Stats/GeneralData/Guid" /></font>
</xsl:if>
<xsl:if test="/Stats/GeneralData/IsMachine = 0">
<font class="titlename">Name: </font><font class="titlevalue"><xsl:value-of select="/Stats/GeneralData/DisplayName" /></font>
</xsl:if>
<br/>
<font class="titlename">Last Played: </font><font class="titlevalue"><xsl:value-of select="/Stats/GeneralData/LastPlayedDate" /></font>
</td>
</tr>
</xsl:if>
<tr>
<td colspan="2">
<xsl:copy-of select="$Content" />
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="3" class="pagefooter">
<table cellpadding="10" cellspacing="0" border="0" width="100%" >
<tr>
<td nowrap="nowrap" class="pagefooter"><h1>&gt; &gt; &gt; &gt; &gt;</h1></td>
<td width="100%" class="pagefooter"></td>
<td nowrap="nowrap" class="pagefooter">
<a>
<xsl:attribute name="href"><xsl:value-of select="$Catalog/FooterLink" /></xsl:attribute>
<xsl:value-of select="$Catalog/FooterText" />
</a>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
</xsl:template>
<!-- Main Categories End - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- General Name Templates -->
<xsl:template match="*" mode="name" priority="-1">
<!-- Strip the trailing 's' -->
<xsl:variable name="Type" select="substring(name(..),1,string-length(name(..))-1)" />
<xsl:call-template name="Translate">
<xsl:with-param name="Type" select="$Type" />
<xsl:with-param name="Value" select="name()" />
</xsl:call-template>
</xsl:template>
<xsl:template match="StepsType | @StepsType | Difficulty | @Difficulty | CourseDifficulty | @CourseDifficulty | Grade | @Grade | PlayMode | @PlayMode | Meter | @Meter">
<xsl:call-template name="Translate">
<xsl:with-param name="Type" select="name()" />
<xsl:with-param name="Value" select="." />
</xsl:call-template>
</xsl:template>
<xsl:template match="LastDifficulty">
<xsl:call-template name="Translate">
<xsl:with-param name="Type" select="'Difficulty'" />
<xsl:with-param name="Value" select="." />
</xsl:call-template>
</xsl:template>
<xsl:template match="LastCourseDifficulty">
<xsl:call-template name="Translate">
<xsl:with-param name="Type" select="'CourseDifficulty'" />
<xsl:with-param name="Value" select="." />
</xsl:call-template>
</xsl:template>
<xsl:template name="Translate">
<xsl:param name="Type" />
<xsl:param name="Value" />
<xsl:variable name="node" select="$Catalog/Types/*[name()=$Type]/*[name()=$Type and text()=$Value]" />
<xsl:if test="count($node) &gt; 0">
<xsl:value-of select="$node/@DisplayAs" />
</xsl:if>
<xsl:if test="count($node) = 0">
<xsl:value-of select="$Value" />
</xsl:if>
</xsl:template>
<xsl:template match="Style">
<xsl:call-template name="Translate">
<xsl:with-param name="Type" select="name(@Style)" />
<xsl:with-param name="Value" select="@Style" />
</xsl:call-template>
</xsl:template>
<xsl:template match="Dir | @Dir | LastSong | Path | @Path | LastCourse">
<xsl:variable name="DirOrPath" select="translate(., ' ', ' ')" />
<xsl:variable name="SongOrCourse" select="$Catalog/*/*[@Dir=$DirOrPath or @Path=$DirOrPath]" />
<xsl:if test="count($SongOrCourse) &gt; 0">
<xsl:value-of select="$SongOrCourse/MainTitle" />
<xsl:text> </xsl:text>
<xsl:value-of select="$SongOrCourse/SubTitle" />
</xsl:if>
<xsl:if test="count($SongOrCourse) = 0">
<xsl:value-of select="." />
</xsl:if>
</xsl:template>
<xsl:template match="//*[contains(name(),'Modifiers')]">
<xsl:call-template name="TranslateModifiers">
<xsl:with-param name="mods" select="." />
</xsl:call-template>
</xsl:template>
<xsl:template name="TranslateModifiers">
<xsl:param name="mods" />
<xsl:variable name="before" select="substring-before($mods,', ')" />
<xsl:variable name="after" select="substring-after($mods,', ')" />
<xsl:if test="$before = ''">
<xsl:call-template name="Translate">
<xsl:with-param name="Type" select="'Modifier'" />
<xsl:with-param name="Value" select="$mods" />
</xsl:call-template>
</xsl:if>
<xsl:if test="$before != ''">
<xsl:call-template name="Translate">
<xsl:with-param name="Type" select="'Modifier'" />
<xsl:with-param name="Value" select="$before" />
</xsl:call-template>
<xsl:text>, </xsl:text>
<xsl:call-template name="TranslateModifiers">
<xsl:with-param name="mods" select="$after" />
</xsl:call-template>
</xsl:if>
</xsl:template>
<xsl:template match="PercentDP | @PercentDP">
<xsl:apply-templates mode="percentage" select="." />
</xsl:template>
<xsl:template mode="percentage" match="//*">
<xsl:call-template name="PrintPercentage">
<xsl:with-param name="num" select="." />
</xsl:call-template>
</xsl:template>
<xsl:template name="PrintPercentage">
<xsl:param name="num" />
<xsl:value-of select="format-number($num*100,'00.00')" />%
</xsl:template>
<xsl:template match="//*[text() and not(contains(name(),'Calories')) and not(contains(name(),'Seconds')) and (contains(name(),'Total') or contains(name(),'Num') or name()='Score' or contains(name(),'Combo') or contains(name(..),'TapNoteScores') or name(..)='HoldNoteScores' or (name(..)='RadarValues' and not(contains(text(),'.'))))]">
<xsl:call-template name="PrintDecimal">
<xsl:with-param name="num" select="." />
</xsl:call-template>
</xsl:template>
<xsl:template name="PrintDecimal">
<xsl:param name="num" />
<xsl:value-of select="format-number($num,'#,##0')" />
</xsl:template>
<xsl:template match="//*[contains(name(),'Calories')]">
<xsl:call-template name="PrintCalories">
<xsl:with-param name="num" select="." />
</xsl:call-template>
</xsl:template>
<xsl:template name="PrintCalories">
<xsl:param name="num" />
<xsl:value-of select="format-number($num,'#,##0.0')" />
</xsl:template>
<xsl:template match="//*[contains(name(),'Seconds')]">
<xsl:call-template name="PrintSeconds">
<xsl:with-param name="num" select="." />
</xsl:call-template>
</xsl:template>
<xsl:template name="PrintSeconds">
<xsl:param name="num" />
<xsl:variable name="seconds" select="floor($num mod 60)" />
<xsl:variable name="minutes" select="floor(($num div 60) mod 60)" />
<xsl:variable name="hours" select="floor(($num div 3600))" />
<xsl:value-of select="format-number($hours,'#,##0')" />
<xsl:text>:</xsl:text>
<xsl:value-of select="format-number($minutes,'00')" />
<xsl:text>:</xsl:text>
<xsl:value-of select="format-number($seconds,'00')" />
</xsl:template>
<xsl:template match="//*[name(..)='RadarValues' and contains(text(),'.')]">
<xsl:call-template name="PrintPercentage">
<xsl:with-param name="num" select="." />
</xsl:call-template>
</xsl:template>
<xsl:template match="//*[contains(name(),'Is') or contains(name(),'Using')]">
<xsl:if test=".!='0'">
true
</xsl:if>
<xsl:if test=".='0'">
false
</xsl:if>
</xsl:template>
<xsl:template match="//*[contains(name(),'Guid')]">
<xsl:if test="$Catalog/InternetRankingViewGuidUrl != ''">
<xsl:element name="a">
<xsl:attribute name="href">
<xsl:value-of select="$Catalog/InternetRankingViewGuidUrl" />Guid=<xsl:value-of select="." />
</xsl:attribute>
<xsl:attribute name="target">
_new
</xsl:attribute>
<xsl:value-of select="." />
</xsl:element>
</xsl:if>
<xsl:if test="$Catalog/InternetRankingViewGuidUrl = ''">
<xsl:value-of select="." />
</xsl:if>
</xsl:template>
<!-- DataTable Elements -->
<xsl:template match="*" mode="DataTableElement" priority="-1">
<xsl:param name="nowrap" />
<tr>
<xsl:element name="td">
<xsl:attribute name="class">valuename</xsl:attribute>
<xsl:if test="$nowrap != ''">
<xsl:attribute name="nowrap">nowrap</xsl:attribute>
</xsl:if>
<xsl:apply-templates select="." mode="name" />
</xsl:element>
<td>&#160;</td>
<xsl:element name="td">
<xsl:attribute name="class">dyndata</xsl:attribute>
<xsl:if test="$nowrap != ''">
<xsl:attribute name="nowrap">nowrap</xsl:attribute>
</xsl:if>
<xsl:apply-templates select="." />
</xsl:element>
<td>&#160;&#160;&#160;</td>
</tr>
</xsl:template>
<xsl:template name="PrintHorizontalDataTable">
<xsl:param name="text" />
<table class="EntityTableAttr">
<tr>
<xsl:copy-of select="$text" />
</tr>
</table>
</xsl:template>
<xsl:template name="PrintHorizontalDataCell">
<xsl:param name="name" />
<xsl:param name="value" />
<td>
<table class="DataTableAttr">
<tr>
<xsl:element name="td">
<xsl:attribute name="class">valuename</xsl:attribute>
<xsl:copy-of select="$name" />
</xsl:element>
<td>&#160;&#160;</td>
<xsl:element name="td">
<xsl:attribute name="class">dyndata</xsl:attribute>
<xsl:copy-of select="$value" />
</xsl:element>
</tr>
</table>
</td>
</xsl:template>
<xsl:template name="PrintVerticalDataTable">
<xsl:param name="text" />
<table class="EntityTableAttr">
<tr>
<td>
<table class="DataTableAttr">
<xsl:copy-of select="$text" />
</table>
</td>
</tr>
</table>
</xsl:template>
<xsl:template name="PrintVerticalDataRow">
<xsl:param name="rank" select="''" />
<xsl:param name="name" />
<xsl:param name="value" select="''" />
<tr>
<xsl:if test="$rank != ''">
<xsl:element name="td">
<xsl:attribute name="class">valuename</xsl:attribute>
<xsl:copy-of select="$rank" />
</xsl:element>
<td>&#160;&#160;</td>
</xsl:if>
<xsl:element name="td">
<xsl:attribute name="class">valuename</xsl:attribute>
<xsl:copy-of select="$name" />
</xsl:element>
<xsl:if test="$value != ''">
<td>&#160;&#160;</td>
<xsl:element name="td">
<xsl:attribute name="class">dyndata</xsl:attribute>
<xsl:copy-of select="$value" />
</xsl:element>
</xsl:if>
</tr>
</xsl:template>
<!-- Table Generator -->
<xsl:template name="TableGenerator">
<xsl:param name="cols" select="2" />
<xsl:param name="nodeset" />
<xsl:param name="nodecounter" select="1" />
<xsl:param name="trid" />
<tr name="{$trid}">
<xsl:apply-templates select="$nodeset[position() >= $nodecounter and position() &lt; $nodecounter + $cols]" mode="TableGeneratorColumn">
<xsl:with-param name="rownode" select="$nodecounter" />
<xsl:with-param name="total" select="count($nodeset)" />
</xsl:apply-templates>
<xsl:if test="$nodecounter > 1 and ( $nodecounter + $cols > count($nodeset) ) and count($nodeset) mod $cols != 0">
<xsl:apply-templates select="$nodeset[1]" mode="TableGeneratorColumn">
<xsl:with-param name="emptycounter" select="$cols - ( count($nodeset) mod $cols )" />
</xsl:apply-templates>
</xsl:if>
</tr>
<xsl:if test="$nodecounter + $cols &lt;= count($nodeset)">
<xsl:call-template name="TableGenerator">
<xsl:with-param name="cols" select="$cols" />
<xsl:with-param name="nodecounter" select="$nodecounter + $cols" />
<xsl:with-param name="nodeset" select="$nodeset" />
<xsl:with-param name="trid" select="$trid" />
</xsl:call-template>
</xsl:if>
</xsl:template>
<xsl:template match="*" mode="TableGeneratorColumn">
<xsl:param name="emptycounter" select="0" />
<xsl:param name="rownode" select="1" />
<xsl:param name="total" select="1" />
<xsl:variable name="current" select="$rownode + position() - 1" />
<td>
<xsl:choose>
<xsl:when test="$emptycounter > 0">
&#160;
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select=".">
<xsl:with-param name="current" select="$current" />
<xsl:with-param name="total" select="$total" />
</xsl:apply-templates>
</xsl:otherwise>
</xsl:choose>
</td>
<xsl:if test="$emptycounter > 1">
<xsl:apply-templates select="." mode="TableGeneratorColumn">
<xsl:with-param name="emptycounter" select="$emptycounter - 1" />
</xsl:apply-templates>
</xsl:if>
</xsl:template>
<!-- Title Generator -->
<xsl:template mode="AttributeTitleGenerator" match="*">
<xsl:for-each select="@*">
<xsl:apply-templates select="." />
<xsl:text> </xsl:text>
</xsl:for-each>
</xsl:template>
<!-- DataTable Generator -->
<xsl:template name="DataTableGenerator">
<xsl:param name="cols" select="2" />
<xsl:param name="nodeset" />
<xsl:param name="nodecounter" select="1" />
<xsl:variable name="skip" select="ceiling( count($nodeset) div $cols )" />
<td valign="top">
<table class="DataTableAttr">
<xsl:apply-templates select="$nodeset[(position() >= $nodecounter) and (position() &lt; ($nodecounter + $skip))]" mode="DataTableElement" />
</table>
</td>
<xsl:if test="($nodecounter + $skip) &lt;= count($nodeset)">
<xsl:call-template name="DataTableGenerator">
<xsl:with-param name="cols" select="$cols" />
<xsl:with-param name="nodecounter" select="$nodecounter + $skip" />
<xsl:with-param name="nodeset" select="$nodeset" />
<xsl:with-param name="skip" select="$skip" />
</xsl:call-template>
</xsl:if>
</xsl:template>
<!-- CollapsibleTextTable -->
<xsl:template name="CollapsibleTextTable">
<xsl:param name="title" />
<xsl:param name="text" />
<xsl:call-template name="CollapsibleSubSection">
<xsl:with-param name="title" select="$title" />
<xsl:with-param name="text">
<table class="CollapsableTableAttr">
<tr>
<td>
<xsl:copy-of select="$text" />
</td>
</tr>
</table>
</xsl:with-param>
</xsl:call-template>
</xsl:template>
<xsl:template name="CollapsibleSubSection">
<xsl:param name="title" />
<xsl:param name="text" />
<table class="CollapsableTableAttr">
<tr>
<xsl:element name="th" use-attribute-sets="ToggleLinkAttr">
<xsl:attribute name="class">main</xsl:attribute>
<xsl:call-template name="ToggleDisplayImage" />
<xsl:text> </xsl:text><xsl:value-of select="$title" />
</xsl:element>
</tr>
<tr name="hide">
<td style="background: #F4F6F7;">
<xsl:copy-of select="$text" />
</td>
</tr>
</table>
</xsl:template>
<xsl:template name="SubSectionCompact">
<xsl:param name="title" />
<xsl:param name="text" />
<table class="CompactTableAttr">
<tr>
<xsl:element name="th">
<xsl:attribute name="class">main</xsl:attribute>
<xsl:value-of select="$title" />
</xsl:element>
</tr>
<tr name="hide">
<td style="background: #F4F6F7;">
<xsl:copy-of select="$text" />
</td>
</tr>
</table>
</xsl:template>
<xsl:template name="CollapsibleTopSection">
<xsl:param name="title" />
<xsl:param name="text" />
<table class="TopLevelTableAttr">
<tr>
<xsl:element name="th" use-attribute-sets="ToggleLinkAttr">
<xsl:attribute name="class">main</xsl:attribute>
<xsl:call-template name="ToggleDisplayImage" />
<xsl:text> </xsl:text><xsl:value-of select="$title" />
</xsl:element>
</tr>
<tr name="hide">
<td style="background: #F4F6F7;">
<xsl:copy-of select="$text" />
</td>
</tr>
</table>
</xsl:template>
<!-- Link for hiding & displaying data -->
<xsl:template name="ToggleDisplayImage">
<img name="toggleImage" align="absmiddle" class="hidden" /><span></span><span></span>
</xsl:template>
<!-- That's it -->
</xsl:stylesheet>
File diff suppressed because it is too large Load Diff
-35
View File
@@ -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
-431
View File
@@ -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 <set>
#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<bool> 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<StepsType> &vStepsTypesToShow = CommonMetrics::STEPS_TYPES_TO_SHOW.GetValue();
const vector<Difficulty> &vDifficultiesToShow = CommonMetrics::DIFFICULTIES_TO_SHOW.GetValue();
const vector<CourseDifficulty> &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<RString> 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<Song*> &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<Course*> vpCourses;
SONGMAN->GetAllCourses( vpCourses, false );
for( unsigned i=0; i<vpCourses.size(); i++ )
{
Course* pCourse = vpCourses[i];
// skip non-fixed courses. We don't have any stable data for them other than
// the title.
if( !pCourse->AllSongsAreFixed() )
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<Song*>& vpSongs = SONGMAN->GetAllSongs();
for( unsigned i=0; i<vpSongs.size(); i++ )
{
const 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() )
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<Course*> vpCourses;
SONGMAN->GetAllCourses( vpCourses, false );
for( unsigned i=0; i<vpCourses.size(); i++ )
{
Course* pCourse = vpCourses[i];
// skip non-fixed courses. We don't have any stable data for them other than
// the title.
if( !pCourse->AllSongsAreFixed() )
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<const Style*> 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<RString> modifiers;
THEME->GetOptionNames( modifiers );
FOREACH_CONST( RString, modifiers, iter )
{
PlayerOptions po;
RString s = *iter;
po.FromString( s );
vector<RString> 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.
*/
-42
View File
@@ -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.
*/
-21
View File
@@ -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<bool> SHOW_COIN_DATA( "Profile", "ShowCoinData" );
static Preference<bool> g_bProfileDataCompress( "ProfileDataCompress", false );
static Preference<bool> g_bCopyCatalogToProfiles( "CopyCatalogToProfiles", true );
extern Preference<bool> g_bWriteCatalog;
static ThemeMetric<RString> 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);
+1 -3
View File
@@ -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 );
-8
View File
@@ -977,14 +977,6 @@
RelativePath="BannerCache.h"
>
</File>
<File
RelativePath="CatalogXml.cpp"
>
</File>
<File
RelativePath="CatalogXml.h"
>
</File>
<File
RelativePath="Character.cpp"
>
-5
View File
@@ -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;