From 658026e6267277b27d297c481728f74d160a8481 Mon Sep 17 00:00:00 2001 From: Solomon Peachy Date: Fri, 17 Jul 2020 10:31:31 -0400 Subject: [4/4] Remove HAVE_LCD_BITMAP, as it's now the only choice. Note: I left behind lcd_bitmap in features.txt, because removing it would require considerable work in the manual and the translations. Change-Id: Ia8ca7761f610d9332a0d22a7d189775fb15ec88a --- apps/plugins/lib/highscore.c | 35 ----------------------------------- 1 file changed, 35 deletions(-) (limited to 'apps/plugins/lib/highscore.c') diff --git a/apps/plugins/lib/highscore.c b/apps/plugins/lib/highscore.c index ff7a166222..3aae955bfc 100644 --- a/apps/plugins/lib/highscore.c +++ b/apps/plugins/lib/highscore.c @@ -119,7 +119,6 @@ bool highscore_would_update(int score, struct highscore *scores, return (num_scores > 0) && (score > scores[num_scores-1].score); } -#ifdef HAVE_LCD_BITMAP #define MARGIN 5 void highscore_show(int position, struct highscore *scores, int num_scores, bool show_level) @@ -179,37 +178,3 @@ void highscore_show(int position, struct highscore *scores, int num_scores, rb->lcd_set_foreground(fgcolor); #endif } -#else -struct scoreinfo { - struct highscore *scores; - int position; - bool show_level; -}; -static const char* get_score(int selected, void * data, - char * buffer, size_t buffer_len) -{ - struct scoreinfo *scoreinfo = (struct scoreinfo *) data; - int len; - len = rb->snprintf(buffer, buffer_len, "%c%d) %4d", - (scoreinfo->position == selected?'*':' '), - selected+1, scoreinfo->scores[selected].score); - - if (scoreinfo->show_level) - rb->snprintf(buffer + len, buffer_len - len, " %d", - scoreinfo->scores[selected].level); - return buffer; -} - -void highscore_show(int position, struct highscore *scores, int num_scores, - bool show_level) -{ - struct simplelist_info info; - struct scoreinfo scoreinfo = {scores, position, show_level}; - rb->simplelist_info_init(&info, "High Scores", num_scores, &scoreinfo); - if (position >= 0) - info.selection = position; - info.hide_selection = true; - info.get_name = get_score; - rb->simplelist_show_list(&info); -} -#endif /* HAVE_LCD_BITMAP */ -- cgit v1.2.3