X-Git-Url: https://jasonwoof.com/gitweb/?p=vor.git;a=blobdiff_plain;f=score.h;fp=score.h;h=478afcad22aa46895abd38dbacbc858c7cf40328;hp=0000000000000000000000000000000000000000;hb=6f82bba8833f187abebab53375ac87905487cf8c;hpb=0ebbb01f731d0c9bb71140a93cfddd9abde509e5 diff --git a/score.h b/score.h new file mode 100644 index 0000000..478afca --- /dev/null +++ b/score.h @@ -0,0 +1,44 @@ +/* Variations on RockDodger + * Copyright (C) 2004 Joshua Grams + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef VOR_SCORE_H +#define VOR_SCORE_H + +#include +#include +#include + +#define N_SCORES 8 +#define LOW_SCORE (N_SCORES-1) + +struct highscore { + int score; + char name[32]; +}; + +extern struct highscore g_scores[N_SCORES]; + +void read_high_score_table(void); +void write_high_score_table(void); +int snprintscore(char *s, size_t n, int score); +int snprintscore_line(char *s, size_t n, int score); +void display_scores(SDL_Surface *s, uint32_t x, uint32_t y); +int new_high_score(int score); +int process_score_input(void); + +#endif // VOR_SCORE_H