add highscore management
This commit is contained in:
parent
5218b9e6b7
commit
e0b49c8bc4
BIN
SuperCbr.g1a
BIN
SuperCbr.g1a
Binary file not shown.
Binary file not shown.
Binary file not shown.
922
build-fx/map
922
build-fx/map
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
@ -53,6 +53,12 @@ static void levelchanger(int w)
|
|||
dtext(99-6*i, 53, str, C_BLACK, C_WHITE);
|
||||
}
|
||||
|
||||
sprintf(str, "%d", get_highscore(w,choice));
|
||||
int i=0;
|
||||
while (str[i])
|
||||
i++;
|
||||
dtext(99-6*i, 45, str, C_BLACK, C_WHITE);
|
||||
|
||||
dupdate();
|
||||
|
||||
|
||||
|
@ -92,6 +98,7 @@ static void levelchanger(int w)
|
|||
break;
|
||||
}
|
||||
}
|
||||
set_highscore(w, choice, get_score());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -101,9 +108,9 @@ static void levelchanger(int w)
|
|||
int s=play_level(w, choice);
|
||||
if (s==1)
|
||||
{
|
||||
|
||||
set_best_time(w, choice, get_time_spent());
|
||||
}
|
||||
set_highscore(w, choice, get_score());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue