Files
itgmania212121/stepmania/src/HighScore.h
T
Chris Danford 4bdc608b1c move empty score name logic into HighScore
add FOV to ScreenNameEntryTraditional
2004-03-08 02:50:46 +00:00

67 lines
1.1 KiB
C

#ifndef HighScore_H
#define HighScore_H
/*
-----------------------------------------------------------------------------
Class: HighScore
Desc: Player data that persists between sessions. Can be stored on a local
disk or on a memory card.
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
Chris Danford
-----------------------------------------------------------------------------
*/
#include "Grade.h"
#include "XmlFile.h"
struct HighScore
{
CString sName;
Grade grade;
int iScore;
float fPercentDP;
float fSurviveSeconds;
CString sModifiers;
HighScore()
{
grade = GRADE_NO_DATA;
iScore = 0;
fPercentDP = 0;
fSurviveSeconds = 0;
}
bool operator>=( const HighScore& other ) const;
XNode* CreateNode() const;
void LoadFromNode( const XNode* pNode );
CString GetDisplayName() const;
};
struct HighScoreList
{
int iNumTimesPlayed;
vector<HighScore> vHighScores;
HighScoreList()
{
iNumTimesPlayed = 0;
}
void Init();
void AddHighScore( HighScore hs, int &iIndexOut );
const HighScore& GetTopScore() const;
XNode* CreateNode() const;
void LoadFromNode( const XNode* pNode );
};
#endif