2020-12-06 14:21:56 +01:00
|
|
|
#pragma once
|
2020-12-12 14:36:20 +01:00
|
|
|
|
|
|
|
struct high_score_struct
|
|
|
|
{
|
|
|
|
char Name[32];
|
|
|
|
int Score;
|
|
|
|
};
|
|
|
|
|
2022-04-11 09:28:20 +02:00
|
|
|
struct high_score_entry
|
|
|
|
{
|
|
|
|
high_score_struct Entry;
|
|
|
|
int Position;
|
|
|
|
};
|
|
|
|
|
2020-12-12 14:36:20 +01:00
|
|
|
|
2020-12-06 14:21:56 +01:00
|
|
|
class high_score
|
|
|
|
{
|
|
|
|
public:
|
2022-04-11 09:28:20 +02:00
|
|
|
static high_score_struct highscore_table[5];
|
2020-12-12 14:36:20 +01:00
|
|
|
|
2022-04-11 09:28:20 +02:00
|
|
|
static int read();
|
|
|
|
static int write();
|
|
|
|
static int get_score_position(int score);
|
|
|
|
|
|
|
|
static void show_high_score_dialog();
|
|
|
|
static void show_and_set_high_score_dialog(high_score_entry score);
|
2021-09-05 09:47:05 +02:00
|
|
|
static void RenderHighScoreDialog();
|
2022-04-11 09:28:20 +02:00
|
|
|
private:
|
|
|
|
static bool dlg_enter_name;
|
|
|
|
static high_score_entry DlgData;
|
2021-09-05 09:47:05 +02:00
|
|
|
static bool ShowDialog;
|
2022-04-11 09:28:20 +02:00
|
|
|
static std::vector<high_score_entry> ScoreQueue;
|
|
|
|
|
|
|
|
static void clear_table();
|
|
|
|
static void place_new_score_into(high_score_entry data);
|
2020-12-06 14:21:56 +01:00
|
|
|
};
|