1
0
Fork 0
forked from len0rd/rockbox

plugin: implement highscore_show for player and use it in rockblox.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24861 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Teruaki Kawashima 2010-02-22 13:45:24 +00:00
parent adf5bbdc46
commit c1bb06c3af
3 changed files with 49 additions and 18 deletions

View file

@ -1282,11 +1282,7 @@ static int rockblox_menu(void)
return 1;
break;
case 3:
#ifdef HAVE_LCD_BITMAP
highscore_show(MAX_HIGH_SCORES, highest, MAX_HIGH_SCORES, true);
#else
rb->splashf(2*HZ, "High Score: %d", highest[0].score);
#endif
break;
case 4:
if (playback_control(NULL))
@ -1511,17 +1507,14 @@ enum plugin_status plugin_start (const void *parameter)
resume_file = resume;
while(!rockblox_loop()) {
if(!resume) {
int position = highscore_update(rockblox_status.score, rockblox_status.level, "", highest,
MAX_HIGH_SCORES);
int position = highscore_update(rockblox_status.score,
rockblox_status.level, "",
highest, MAX_HIGH_SCORES);
if (position == 0) {
rb->splash(HZ*2, "New High Score");
}
if (position != -1) {
#ifdef HAVE_LCD_BITMAP
highscore_show(position, highest, MAX_HIGH_SCORES, true);
#else
rb->splashf(2*HZ, "High Score: %d", highest[position].score);
#endif
}
}
}