diff options
Diffstat (limited to 'apps/plugins/brickmania.c')
-rw-r--r-- | apps/plugins/brickmania.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/apps/plugins/brickmania.c b/apps/plugins/brickmania.c index 82a883c7a4..0eebd3f65c 100644 --- a/apps/plugins/brickmania.c +++ b/apps/plugins/brickmania.c | |||
@@ -619,6 +619,7 @@ int difficulty = NORMAL; | |||
619 | int pad_width; | 619 | int pad_width; |
620 | int num_count; | 620 | int num_count; |
621 | bool resume = false; | 621 | bool resume = false; |
622 | bool resume_file = false; | ||
622 | 623 | ||
623 | typedef struct cube { | 624 | typedef struct cube { |
624 | int powertop; | 625 | int powertop; |
@@ -751,8 +752,6 @@ static void brickmania_loadgame(void) | |||
751 | 752 | ||
752 | rb->close(fd); | 753 | rb->close(fd); |
753 | 754 | ||
754 | /* delete saved file */ | ||
755 | rb->remove(SAVE_FILE); | ||
756 | return; | 755 | return; |
757 | } | 756 | } |
758 | 757 | ||
@@ -922,6 +921,8 @@ static int brickmania_menu(void) | |||
922 | case 0: | 921 | case 0: |
923 | if(game_state!=ST_READY) | 922 | if(game_state!=ST_READY) |
924 | game_state = ST_PAUSE; | 923 | game_state = ST_PAUSE; |
924 | if(resume_file) | ||
925 | rb->remove(SAVE_FILE); | ||
925 | return 0; | 926 | return 0; |
926 | case 1: | 927 | case 1: |
927 | score=0; | 928 | score=0; |
@@ -982,6 +983,7 @@ static int brickmania_game_loop(void) | |||
982 | return 1; | 983 | return 1; |
983 | } | 984 | } |
984 | resume = false; | 985 | resume = false; |
986 | resume_file = false; | ||
985 | 987 | ||
986 | while(true) { | 988 | while(true) { |
987 | /* Convert CYCLETIME (in ms) to HZ */ | 989 | /* Convert CYCLETIME (in ms) to HZ */ |
@@ -1778,6 +1780,7 @@ enum plugin_status plugin_start(const void* parameter) | |||
1778 | /* now go ahead and have fun! */ | 1780 | /* now go ahead and have fun! */ |
1779 | rb->srand( *rb->current_tick ); | 1781 | rb->srand( *rb->current_tick ); |
1780 | brickmania_loadgame(); | 1782 | brickmania_loadgame(); |
1783 | resume_file = resume; | ||
1781 | while(brickmania_game_loop() == 0) { | 1784 | while(brickmania_game_loop() == 0) { |
1782 | if(!resume) { | 1785 | if(!resume) { |
1783 | int position = highscore_update(score, level+1, "", highest, NUM_SCORES); | 1786 | int position = highscore_update(score, level+1, "", highest, NUM_SCORES); |