more of the same
This commit is contained in:
@@ -993,7 +993,8 @@ XNode* Profile::SaveCourseScoresCreateNode() const
|
|||||||
if( pProfile->GetCourseNumTimesPlayed(pCourse) == 0 )
|
if( pProfile->GetCourseNumTimesPlayed(pCourse) == 0 )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
XNode* pCourseNode = pNode->AppendChild( "Course", pCourse->m_bIsAutogen ? pCourse->m_sName : pCourse->m_sPath );
|
XNode* pCourseNode = pNode->AppendChild( "Course" );
|
||||||
|
pCourseNode->AppendAttr( "Name", pCourse->m_bIsAutogen ? pCourse->m_sName : pCourse->m_sPath );
|
||||||
|
|
||||||
for( StepsType st=(StepsType)0; st<NUM_STEPS_TYPES; ((int&)st)++ )
|
for( StepsType st=(StepsType)0; st<NUM_STEPS_TYPES; ((int&)st)++ )
|
||||||
{
|
{
|
||||||
@@ -1001,7 +1002,8 @@ XNode* Profile::SaveCourseScoresCreateNode() const
|
|||||||
if( pProfile->GetCourseHighScoreList(pCourse, st).iNumTimesPlayed == 0 )
|
if( pProfile->GetCourseHighScoreList(pCourse, st).iNumTimesPlayed == 0 )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
LPXNode pStepsTypeNode = pCourseNode->AppendChild( "StepsType", st );
|
LPXNode pStepsTypeNode = pCourseNode->AppendChild( "StepsType" );
|
||||||
|
pStepsTypeNode->AppendAttr( "Type", GameManager::NotesTypeToString(st) );
|
||||||
|
|
||||||
const HighScoreList &hsl = pProfile->GetCourseHighScoreList( pCourse, st );
|
const HighScoreList &hsl = pProfile->GetCourseHighScoreList( pCourse, st );
|
||||||
|
|
||||||
@@ -1025,11 +1027,16 @@ void Profile::LoadCourseScoresFromNode( const XNode* pNode )
|
|||||||
if( (*course)->name != "Course" )
|
if( (*course)->name != "Course" )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
CString sCourse;
|
const LPXAttr TypeAttr = (*course)->GetAttr( "Name" );
|
||||||
(*course)->GetValue(sCourse);
|
if( TypeAttr == NULL )
|
||||||
|
WARN_AND_CONTINUE;
|
||||||
|
CString sCourse = TypeAttr->value;
|
||||||
|
|
||||||
Course* pCourse = SONGMAN->GetCourseFromPath( sCourse );
|
Course* pCourse = SONGMAN->GetCourseFromPath( sCourse );
|
||||||
if( pCourse == NULL )
|
if( pCourse == NULL )
|
||||||
pCourse = SONGMAN->GetCourseFromName( sCourse );
|
pCourse = SONGMAN->GetCourseFromName( sCourse );
|
||||||
|
if( pCourse == NULL )
|
||||||
|
WARN_AND_CONTINUE;
|
||||||
|
|
||||||
for( XNodes::iterator stepsType = (*course)->childs.begin();
|
for( XNodes::iterator stepsType = (*course)->childs.begin();
|
||||||
stepsType != (*course)->childs.end();
|
stepsType != (*course)->childs.end();
|
||||||
@@ -1038,8 +1045,12 @@ void Profile::LoadCourseScoresFromNode( const XNode* pNode )
|
|||||||
if( (*stepsType)->name != "StepsType" )
|
if( (*stepsType)->name != "StepsType" )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
StepsType st;
|
const LPXAttr TypeAttr = (*stepsType)->GetAttr( "Type" );
|
||||||
(*stepsType)->GetValue((int&)st);
|
if( TypeAttr == NULL )
|
||||||
|
WARN_AND_CONTINUE;
|
||||||
|
StepsType st = GameManager::StringToNotesType( TypeAttr->value );
|
||||||
|
if( st == STEPS_TYPE_INVALID )
|
||||||
|
WARN_AND_CONTINUE;
|
||||||
|
|
||||||
XNode *pHighScoreListNode = (*stepsType)->GetChild("HighScoreList");
|
XNode *pHighScoreListNode = (*stepsType)->GetChild("HighScoreList");
|
||||||
if( pHighScoreListNode == NULL )
|
if( pHighScoreListNode == NULL )
|
||||||
|
|||||||
Reference in New Issue
Block a user