save time, machineGuid in HighScore

This commit is contained in:
Chris Danford
2004-04-18 19:49:45 +00:00
parent d62369baf1
commit 049a251ebb
3 changed files with 9 additions and 0 deletions
+4
View File
@@ -54,6 +54,8 @@ XNode* HighScore::CreateNode() const
pNode->AppendChild( "PercentDP", fPercentDP );
pNode->AppendChild( "SurviveSeconds", fSurviveSeconds );
pNode->AppendChild( "Modifiers", sModifiers );
pNode->AppendChild( "Time", time );
pNode->AppendChild( "MachineGuid", sMachineGuid );
return pNode;
}
@@ -71,6 +73,8 @@ void HighScore::LoadFromNode( const XNode* pNode )
else if( (*child)->name == "PercentDP" ) (*child)->GetValue( fPercentDP );
else if( (*child)->name == "SurviveSeconds" ) (*child)->GetValue( fSurviveSeconds );
else if( (*child)->name == "Modifiers" ) (*child)->GetValue( sModifiers );
else if( (*child)->name == "Time" ) (*child)->GetValue( (int&)time );
else if( (*child)->name == "MachineGuid" ) (*child)->GetValue( sMachineGuid );
}
/* Validate input. */
+3
View File
@@ -23,6 +23,8 @@ struct HighScore
float fPercentDP;
float fSurviveSeconds;
CString sModifiers;
time_t time; // return value of time() when screenshot was taken
CString sMachineGuid; // where this screenshot was taken
HighScore()
@@ -31,6 +33,7 @@ struct HighScore
iScore = 0;
fPercentDP = 0;
fSurviveSeconds = 0;
time = 0;
}
bool operator>=( const HighScore& other ) const;
+2
View File
@@ -944,6 +944,8 @@ void ScreenEvaluation::CommitScores(
hs.fPercentDP = stageStats.GetPercentDancePoints( (PlayerNumber)p );
hs.fSurviveSeconds = stageStats.fAliveSeconds[p];
hs.sModifiers = GAMESTATE->m_PlayerOptions[p].GetString();
hs.time = time(NULL);
hs.sMachineGuid = PROFILEMAN->GetMachineProfile()->m_sGuid;
StepsType nt = GAMESTATE->GetCurrentStyleDef()->m_StepsType;