OSDN Git Service

Merge pull request #3532 from sikabane-works/release/3.0.0.87-alpha
[hengbandforosx/hengbandosx.git] / src / core / score-util.h
1 #pragma once
2
3 #include "system/angband.h"
4
5 #define MAX_HISCORES 999 /*!< スコア情報保存の最大数 / Maximum number of high scores in the high score file */
6
7 /*
8  * Semi-Portable High Score List Entry (128 bytes) -- BEN
9  *
10  * All fields listed below are null terminated ascii strings.
11  *
12  * In addition, the "number" fields are right justified, and
13  * space padded, to the full available length (minus the "null").
14  *
15  * Note that "string comparisons" are thus valid on "pts".
16  */
17 class PlayerType;
18 struct high_score {
19     GAME_TEXT what[8]{}; /* Version info (string) */
20     GAME_TEXT pts[10]{}; /* Total Score (number) */
21     GAME_TEXT gold[10]{}; /* Total Gold (number) */
22     GAME_TEXT turns[10]{}; /* Turns Taken (number) */
23     GAME_TEXT day[10]{}; /* Time stamp (string) */
24     GAME_TEXT who[16]{}; /* Player Name (string) */
25     GAME_TEXT uid[8]{}; /* Player UID (number) */
26     GAME_TEXT sex[2]{}; /* Player Sex (string) */
27     GAME_TEXT p_r[3]{}; /* Player Race (number) */
28     GAME_TEXT p_c[3]{}; /* Player Class (number) */
29     GAME_TEXT p_a[3]{}; /* Player Seikaku (number) */
30
31     GAME_TEXT cur_lev[4]{}; /* Current Player Level (number) */
32     GAME_TEXT cur_dun[4]{}; /* Current Dungeon Level (number) */
33     GAME_TEXT max_lev[4]{}; /* Max Player Level (number) */
34     GAME_TEXT max_dun[4]{}; /* Max Dungeon Level (number) */
35
36     GAME_TEXT how[40]{}; /* Method of death (string) */
37
38     void copy_info(const PlayerType &player);
39 };
40
41 extern int highscore_fd;
42
43 int highscore_seek(int i);
44 errr highscore_read(high_score *score);