summaryrefslogtreecommitdiff
path: root/apps/plugins/rockblox.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/rockblox.c')
-rw-r--r--apps/plugins/rockblox.c25
1 files changed, 7 insertions, 18 deletions
diff --git a/apps/plugins/rockblox.c b/apps/plugins/rockblox.c
index 90df401ef9..44d637d8fa 100644
--- a/apps/plugins/rockblox.c
+++ b/apps/plugins/rockblox.c
@@ -810,25 +810,18 @@ static void init_board (void)
810/* show the score, level and lines */ 810/* show the score, level and lines */
811static void show_details (void) 811static void show_details (void)
812{ 812{
813 char str[25]; /* for strings */
814
815#ifdef HAVE_LCD_BITMAP 813#ifdef HAVE_LCD_BITMAP
816#if LCD_DEPTH >= 2 814#if LCD_DEPTH >= 2
817 rb->lcd_set_foreground (LCD_BLACK); 815 rb->lcd_set_foreground (LCD_BLACK);
818 rb->lcd_set_background (LCD_WHITE); 816 rb->lcd_set_background (LCD_WHITE);
819#endif 817#endif
820 rb->snprintf (str, sizeof (str), "%d", rockblox_status.score); 818 rb->lcd_putsxyf (LABEL_X, SCORE_Y, "%d", rockblox_status.score);
821 rb->lcd_putsxy (LABEL_X, SCORE_Y, str); 819 rb->lcd_putsxyf (LEVEL_X, LEVEL_Y, "%d", rockblox_status.level);
822 rb->snprintf (str, sizeof (str), "%d", rockblox_status.level); 820 rb->lcd_putsxyf (LINES_X, LINES_Y, "%d", rockblox_status.lines);
823 rb->lcd_putsxy (LEVEL_X, LEVEL_Y, str);
824 rb->snprintf (str, sizeof (str), "%d", rockblox_status.lines);
825 rb->lcd_putsxy (LINES_X, LINES_Y, str);
826#else /* HAVE_LCD_CHARCELLS */ 821#else /* HAVE_LCD_CHARCELLS */
827 rb->snprintf (str, sizeof (str), "L%d/%d", rockblox_status.level, 822 rb->lcd_putsf (5, 0, "L%d/%d", rockblox_status.level,
828 rockblox_status.lines); 823 rockblox_status.lines);
829 rb->lcd_puts (5, 0, str); 824 rb->lcd_putsf (5, 1, "S%d", rockblox_status.score);
830 rb->snprintf (str, sizeof (str), "S%d", rockblox_status.score);
831 rb->lcd_puts (5, 1, str);
832#endif 825#endif
833} 826}
834 827
@@ -836,14 +829,10 @@ static void show_details (void)
836static void show_highscores (void) 829static void show_highscores (void)
837{ 830{
838 int i; 831 int i;
839 char str[25]; /* for strings */
840 832
841 for (i = 0; i<NUM_SCORES; i++) 833 for (i = 0; i<NUM_SCORES; i++)
842 { 834 rb->lcd_putsxyf (HIGH_LABEL_X, HIGH_SCORE_Y + (10 * i),
843 rb->snprintf (str, sizeof (str), "%06d" _SPACE "L%1d", 835 "%06d" _SPACE "L%1d", highscores[i].score, highscores[i].level);
844 highscores[i].score, highscores[i].level);
845 rb->lcd_putsxy (HIGH_LABEL_X, HIGH_SCORE_Y + (10 * i), str);
846 }
847} 836}
848#endif 837#endif
849 838