diff --git a/stepmania/src/Bookkeeper.cpp b/stepmania/src/Bookkeeper.cpp index 7efe75208f..9b68e88f9c 100644 --- a/stepmania/src/Bookkeeper.cpp +++ b/stepmania/src/Bookkeeper.cpp @@ -138,7 +138,7 @@ void Bookkeeper::WriteToDisk() return; } - DISP_OPT opt; + XMLDisplayOptions opt; XNode *xml = CreateNode(); xml->SaveToFile( f, opt ); delete xml; diff --git a/stepmania/src/CatalogXml.cpp b/stepmania/src/CatalogXml.cpp index db5d74b547..d9b02ee629 100644 --- a/stepmania/src/CatalogXml.cpp +++ b/stepmania/src/CatalogXml.cpp @@ -392,7 +392,7 @@ void CatalogXml::Save( LoadingWindow *loading_window ) xml.AppendChild( "FooterText", FOOTER_TEXT ); xml.AppendChild( "FooterLink", FOOTER_LINK ); - DISP_OPT opts; + XMLDisplayOptions opts; opts.stylesheet = CATALOG_XSL; opts.write_tabs = false; xml.SaveToFile(fn, opts); diff --git a/stepmania/src/ExportStrings.cpp b/stepmania/src/ExportStrings.cpp index 60a613edc3..94cee0353e 100644 --- a/stepmania/src/ExportStrings.cpp +++ b/stepmania/src/ExportStrings.cpp @@ -57,7 +57,7 @@ void ExportStrings::LuaInformation() XNode *pDateNode = pNode->AppendChild( "Date" ); pDateNode->m_sValue = DateTime::GetNowDate().GetString(); - DISP_OPT disp; + XMLDisplayOptions disp; disp.stylesheet = "Lua.xsl"; pNode->SaveToFile( "Lua.xml", disp ); diff --git a/stepmania/src/Profile.cpp b/stepmania/src/Profile.cpp index d8689a38fb..47bb46a4f6 100644 --- a/stepmania/src/Profile.cpp +++ b/stepmania/src/Profile.cpp @@ -940,7 +940,7 @@ bool Profile::SaveStatsXmlToDir( RString sDir, bool bSignData ) const // Save stats.xml RString fn = sDir + STATS_XML; - DISP_OPT opts; + XMLDisplayOptions opts; opts.stylesheet = STATS_XSL; opts.write_tabs = false; bool bSaved = xml->SaveToFile( fn, opts ); diff --git a/stepmania/src/ScreenGameplay.cpp b/stepmania/src/ScreenGameplay.cpp index f50652370d..0ff52840a2 100644 --- a/stepmania/src/ScreenGameplay.cpp +++ b/stepmania/src/ScreenGameplay.cpp @@ -2592,7 +2592,7 @@ void ScreenGameplay::SaveReplay() FOREACH_EnabledPlayerInfo( m_vPlayerInfo, pi ) { XNode *p = pi->m_pPlayer->GetNoteData().CreateNode(); - DISP_OPT opt; + XMLDisplayOptions opt; // // Find a file name for the screenshot diff --git a/stepmania/src/Workout.cpp b/stepmania/src/Workout.cpp index d6a80ca8e0..4f7f1b8727 100644 --- a/stepmania/src/Workout.cpp +++ b/stepmania/src/Workout.cpp @@ -213,7 +213,7 @@ bool Workout::SaveToFile( RString sFile ) songGenres->AppendChild( "SongGenre", *s ); } - DISP_OPT opts; + XMLDisplayOptions opts; return xml.SaveToFile( sFile, opts ); } diff --git a/stepmania/src/XmlFile.cpp b/stepmania/src/XmlFile.cpp index 4c656227ad..1d4671a45b 100644 --- a/stepmania/src/XmlFile.cpp +++ b/stepmania/src/XmlFile.cpp @@ -391,7 +391,7 @@ unsigned XNode::Load( const RString &xml, RString &sErrorOut, unsigned iOffset ) // Desc : convert plain xml text from parsed xml attirbute // Return : converted plain string -bool XNode::GetAttrXML( RageFileBasic &f, DISP_OPT &opt, const RString &sName, const RString &sValue ) const +bool XNode::GetAttrXML( RageFileBasic &f, XMLDisplayOptions &opt, const RString &sName, const RString &sValue ) const { RString s(sValue); ReplaceEntityText( s, g_mapCharsToEntities ); @@ -400,7 +400,7 @@ bool XNode::GetAttrXML( RageFileBasic &f, DISP_OPT &opt, const RString &sName, c // Desc : convert plain xml text from parsed xml node // Return : converted plain string -bool XNode::GetXML( RageFileBasic &f, DISP_OPT &opt ) const +bool XNode::GetXML( RageFileBasic &f, XMLDisplayOptions &opt ) const { // tab if( f.Write("\r\n") == -1 ) @@ -483,7 +483,7 @@ bool XNode::GetXML( RageFileBasic &f, DISP_OPT &opt ) const RString XNode::GetXML() const { RageFileObjMem f; - DISP_OPT opt; + XMLDisplayOptions opt; GetXML( f, opt ); return f.GetString(); } @@ -596,7 +596,7 @@ void XNode::AppendAttr( const RString &sName, float value ){ AppendAttr(sName,ss void XNode::AppendAttr( const RString &sName, int value ) { AppendAttr(sName,ssprintf("%d",value)); } void XNode::AppendAttr( const RString &sName, unsigned value ) { AppendAttr(sName,ssprintf("%u",value)); } -bool XNode::SaveToFile( RageFileBasic &f, DISP_OPT &opt ) const +bool XNode::SaveToFile( RageFileBasic &f, XMLDisplayOptions &opt ) const { f.PutLine( "" ); if( !opt.stylesheet.empty() ) @@ -608,7 +608,7 @@ bool XNode::SaveToFile( RageFileBasic &f, DISP_OPT &opt ) const return true; } -bool XNode::SaveToFile( const RString &sFile, DISP_OPT &opt ) const +bool XNode::SaveToFile( const RString &sFile, XMLDisplayOptions &opt ) const { RageFile f; if( !f.Open(sFile, RageFile::WRITE) ) diff --git a/stepmania/src/XmlFile.h b/stepmania/src/XmlFile.h index 29f753d50a..d9fa873ada 100644 --- a/stepmania/src/XmlFile.h +++ b/stepmania/src/XmlFile.h @@ -36,13 +36,13 @@ typedef multimap XNodes; ++Var##Iter ) // display optional environment -struct DISP_OPT +struct XMLDisplayOptions { RString stylesheet; // empty string = no stylesheet bool write_tabs; // if false, don't write tab indent characters int tab_base; // internal usage - DISP_OPT() + XMLDisplayOptions() { stylesheet = ""; write_tabs = true; @@ -74,12 +74,12 @@ public: // Load/Save XML unsigned Load( const RString &sXml, RString &sErrorOut, unsigned iOffset = 0 ); unsigned LoadAttributes( const RString &sAttrs, RString &sErrorOut, unsigned iOffset ); - bool GetXML( RageFileBasic &f, DISP_OPT &opt ) const; - bool GetAttrXML( RageFileBasic &f, DISP_OPT &opt, const RString &sName, const RString &sValue ) const; + bool GetXML( RageFileBasic &f, XMLDisplayOptions &opt ) const; + bool GetAttrXML( RageFileBasic &f, XMLDisplayOptions &opt, const RString &sName, const RString &sValue ) const; RString GetXML() const; - bool SaveToFile( const RString &sFile, DISP_OPT &opt ) const; - bool SaveToFile( RageFileBasic &f, DISP_OPT &opt ) const; + bool SaveToFile( const RString &sFile, XMLDisplayOptions &opt ) const; + bool SaveToFile( RageFileBasic &f, XMLDisplayOptions &opt ) const; // in own attribute list const RString *GetAttr( const RString &sAttrName ) const;