# highscore.cpp File Reference

Definition of functions used for highscore handling. More...

`#include "highscore.h"`
`#include "settings_type.h"`
`#include "company_base.h"`
`#include "company_func.h"`
`#include "cheat_func.h"`
`#include "string_func.h"`
`#include "strings_func.h"`
`#include "table/strings.h"`
`#include "core/sort_func.hpp"`
`#include "variables.h"`
`#include "debug.h"`

Go to the source code of this file.

## Defines
#define | LAST_HS_ITEM lengthof(_highscore_table) - 1
## Functions
StringID | EndGameGetPerformanceTitleFromValue (uint value)
int8 | SaveHighScoreValue (const Company *c)
| Save the highscore for the company.
static int CDECL | HighScoreSorter (const Company *const *a, const Company *const *b)
| Sort all companies given their performance.
int8 | SaveHighScoreValueNetwork ()
void | SaveToHighScore ()
| Save HighScore table to file.
void | LoadFromHighScore ()
| Initialize the highscore table to 0 and if any file exists, load in values.
## Variables
HighScore | _highscore_table [5][5]
static const StringID | _endgame_perf_titles []

## Detailed Description

Definition of functions used for highscore handling.

Definition in file highscore.cpp.

## Variable Documentation

const StringID _endgame_perf_titles[]`[static]`

Initial value:

     {
      STR_0213_BUSINESSMAN,
      STR_0213_BUSINESSMAN,
      STR_0213_BUSINESSMAN,
      STR_0213_BUSINESSMAN,
      STR_0213_BUSINESSMAN,
      STR_0214_ENTREPRENEUR,
      STR_0214_ENTREPRENEUR,
      STR_0215_INDUSTRIALIST,
      STR_0215_INDUSTRIALIST,
      STR_0216_CAPITALIST,
      STR_0216_CAPITALIST,
      STR_0217_MAGNATE,
      STR_0217_MAGNATE,
      STR_0218_MOGUL,
      STR_0218_MOGUL,
      STR_0219_TYCOON_OF_THE_CENTURY
    }

Definition at line 19 of file highscore.cpp.