summaryrefslogtreecommitdiff
path: root/apps/plugins/jewels.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/jewels.c')
-rw-r--r--apps/plugins/jewels.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/apps/plugins/jewels.c b/apps/plugins/jewels.c
index f049fdca5c..a55b1b2dae 100644
--- a/apps/plugins/jewels.c
+++ b/apps/plugins/jewels.c
@@ -420,6 +420,7 @@ struct puzzle_level puzzle_levels[NUM_PUZZLE_LEVELS] = {
420#define HIGH_SCORE PLUGIN_GAMES_DIR "/jewels.score" 420#define HIGH_SCORE PLUGIN_GAMES_DIR "/jewels.score"
421struct highscore highest[NUM_SCORES]; 421struct highscore highest[NUM_SCORES];
422 422
423static bool resume_file = false;
423 424
424/***************************************************************************** 425/*****************************************************************************
425* jewels_setcolors() set the foreground and background colors. 426* jewels_setcolors() set the foreground and background colors.
@@ -458,8 +459,6 @@ static bool jewels_loadgame(struct game_context* bj)
458 459
459 rb->close(fd); 460 rb->close(fd);
460 461
461 /* delete saved file */
462 rb->remove(SAVE_FILE);
463 return loaded; 462 return loaded;
464} 463}
465 464
@@ -1361,6 +1360,8 @@ static int jewels_game_menu(struct game_context* bj, bool ingame)
1361 switch (rb->do_menu(&main_menu, &choice, NULL, false)) { 1360 switch (rb->do_menu(&main_menu, &choice, NULL, false)) {
1362 case 0: 1361 case 0:
1363 jewels_setcolors(); 1362 jewels_setcolors();
1363 if(resume_file)
1364 rb->remove(SAVE_FILE);
1364 return 0; 1365 return 0;
1365 case 1: 1366 case 1:
1366 jewels_init(bj); 1367 jewels_init(bj);
@@ -1402,9 +1403,11 @@ static int jewels_main(struct game_context* bj) {
1402 int x=0, y=0; 1403 int x=0, y=0;
1403 1404
1404 bool loaded = jewels_loadgame(bj); 1405 bool loaded = jewels_loadgame(bj);
1406 resume_file = loaded;
1405 if (jewels_game_menu(bj, loaded)!=0) 1407 if (jewels_game_menu(bj, loaded)!=0)
1406 return 0; 1408 return 0;
1407 1409
1410 resume_file = false;
1408 while(true) { 1411 while(true) {
1409 no_movesavail = false; 1412 no_movesavail = false;
1410 1413