diff options
Diffstat (limited to 'apps/plugins/bubbles.c')
-rw-r--r-- | apps/plugins/bubbles.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/apps/plugins/bubbles.c b/apps/plugins/bubbles.c index da927de01c..3b28ced87d 100644 --- a/apps/plugins/bubbles.c +++ b/apps/plugins/bubbles.c | |||
@@ -1274,6 +1274,7 @@ struct highscore highscores[NUM_SCORES]; | |||
1274 | 1274 | ||
1275 | /* used to denote available resume info */ | 1275 | /* used to denote available resume info */ |
1276 | static bool resume = false; | 1276 | static bool resume = false; |
1277 | static bool resume_file = false; | ||
1277 | static unsigned int highlevel = 0; /* the highest level beaten */ | 1278 | static unsigned int highlevel = 0; /* the highest level beaten */ |
1278 | static unsigned int last_highlevel = 0; | 1279 | static unsigned int last_highlevel = 0; |
1279 | 1280 | ||
@@ -2393,14 +2394,15 @@ static int bubbles_menu(struct game_context* bb) { | |||
2393 | rb->splash(HZ/2, "Nothing to resume"); | 2394 | rb->splash(HZ/2, "Nothing to resume"); |
2394 | else | 2395 | else |
2395 | startgame = true; | 2396 | startgame = true; |
2396 | 2397 | if(resume_file) | |
2397 | if(rb->file_exists(SAVE_FILE)) | 2398 | rb->remove(SAVE_FILE); |
2398 | rb->remove(SAVE_FILE); | 2399 | resume_file = false; |
2399 | break; | 2400 | break; |
2400 | case 1: /* new game */ | 2401 | case 1: /* new game */ |
2401 | bb->level = startlevel; | 2402 | bb->level = startlevel; |
2402 | startgame = true; | 2403 | startgame = true; |
2403 | resume = false; | 2404 | resume = false; |
2405 | resume_file = false; | ||
2404 | break; | 2406 | break; |
2405 | case 2: /* choose level */ | 2407 | case 2: /* choose level */ |
2406 | startlevel++; | 2408 | startlevel++; |
@@ -2497,6 +2499,7 @@ enum plugin_status plugin_start(const void* parameter) { | |||
2497 | 2499 | ||
2498 | /* load files */ | 2500 | /* load files */ |
2499 | resume = bubbles_loadgame(&bb); | 2501 | resume = bubbles_loadgame(&bb); |
2502 | resume_file = resume; | ||
2500 | bubbles_loaddata(); | 2503 | bubbles_loaddata(); |
2501 | highscore_load(SCORE_FILE, highscores, NUM_SCORES); | 2504 | highscore_load(SCORE_FILE, highscores, NUM_SCORES); |
2502 | rb->lcd_clear_display(); | 2505 | rb->lcd_clear_display(); |