X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Ftape.c;h=6b1b011cca8a628b6699e38d54108ebfc14f40b3;hb=784245c2e4dd32b84cff6c6044380c7801cb5513;hp=fb705a9f9204bfea3fa3aaed7a6b27b5c9428cdf;hpb=1442f47fb19411923cba74dd8a7c17fef1fe5e0d;p=rocksndiamonds.git diff --git a/src/tape.c b/src/tape.c index fb705a9f..6b1b011c 100644 --- a/src/tape.c +++ b/src/tape.c @@ -1152,13 +1152,19 @@ void TapeQuickSave() void TapeQuickLoad() { + char *filename = getTapeFilename(level_nr); + + if (!fileExists(filename)) + { + Request("No tape for this level !", REQ_CONFIRM); + + return; + } + if (tape.recording && !Request("Stop recording and load tape ?", REQ_ASK | REQ_STAY_CLOSED)) { - BlitBitmap(bitmap_db_door, bitmap_db_door, - DOOR_GFX_PAGEX2, DOOR_GFX_PAGEY1, DXSIZE, DYSIZE, - DOOR_GFX_PAGEX1, DOOR_GFX_PAGEY1); - OpenDoor(DOOR_OPEN_1); + OpenDoor(DOOR_OPEN_1 | DOOR_COPY_BACK); return; } @@ -1176,8 +1182,12 @@ void TapeQuickLoad() tape.quick_resume = TRUE; } - else - Request("No tape for this level !", REQ_CONFIRM); + else /* this should not happen (basically checked above) */ + { + int reopen_door = (game_status == GAME_MODE_PLAYING ? REQ_REOPEN : 0); + + Request("No tape for this level !", REQ_CONFIRM | reopen_door); + } } } @@ -1304,6 +1314,7 @@ void AutoPlayTape() printf("LEVELDIR '%s', SOLVED %d/%d (%d%%)", autoplay_leveldir->identifier, num_levels_solved, num_levels_played, (num_levels_played ? num_levels_solved * 100 / num_levels_played :0)); + if (num_levels_played != num_levels_solved) { printf(", FAILED:"); @@ -1311,6 +1322,7 @@ void AutoPlayTape() if (levels_failed[i]) printf(" %03d", i); } + printf("\n"); printf_line("=", 79);