diff --git a/stepmania/src/Background.cpp b/stepmania/src/Background.cpp index 3f8ef526ca..b9da228f87 100644 --- a/stepmania/src/Background.cpp +++ b/stepmania/src/Background.cpp @@ -23,7 +23,6 @@ #include "XmlFile.h" #include "BackgroundUtil.h" #include "song.h" -#include "RageFileDriverMemory.h" ThemeMetric LEFT_EDGE ("Background","LeftEdge"); ThemeMetric TOP_EDGE ("Background","TopEdge"); @@ -768,9 +767,7 @@ void BackgroundImpl::Layer::UpdateCurBGChange( const Song *pSong, float fLastMus if( iter == m_BGAnimations.end() ) { XNode *pNode = change.m_def.CreateNode(); - RageFileObjMem f; - pNode->GetXML( f, NULL ); - LOG->Warn( "Tried to switch to a background that was never loaded\n" + f.GetString() ); + LOG->Warn( "Tried to switch to a background that was never loaded\n" + pNode->GetXML() ); SAFE_DELETE( pNode ); return; } diff --git a/stepmania/src/XmlFile.cpp b/stepmania/src/XmlFile.cpp index 7c143889a3..1ac26a040d 100644 --- a/stepmania/src/XmlFile.cpp +++ b/stepmania/src/XmlFile.cpp @@ -9,6 +9,7 @@ #include "DateTime.h" #include "Foreach.h" #include "arch/Dialog/Dialog.h" +#include "RageFileDriverMemory.h" static const char chXMLTagOpen = '<'; @@ -613,6 +614,22 @@ bool XNode::GetXML( RageFileBasic &f, DISP_OPT *opt ) const return true; } +//======================================================== +// Name : GetXML +// Desc : convert plain xml text from parsed xml node +// Param : +// Return : converted plain string +//-------------------------------------------------------- +// Coder Date Desc +// bro 2002-10-29 +//======================================================== +CString XNode::GetXML() const +{ + RageFileObjMem f; + GetXML( f, NULL ); + return f.GetString(); +} + //======================================================== // Name : GetValue // Desc : diff --git a/stepmania/src/XmlFile.h b/stepmania/src/XmlFile.h index 0b5d1fec0f..b660f144d2 100644 --- a/stepmania/src/XmlFile.h +++ b/stepmania/src/XmlFile.h @@ -170,6 +170,7 @@ struct XNode char* Load( const char* pszXml, PARSEINFO *pi ); char* LoadAttributes( const char* pszAttrs, PARSEINFO *pi ); bool GetXML( RageFileBasic &f, DISP_OPT *opt ) const; + CString GetXML() const; bool LoadFromFile( const CString &sFile ); bool LoadFromFile( RageFileBasic &f );