# highscore.h

Go to the documentation of this file.

    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 "stdafx.h"
    00016 #include "strings_type.h"
    00017 #include "core/math_func.hpp"
    00018 #include "company_type.h"
    00019
    00020 struct HighScore {
    00021   char company[100];
    00022   StringID title;
    00023   uint16 score;
    00024 };
    00025
    00026 extern HighScore _highscore_table[5][5]; // 4 difficulty-settings (+ network); top 5
    00027
    00028 void SaveToHighScore();
    00029 void LoadFromHighScore();
    00030 int8 SaveHighScoreValue(const Company *c);
    00031 int8 SaveHighScoreValueNetwork();
    00032 StringID EndGameGetPerformanceTitleFromValue(uint value);
    00033 void ShowHighscoreTable(int difficulty, int8 rank);
    00034
    00035 #endif /* HIGHSCORE_H */