diff options
author | Rafaël Carré <rafael.carre@gmail.com> | 2010-08-28 21:46:45 +0000 |
---|---|---|
committer | Rafaël Carré <rafael.carre@gmail.com> | 2010-08-28 21:46:45 +0000 |
commit | ab9fd1840b8025336081bd72fb9dbaea7b9909dd (patch) | |
tree | 4c410bffcf1a9de2ce55a59bef45e3ecfa183a62 /apps/plugins/lib/highscore.c | |
parent | 8418a2c94a97da1d6f42f21dc348aadd1e177d77 (diff) | |
download | rockbox-ab9fd1840b8025336081bd72fb9dbaea7b9909dd.tar.gz rockbox-ab9fd1840b8025336081bd72fb9dbaea7b9909dd.zip |
plugins: use lcd_putsf/lcd_putsxyf
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27926 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/lib/highscore.c')
-rw-r--r-- | apps/plugins/lib/highscore.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/apps/plugins/lib/highscore.c b/apps/plugins/lib/highscore.c index 185930202a..ff7a166222 100644 --- a/apps/plugins/lib/highscore.c +++ b/apps/plugins/lib/highscore.c | |||
@@ -125,7 +125,6 @@ void highscore_show(int position, struct highscore *scores, int num_scores, | |||
125 | bool show_level) | 125 | bool show_level) |
126 | { | 126 | { |
127 | int i, w, h; | 127 | int i, w, h; |
128 | char str[30]; | ||
129 | #ifdef HAVE_LCD_COLOR | 128 | #ifdef HAVE_LCD_COLOR |
130 | unsigned bgcolor = rb->lcd_get_background(); | 129 | unsigned bgcolor = rb->lcd_get_background(); |
131 | unsigned fgcolor = rb->lcd_get_foreground(); | 130 | unsigned fgcolor = rb->lcd_get_foreground(); |
@@ -155,14 +154,11 @@ void highscore_show(int position, struct highscore *scores, int num_scores, | |||
155 | rb->lcd_set_foreground(LCD_RGBPACK(245,0,0)); | 154 | rb->lcd_set_foreground(LCD_RGBPACK(245,0,0)); |
156 | } | 155 | } |
157 | #endif | 156 | #endif |
158 | rb->snprintf (str, sizeof (str), "%d)", i+1); | 157 | rb->lcd_putsxyf (MARGIN,3*h + h*i, "%d)", i+1); |
159 | rb->lcd_putsxy (MARGIN,3*h + h*i, str); | 158 | rb->lcd_putsxyf (LCD_WIDTH/4-w/4,3*h + h*i, "%d", scores[i].score); |
160 | rb->snprintf (str, sizeof (str), "%d", scores[i].score); | ||
161 | rb->lcd_putsxy (LCD_WIDTH/4-w/4,3*h + h*i, str); | ||
162 | 159 | ||
163 | if(show_level) { | 160 | if(show_level) { |
164 | rb->snprintf (str, sizeof (str), "%d", scores[i].level); | 161 | rb->lcd_putsxyf (LCD_WIDTH*3/4-w/4,3*h + h*i, "%d", scores[i].level); |
165 | rb->lcd_putsxy (LCD_WIDTH*3/4-w/4,3*h + h*i, str); | ||
166 | } | 162 | } |
167 | 163 | ||
168 | if(i == position) { | 164 | if(i == position) { |