00001 /* $Id: highscore.h 18809 2010-01-15 16:41:15Z rubidium $ */ 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 00018 struct HighScore { 00019 char company[100]; 00020 StringID title; 00021 uint16 score; 00022 }; 00023 00024 extern HighScore _highscore_table[5][5]; // 4 difficulty-settings (+ network); top 5 00025 00026 void SaveToHighScore(); 00027 void LoadFromHighScore(); 00028 int8 SaveHighScoreValue(const Company *c); 00029 int8 SaveHighScoreValueNetwork(); 00030 StringID EndGameGetPerformanceTitleFromValue(uint value); 00031 void ShowHighscoreTable(int difficulty, int8 rank); 00032 00033 #endif /* HIGHSCORE_H */