save time, machineGuid in HighScore
This commit is contained in:
@@ -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. */
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user