diff options
| author | Barry Wardell <rockbox@barrywardell.net> | 2006-10-06 16:20:57 +0000 |
|---|---|---|
| committer | Barry Wardell <rockbox@barrywardell.net> | 2006-10-06 16:20:57 +0000 |
| commit | 53c3eebcdb3078fe23c902da19753322bb1cc63e (patch) | |
| tree | 1eb7735abb5db7c2aa361821fbdd72fbc3b99b82 /apps/plugins/star.c | |
| parent | cac1b448506485aff1fed2c4d814ab42f19a7785 (diff) | |
| download | rockbox-53c3eebcdb3078fe23c902da19753322bb1cc63e.zip rockbox-53c3eebcdb3078fe23c902da19753322bb1cc63e.tar.gz rockbox-53c3eebcdb3078fe23c902da19753322bb1cc63e.tar.bz2 rockbox-53c3eebcdb3078fe23c902da19753322bb1cc63e.tar.xz | |
Fix FS#6126 - bug in Star where non-existant level 20 was accessable after you finish the game. Also fix spelling error in Star mentioned in the same bug report.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11139 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/star.c')
| -rw-r--r-- | apps/plugins/star.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/apps/plugins/star.c b/apps/plugins/star.c index 956b0de..ce18f0e 100644 --- a/apps/plugins/star.c +++ b/apps/plugins/star.c @@ -873,8 +873,12 @@ static int star_run_game(void) if (current_level == STAR_LEVEL_COUNT) { rb->lcd_clear_display(); - star_display_text("Congratulation !", true); + star_display_text("Congratulations!", true); rb->lcd_update(); + + /* There is no such level as STAR_LEVEL_COUNT so it can't be the + * current_level */ + current_level--; return 1; } star_load_level(current_level); @@ -895,8 +899,9 @@ static int star_choose_level(void) while (true) { rb->lcd_clear_display(); + /* levels are numbered 0 to (STAR_LEVEL_COUNT-1) */ rb->snprintf(str_info, sizeof(str_info), "Level:%02d / %02d", - level,STAR_LEVEL_COUNT); + level,(STAR_LEVEL_COUNT-1)); rb->lcd_putsxy(0, 0, str_info); rb->lcd_update(); key = rb->button_get(true); |