2 * This file is part of OpenTTD.
3 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
4 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
5 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
8 /** @file highscore.h Declaration of functions and types defined in highscore.h and highscore_gui.h */
13 #include "strings_type.h"
14 #include "company_type.h"
15 #include "settings_type.h"
18 std::string name
; ///< The name of the companyy and president.
19 StringID title
= INVALID_STRING_ID
; ///< NOSAVE, has troubles with changing string-numbers.
20 uint16_t score
= 0; ///< The score for this high score. Do NOT change type, will break hs.dat
23 using HighScores
= std::array
<HighScore
, 5>; ///< Record 5 high scores
24 using HighScoresTable
= std::array
<HighScores
, SP_HIGHSCORE_END
>; ///< Record high score for each of the difficulty levels
25 extern HighScoresTable _highscore_table
;
27 void SaveToHighScore();
28 void LoadFromHighScore();
29 int8_t SaveHighScoreValue(const Company
*c
);
30 int8_t SaveHighScoreValueNetwork();
31 StringID
EndGameGetPerformanceTitleFromValue(uint value
);
32 void ShowHighscoreTable(int difficulty
= SP_CUSTOM
, int8_t rank
= -1);
34 #endif /* HIGHSCORE_H */