00001 /* $Id$ */ 00002 00003 /* 00004 * This file is part of OpenTTD. 00005 * 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. 00006 * 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. 00007 * 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/>. 00008 */ 00009 00012 #ifndef HIGHSCORE_H 00013 #define HIGHSCORE_H 00014 00015 #include "strings_type.h" 00016 #include "company_type.h" 00017 #include "settings_type.h" 00018 00019 struct HighScore { 00020 char company[100]; 00021 StringID title; 00022 uint16 score; 00023 }; 00024 00025 extern HighScore _highscore_table[SP_HIGHSCORE_END][5]; 00026 00027 void SaveToHighScore(); 00028 void LoadFromHighScore(); 00029 int8 SaveHighScoreValue(const Company *c); 00030 int8 SaveHighScoreValueNetwork(); 00031 StringID EndGameGetPerformanceTitleFromValue(uint value); 00032 void ShowHighscoreTable(int difficulty = SP_CUSTOM, int8 rank = -1); 00033 00034 #endif /* HIGHSCORE_H */