JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
077803303abe9a3a236171673267970c39f2d431
[vor.git] / score.h
1 /* Variations on RockDodger
2  * Copyright (C) 2004 Joshua Grams <josh@qualdan.com>
3  *
4  * This program is free software; you can redistribute it and/or modify it
5  * under the terms of the GNU General Public License as published by the
6  * Free Software Foundation; either version 2 of the License, or (at your
7  * option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  */
18
19 #ifndef VOR_SCORE_H
20 #define VOR_SCORE_H
21
22 #include <SDL.h>
23 #include <inttypes.h>
24 #include <stdio.h>
25
26 #define N_SCORES 8
27 #define LOW_SCORE (N_SCORES-1)
28
29 struct highscore {
30         int score;
31         char name[32];
32 };
33
34 extern struct highscore g_scores[N_SCORES];
35
36 void read_high_score_table(void);
37 void write_high_score_table(void);
38 int snprintscore(char *s, size_t n, int score);
39 int snprintscore_line(char *s, size_t n, int score);
40 void display_scores(SDL_Surface *s, uint32_t x, uint32_t y);
41 int new_high_score(int score);
42 int process_score_input(void);
43
44 #endif // VOR_SCORE_H