Class THighScoreList (unit High) |
Inherits from
TObject
constructor Create(lstObjects: TList; iGroupID: Integer);
- Class constructor and destructor.
destructor Destroy;
Read the current high score set.
procedure DisplayScores;
Method to display and hide the top pilot rankings.
procedure HideScores;
Perform default cleanup.
procedure HighlightScore(iRank: Integer);
function iRankScore(lScore: LongInt): Integer;
Method to rank a score among the current list of pilots.
function iSetNewHighScore(lScore: LongInt; szTag: String): Integer;
Methods to insert a new high score and tag, and highlight the new
score with flashing text.
function lGetNthScore(iRank: Integer): LongInt;
Method to get the score of the Nth pilot.
procedure ReadHighScores;
Methods to read and write high scores from the INI file.
procedure WriteHighScores;
Return the ranking for the user.
m_hsScores : Array [0 .. MAX_HIGH_SCORES - 1] of THighScoreRecord;
Reference to global object list.
m_lstObjects : TList;
Painting canvas.
m_szScoreINIPath : String;
m_textMsg : Array [0 .. MAX_TEXT_FIELDS - 1] of TTextObject;
Text object for placing messages on the screen.
m_vidSurface : TCanvas;
Path name of the score file.
constructor Create(lstObjects: TList; iGroupID: Integer);
Class constructor and destructor.
destructor Destroy;
Read the current high score set.
procedure DisplayScores;
Method to display and hide the top pilot rankings.
Iterate through our list of text objects.
procedure HideScores;
Perform default cleanup.
procedure HighlightScore(iRank: Integer);
function iRankScore(lScore: LongInt): Integer;
Method to rank a score among the current list of pilots.
Note that this routine was written for Delphi 1.0 and can be cleaned up.
function iSetNewHighScore(lScore: LongInt; szTag: String): Integer;
Methods to insert a new high score and tag, and highlight the new
score with flashing text.
Return the resulting ranking.
function lGetNthScore(iRank: Integer): LongInt;
Method to get the score of the Nth pilot.
Write the associated score.
procedure ReadHighScores;
Methods to read and write high scores from the INI file.
Note that this routine was written for Delphi 1.0 and can be cleaned up.
procedure WriteHighScores;
Return the ranking for the user.
m_hsScores : Array [0 .. MAX_HIGH_SCORES - 1] of THighScoreRecord;
Reference to global object list. } { Current scoring array.
m_lstObjects : TList;
Painting canvas.
m_szScoreINIPath : String;
m_textMsg : Array [0 .. MAX_TEXT_FIELDS - 1] of TTextObject;
Text object for placing messages on the screen.
m_vidSurface : TCanvas;
Path name of the score file.