add highscore management

This commit is contained in:
Milang 2020-01-19 20:17:14 +01:00
parent 5218b9e6b7
commit e0b49c8bc4
6 changed files with 469 additions and 462 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@ -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());
}
}