diff options
author | Karl Kurbjun <kkurbjun@gmail.com> | 2009-08-03 01:07:58 +0000 |
---|---|---|
committer | Karl Kurbjun <kkurbjun@gmail.com> | 2009-08-03 01:07:58 +0000 |
commit | 50d3928901069d908238930b880b878f3d760dd4 (patch) | |
tree | 81babdb7ab853d60502910e04c16ae29f14a9e73 /apps/plugins/lib/highscore.c | |
parent | bbc9aebae3ec6e900abdf257a0b377a0f5b45911 (diff) | |
download | rockbox-50d3928901069d908238930b880b878f3d760dd4.tar.gz rockbox-50d3928901069d908238930b880b878f3d760dd4.zip |
Blackjack: Use standard menu and add playback menu, use pluginlib high scores.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22126 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/lib/highscore.c')
-rw-r--r-- | apps/plugins/lib/highscore.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/apps/plugins/lib/highscore.c b/apps/plugins/lib/highscore.c index 909c3a89ef..280c0c7724 100644 --- a/apps/plugins/lib/highscore.c +++ b/apps/plugins/lib/highscore.c | |||
@@ -120,7 +120,7 @@ bool highscore_would_update(int score, struct highscore *scores, | |||
120 | } | 120 | } |
121 | 121 | ||
122 | #ifdef HAVE_LCD_BITMAP | 122 | #ifdef HAVE_LCD_BITMAP |
123 | void highscore_show(int position, struct highscore *scores, int num_scores) | 123 | void highscore_show(int position, struct highscore *scores, int num_scores, bool show_level) |
124 | { | 124 | { |
125 | int i, w, h; | 125 | int i, w, h; |
126 | char str[30]; | 126 | char str[30]; |
@@ -141,7 +141,11 @@ void highscore_show(int position, struct highscore *scores, int num_scores) | |||
141 | } | 141 | } |
142 | rb->lcd_putsxy(LCD_WIDTH/2-w/2, MARGIN, "High Scores"); | 142 | rb->lcd_putsxy(LCD_WIDTH/2-w/2, MARGIN, "High Scores"); |
143 | rb->lcd_putsxy(LCD_WIDTH/4-w/4,2*h, "Score"); | 143 | rb->lcd_putsxy(LCD_WIDTH/4-w/4,2*h, "Score"); |
144 | rb->lcd_putsxy(LCD_WIDTH*3/4-w/4,2*h, "Level"); | 144 | |
145 | /* Decide whether to display the level column or not */ | ||
146 | if(show_level) { | ||
147 | rb->lcd_putsxy(LCD_WIDTH*3/4-w/4,2*h, "Level"); | ||
148 | } | ||
145 | 149 | ||
146 | for (i = 0; i<num_scores; i++) | 150 | for (i = 0; i<num_scores; i++) |
147 | { | 151 | { |
@@ -154,8 +158,13 @@ void highscore_show(int position, struct highscore *scores, int num_scores) | |||
154 | rb->lcd_putsxy (MARGIN,3*h + h*i, str); | 158 | rb->lcd_putsxy (MARGIN,3*h + h*i, str); |
155 | rb->snprintf (str, sizeof (str), "%d", scores[i].score); | 159 | rb->snprintf (str, sizeof (str), "%d", scores[i].score); |
156 | rb->lcd_putsxy (LCD_WIDTH/4-w/4,3*h + h*i, str); | 160 | rb->lcd_putsxy (LCD_WIDTH/4-w/4,3*h + h*i, str); |
157 | rb->snprintf (str, sizeof (str), "%d", scores[i].level); | 161 | |
158 | rb->lcd_putsxy (LCD_WIDTH*3/4-w/4,3*h + h*i, str); | 162 | /* Decide whether to display the level column or not */ |
163 | if(show_level) { | ||
164 | rb->snprintf (str, sizeof (str), "%d", scores[i].level); | ||
165 | rb->lcd_putsxy (LCD_WIDTH*3/4-w/4,3*h + h*i, str); | ||
166 | } | ||
167 | |||
159 | if(i == position) { | 168 | if(i == position) { |
160 | #ifdef HAVE_LCD_COLOR | 169 | #ifdef HAVE_LCD_COLOR |
161 | rb->lcd_set_foreground(LCD_WHITE); | 170 | rb->lcd_set_foreground(LCD_WHITE); |