X-Git-Url: https://jasonwoof.com/gitweb/?p=vor.git;a=blobdiff_plain;f=score.c;h=77e8ab35ba8bb503343345da4a355405adf2cfef;hp=f37fc66dc39e8e897471dab78bd226542f4cfcdb;hb=148882a3cc520f34616a1175ed157fe258d68dcc;hpb=232d1b5f32a2d72f4d3fe7326f942bb7887a7f40 diff --git a/score.c b/score.c index f37fc66..77e8ab3 100644 --- a/score.c +++ b/score.c @@ -16,19 +16,20 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "config.h" - -#include "SFont.h" -#include "file.h" -#include "score.h" - #include #include -#include #include #include #include +#include "SFont.h" + +#include "common.h" +#include "config.h" +#include "file.h" +#include "globals.h" +#include "score.h" + // High score table struct highscore g_scores[N_SCORES] = { {1*60*1000,"-"}, @@ -121,11 +122,13 @@ snprintscore(char *s, size_t n, int score) } } -int -snprintscore_line(char *s, size_t n, int score) +void +show_score(void) { - int r = snprintf(s, n, "Time: "); - return r + snprintscore(s+r, n-r, score); + char s[16]; + int r = snprintf(s, 16, "Time: "); + snprintscore(s+r, 16-r, score); + SFont_Write(surf_screen, g_font, XSIZE-250, 0, s); } void