Angband
score.h
Go to the documentation of this file.
1 
19 #ifndef INCLUDED_SCORE_H
20 #define INCLUDED_SCORE_H
21 
25 #define MAX_HISCORES 100
26 
27 
38 typedef struct
39 {
40  char what[8]; /* Version info (string) */
41  char pts[10]; /* Total Score (number) */
42  char gold[10]; /* Total Gold (number) */
43  char turns[10]; /* Turns Taken (number) */
44  char day[10]; /* Time stamp (string) */
45  char who[16]; /* Player Name (string) */
46  char uid[8]; /* Player UID (number) */
47  char p_r[3]; /* Player Race (number) */
48  char p_c[3]; /* Player Class (number) */
49  char cur_lev[4]; /* Current Player Level (number) */
50  char cur_dun[4]; /* Current Dungeon Level (number) */
51  char max_lev[4]; /* Max Player Level (number) */
52  char max_dun[4]; /* Max Dungeon Level (number) */
53  char how[32]; /* Method of death (string) */
54 } high_score;
55 
56 
57 
58 size_t highscore_read(high_score scores[], size_t sz);
59 size_t highscore_where(const high_score *entry, const high_score scores[],
60  size_t sz);
61 size_t highscore_add(const high_score *entry, high_score scores[], size_t sz);
62 void build_score(high_score *entry, const char *died_from, time_t *death_time);
63 void enter_score(time_t *death_time);
64 
65 #endif /* INCLUDED_SCORE_H */
size_t highscore_where(const high_score *entry, const high_score scores[], size_t sz)
Just determine where a new score would be placed Return the location (0 is best) or -1 on failure...
Definition: score.c:65
size_t highscore_add(const high_score *entry, high_score scores[], size_t sz)
Definition: score.c:86
Use the roguelike command false Show damage player deals to false Always pickup false Show flavors in object false Highlight player with cursor between turns
Definition: list-options.h:30
void enter_score(time_t *death_time)
Enters a players name on a hi-score table, if "legal".
Definition: score.c:236
void build_score(high_score *entry, const char *died_from, time_t *death_time)
Definition: score.c:188
Semi-Portable High Score List Entry (128 bytes)
Definition: score.h:38
size_t highscore_read(high_score scores[], size_t sz)
Read in a highscore file.
Definition: score.c:37