Fix #10490: Allow ships to exit depots if another is not moving at the exit point...
[openttd-github.git] / src / highscore.h
blobd3a779dfbc4a67efcd27e852d4fdd1db6517e009
1 /*
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/>.
6 */
8 /** @file highscore.h Declaration of functions and types defined in highscore.h and highscore_gui.h */
10 #ifndef HIGHSCORE_H
11 #define HIGHSCORE_H
13 #include "strings_type.h"
14 #include "company_type.h"
15 #include "settings_type.h"
17 struct HighScore {
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 */