X-Git-Url: https://jasonwoof.com/gitweb/?p=vor.git;a=blobdiff_plain;f=score.c;h=8c5bc59fd96dcb3b7a6cd84741e2df534739e404;hp=b21345c6ef6152687a59d330d1d18f48e5778033;hb=98d1a3e9455c7c64c4b219c9022d0e1efb187cf3;hpb=7f40ee1193e47c59f7297d9361314c731832f7b8 diff --git a/score.c b/score.c index b21345c..8c5bc59 100644 --- a/score.c +++ b/score.c @@ -25,32 +25,33 @@ #include "font.h" #include "common.h" -#include "config.h" +#include "vorconfig.h" #include "file.h" #include "globals.h" #include "score.h" // High score table +// below are the defaults (when there's no high score file) in miliseconds struct highscore g_scores[2][N_SCORES] = { { - {1*60*1000,"-"}, - {45*1000,"-"}, - {30*1000,"-"}, - {20*1000,"-"}, - {10*1000,"-"}, - {7*1000,"-"}, - {5*1000,"-"}, - {3*1000,"-"} + {120000,"-"}, + {105000,"-"}, + { 90000,"-"}, + { 75000,"-"}, + { 60000,"-"}, + { 50000,"-"}, + { 40000,"-"}, + { 30000,"-"} }, { - {1*60*1000,"-"}, - {45*1000,"-"}, - {30*1000,"-"}, - {20*1000,"-"}, - {10*1000,"-"}, - {7*1000,"-"}, - {5*1000,"-"}, - {3*1000,"-"} + {120000,"-"}, + {105000,"-"}, + { 90000,"-"}, + { 75000,"-"}, + { 60000,"-"}, + { 50000,"-"}, + { 40000,"-"}, + { 30000,"-"} } }; @@ -63,15 +64,21 @@ void read_high_score_table() { FILE *f; - int i, j; + int i, j, ret; f = open_score_file("r"); if(f) { // If the file exists, read from it for(j=0; j<2; j++) { - fscanf(f, titles[j]); + ret = fseek(f, strlen(titles[j]), SEEK_CUR); + if (ret != 0) { + break; + } for(i = 0; i