diff options
Diffstat (limited to 'apps/plugins/bubbles.c')
-rw-r--r-- | apps/plugins/bubbles.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/apps/plugins/bubbles.c b/apps/plugins/bubbles.c index d0da61f446..64ab258240 100644 --- a/apps/plugins/bubbles.c +++ b/apps/plugins/bubbles.c | |||
@@ -2183,11 +2183,12 @@ static void bubbles_loadscores(struct game_context* bb) { | |||
2183 | /* highlevel and highscores */ | 2183 | /* highlevel and highscores */ |
2184 | highscore_load(SCORE_FILE, highscores, NUM_SCORES); | 2184 | highscore_load(SCORE_FILE, highscores, NUM_SCORES); |
2185 | 2185 | ||
2186 | /* level X in the high scores means one succeeded the level before (X-1) */ | ||
2186 | for (i = 0; i < NUM_SCORES; i++) | 2187 | for (i = 0; i < NUM_SCORES; i++) |
2187 | { | 2188 | { |
2188 | if (highscores[i].level > highlevel) | 2189 | if (highscores[i].level-1 > highlevel) |
2189 | { | 2190 | { |
2190 | highlevel = highscores[i].level; | 2191 | highlevel = highscores[i].level-1; |
2191 | } | 2192 | } |
2192 | } | 2193 | } |
2193 | 2194 | ||
@@ -2392,7 +2393,7 @@ static int bubbles(struct game_context* bb) { | |||
2392 | case 2: /* choose level */ | 2393 | case 2: /* choose level */ |
2393 | startlevel++; | 2394 | startlevel++; |
2394 | rb->set_int("Choose start level", "", UNIT_INT, &startlevel, | 2395 | rb->set_int("Choose start level", "", UNIT_INT, &startlevel, |
2395 | NULL, 1, 1, MAX(NUM_LEVELS,bb->highlevel+1), NULL); | 2396 | NULL, 1, 1, MIN(NUM_LEVELS,bb->highlevel+1), NULL); |
2396 | startlevel--; | 2397 | startlevel--; |
2397 | break; | 2398 | break; |
2398 | case 3: /* High scores */ | 2399 | case 3: /* High scores */ |
@@ -2483,9 +2484,7 @@ enum plugin_status plugin_start(const void* parameter) { | |||
2483 | case BB_WIN: | 2484 | case BB_WIN: |
2484 | rb->splash(HZ*2, "You Win!"); | 2485 | rb->splash(HZ*2, "You Win!"); |
2485 | /* record high level */ | 2486 | /* record high level */ |
2486 | if( NUM_LEVELS-1 > bb.highlevel) { | 2487 | bb.highlevel = NUM_LEVELS; |
2487 | bb.highlevel = NUM_LEVELS-1; | ||
2488 | } | ||
2489 | /* record high score */ | 2488 | /* record high score */ |
2490 | bubbles_recordscore(&bb); | 2489 | bubbles_recordscore(&bb); |
2491 | break; | 2490 | break; |