split HighScore to separate file
move score data from ProfileManager to Profile store score data in XML for easier forward/backward compatibility
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include "RageFile.h"
|
||||
|
||||
|
||||
static const TCHAR chXMLTagOpen = '<';
|
||||
@@ -1185,3 +1186,23 @@ CString XEntity2Ref( LPCTSTR str )
|
||||
{
|
||||
return entityDefault.Entity2Ref( str );
|
||||
}
|
||||
|
||||
bool _tagXMLNode::LoadFromFile( CString sFile, LPPARSEINFO pi )
|
||||
{
|
||||
RageFile f;
|
||||
if( !f.Open(sFile, RageFile::READ) )
|
||||
return false;
|
||||
CString s;
|
||||
f.Read( s );
|
||||
this->Load( s, pi );
|
||||
return true;
|
||||
}
|
||||
|
||||
bool _tagXMLNode::SaveToFile( CString sFile, LPDISP_OPT opt )
|
||||
{
|
||||
RageFile f;
|
||||
if( !f.Open(sFile, RageFile::WRITE) )
|
||||
return false;
|
||||
f.Write( this->GetXML(opt) );
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user