2020-12-06 14:21:56 +01:00
|
|
|
#pragma once
|
2020-12-13 14:05:19 +01:00
|
|
|
#include "pinball.h"
|
2020-12-12 14:36:20 +01:00
|
|
|
|
|
|
|
struct high_score_struct
|
|
|
|
{
|
|
|
|
char Name[32];
|
|
|
|
int Score;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2020-12-06 14:21:56 +01:00
|
|
|
class high_score
|
|
|
|
{
|
|
|
|
public:
|
2020-12-12 14:36:20 +01:00
|
|
|
static int read(high_score_struct* table, int* ptrToSmth);
|
|
|
|
static int write(high_score_struct* table, int* ptrToSmth);
|
|
|
|
static void clear_table(high_score_struct* table);
|
|
|
|
static int get_score_position(high_score_struct* table, int score);
|
|
|
|
static int place_new_score_into(high_score_struct* table, int score, LPSTR scoreStr, int position);
|
|
|
|
static void scramble_number_string(int Value, char* Buffer);
|
|
|
|
|
|
|
|
static void show_high_score_dialog(high_score_struct* table);
|
|
|
|
static void show_and_set_high_score_dialog(high_score_struct* table, int score, int pos, LPCSTR defaultName);
|
2021-09-05 09:47:05 +02:00
|
|
|
static void RenderHighScoreDialog();
|
2020-12-12 14:36:20 +01:00
|
|
|
private :
|
|
|
|
static int dlg_enter_name;
|
|
|
|
static int dlg_score;
|
2021-02-02 16:29:54 +01:00
|
|
|
static int dlg_position;
|
2021-09-05 09:47:05 +02:00
|
|
|
static char default_name[32];
|
2020-12-12 14:36:20 +01:00
|
|
|
static high_score_struct* dlg_hst;
|
2020-12-13 14:05:19 +01:00
|
|
|
static winhelp_entry help[21];
|
2021-09-05 09:47:05 +02:00
|
|
|
static bool ShowDialog;
|
2020-12-06 14:21:56 +01:00
|
|
|
};
|