Angband
Data Structures | Macros | Functions
score.h File Reference

Highscore handling for Angband. More...

Go to the source code of this file.

Data Structures

struct  high_score
 Semi-Portable High Score List Entry (128 bytes) More...

Macros

#define MAX_HISCORES   100
 Maximum number of high scores in the high score file.

Functions

size_t highscore_read (high_score scores[], size_t sz)
 Read in a highscore file.
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.
size_t highscore_add (const high_score *entry, high_score scores[], size_t sz)
void build_score (high_score *entry, const char *died_from, time_t *death_time)
void enter_score (time_t *death_time)
 Enters a players name on a hi-score table, if "legal".

Detailed Description

Highscore handling for Angband.

Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke

This work is free software; you can redistribute it and/or modify it under the terms of either:

a) the GNU General Public License as published by the Free Software Foundation, version 2, or

b) the "Angband licence": This software may be copied and distributed for educational, research, and not for profit purposes provided that this copyright and statement are included in all such copies. Other copyrights may also apply.

Macro Definition Documentation

#define MAX_HISCORES   100

Maximum number of high scores in the high score file.

Referenced by display_scores_aux(), enter_score(), predict_score(), and show_scores().

Function Documentation

void build_score ( high_score entry,
const char *  died_from,
time_t *  death_time 
)
void enter_score ( time_t *  death_time)
size_t highscore_add ( const high_score entry,
high_score  scores[],
size_t  sz 
)

References highscore_where().

Referenced by enter_score(), and predict_score().

size_t highscore_read ( high_score  scores[],
size_t  sz 
)
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.

References i, and high_score::pts.

Referenced by highscore_add(), and predict_score().