home *** CD-ROM | disk | FTP | other *** search
- /**********************************************************************
- * smscores.h
- *
- * Hi-score handling module for the StarMines
- **********************************************************************
- This file is part of
-
- STK -- The sprite toolkit -- version 1.1
-
- Copyright (C) Jari Karjala 1991
-
- The sprite toolkit (STK) is a FreeWare toolkit for creating high
- resolution sprite graphics with PCompatible hardware. This toolkit
- is provided as is without any warranty or such thing. See the file
- COPYING for further information.
-
- **********************************************************************
- **********************************************************************/
-
- #define SCORE_COUNT 5
- #define SCORE_MAX_NAME_LEN 20
- #define SCORE_FILE "sm .scr"
-
- typedef struct {
- char name[SCORE_MAX_NAME_LEN];
- long score;
- } SCORE_ENTRY;
-
- /**********************************************************************
- * Initialize the hiscores. Read them from file, if file found.
- **********************************************************************/
- void smscores_init(void);
-
- /**********************************************************************
- * Check whether the score if high enough
- * Return: The place in the hall of fame (1..MAX)
- **********************************************************************/
- int smscores_check(long score);
-
- /**********************************************************************
- * Add the given entry to the list, if it is high enough.
- * Return: 0 if success, -1 if score was too low.
- **********************************************************************/
- int smscores_add(SCORE_ENTRY *entry);
-
- /**********************************************************************
- * Return the highest score.
- **********************************************************************/
- SCORE_ENTRY *smscores_get_first(void);
-
- /**********************************************************************
- * Return the next scores.
- **********************************************************************/
- SCORE_ENTRY *smscores_get_next(void);
-