Translations update
[openttd/fttd.git] / src / highscore.h
blob72c52c7065ed53893c5a07dbb9cc37011ed8c049
1 /* $Id$ */
3 /*
4 * This file is part of OpenTTD.
5 * 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.
6 * 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.
7 * 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 */
10 /** @file highscore.h Declaration of functions and types defined in highscore.h and highscore_gui.h */
12 #ifndef HIGHSCORE_H
13 #define HIGHSCORE_H
15 #include "string.h"
16 #include "strings_type.h"
17 #include "company_type.h"
18 #include "settings_type.h"
20 struct HighScore {
21 /**
22 * The name of the company and president.
23 * The + 5 is for the comma and space or possibly other characters
24 * that join the two names in this single string and the '\0'.
26 char company[(MAX_LENGTH_COMPANY_NAME_CHARS + MAX_LENGTH_PRESIDENT_NAME_CHARS + 5) * MAX_CHAR_LENGTH];
27 StringID title; ///< NOSAVE, has troubles with changing string-numbers.
28 uint16 score; ///< The score for this high score. Do NOT change type, will break hs.dat
31 extern HighScore _highscore_table[SP_HIGHSCORE_END][5];
33 void SaveToHighScore();
34 void LoadFromHighScore();
35 int8 SaveHighScoreValue(const Company *c);
36 int8 SaveHighScoreValueNetwork();
37 StringID EndGameGetPerformanceTitleFromValue(uint value);
38 void ShowHighscoreTable(int difficulty = SP_CUSTOM, int8 rank = -1);
40 #endif /* HIGHSCORE_H */