X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Ftape.c;h=1aaabf55505f14819adaeb200b8344500ec3d9d8;hb=9cb181e05e485435ef48586dd4f2811ba1e672b3;hp=a7bd35ee2f94196452216d1adcd08749b5119e5e;hpb=ac86d841daa4ecafff3128110a1db109e03fb355;p=rocksndiamonds.git diff --git a/src/tape.c b/src/tape.c index a7bd35ee..1aaabf55 100644 --- a/src/tape.c +++ b/src/tape.c @@ -919,11 +919,14 @@ void TapeQuickSave() TapeHaltRecording(); /* prepare tape for saving on-the-fly */ if (TAPE_IS_EMPTY(tape)) + { Request("No tape that can be saved !", REQ_CONFIRM); - else - SaveTape(tape.level_nr); - SaveEngineSnapshot(); + return; + } + + if (SaveTapeChecked(tape.level_nr)) + SaveEngineSnapshot(); } void TapeQuickLoad() @@ -948,12 +951,14 @@ void TapeQuickLoad() if (game_status != GAME_MODE_PLAYING && game_status != GAME_MODE_MAIN) return; - if (1 && CheckEngineSnapshot()) + if (CheckEngineSnapshot()) { TapeStartGamePlaying(); LoadEngineSnapshot(); + DrawCompleteVideoDisplay(); + tape.playing = TRUE; tape.pausing = TRUE; @@ -1234,6 +1239,7 @@ void CreateTapeButtons() GDI_STATE, GD_BUTTON_UNPRESSED, GDI_DESIGN_UNPRESSED, gd_bitmap, gd_x1, gd_y, GDI_DESIGN_PRESSED, gd_bitmap, gd_x2, gd_y, + GDI_DIRECT_DRAW, FALSE, GDI_EVENT_MASK, GD_EVENT_RELEASED, GDI_CALLBACK_ACTION, HandleTapeButtons, GDI_END); @@ -1296,18 +1302,22 @@ static void HandleTapeButtons(struct GadgetInfo *gi) { case TAPE_CTRL_ID_EJECT: TapeStop(); + if (TAPE_IS_EMPTY(tape)) { LoadTape(level_nr); + if (TAPE_IS_EMPTY(tape)) Request("No tape for this level !", REQ_CONFIRM); } else { if (tape.changed) - SaveTape(tape.level_nr); + SaveTapeChecked(tape.level_nr); + TapeErase(); } + DrawCompleteVideoDisplay(); break; @@ -1325,6 +1335,7 @@ static void HandleTapeButtons(struct GadgetInfo *gi) } else if (tape.recording) TapeSingleStep(); + break; case TAPE_CTRL_ID_STOP: