X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Ftape.c;h=07f8f82234b23f2a3008e2475ce03a49e058cb25;hp=ded004fc2a16eb33227a455383fa9f47aa754dee;hb=7ecbe0a730dc19d8a46ffe6bbcb052f20d0c4152;hpb=ca2a6ad31f7d41df73e3a45800eb92f7924c446c diff --git a/src/tape.c b/src/tape.c index ded004fc..07f8f822 100644 --- a/src/tape.c +++ b/src/tape.c @@ -289,6 +289,8 @@ static void DrawVideoDisplay_Graphics(unsigned int state, unsigned int value) if (gd_bitmap != NULL) BlitBitmap(gd_bitmap, drawto, gd_x, gd_y, gfx->width, gfx->height, VX + pos->x, VY + pos->y); + + redraw_mask |= REDRAW_DOOR_2; } } } @@ -431,8 +433,6 @@ void DrawVideoDisplay(unsigned int state, unsigned int value) { DrawVideoDisplay_Graphics(state, value); DrawVideoDisplay_DateTime(state, value); - - redraw_mask |= REDRAW_DOOR_2; } void DrawCompleteVideoDisplay() @@ -493,7 +493,7 @@ void TapeDeactivateDisplayOff(boolean redraw_display) if (redraw_display) { - RedrawPlayfield(TRUE, 0,0,0,0); + RedrawPlayfield(); DrawGameDoorValues(); } } @@ -739,15 +739,23 @@ void TapeTogglePause(boolean toggle_manual) TapeAppendRecording(); - if (!CheckEngineSnapshot()) + if (!CheckEngineSnapshotSingle()) SaveEngineSnapshotSingle(); + + // restart step/move snapshots after quick loading tape + SaveEngineSnapshotToListInitial(); } } - if (tape.pausing) - MapUndoRedoButtons(); - else if (!tape.single_step) - MapStopPlayButtons(); + if (setup.show_snapshot_buttons && + game_status == GAME_MODE_PLAYING && + CheckEngineSnapshotList()) + { + if (tape.pausing) + MapUndoRedoButtons(); + else if (!tape.single_step) + UnmapUndoRedoButtons(); + } } void TapeStartPlaying() @@ -1032,7 +1040,7 @@ void TapeQuickLoad() if (game_status != GAME_MODE_PLAYING && game_status != GAME_MODE_MAIN) return; - if (CheckEngineSnapshot()) + if (CheckEngineSnapshotSingle()) { TapeStartGamePlaying(); @@ -1046,6 +1054,9 @@ void TapeQuickLoad() TapeStopWarpForward(); TapeAppendRecording(); + // restart step/move snapshots after quick loading tape + SaveEngineSnapshotToListInitial(); + if (FrameCounter > 0) return; } @@ -1114,7 +1125,9 @@ void AutoPlayTape() else { DrawCompleteVideoDisplay(); + audio.sound_enabled = FALSE; + setup.engine_snapshot_mode = getStringCopy(STR_SNAPSHOT_MODE_OFF); autoplay_leveldir = getTreeInfoFromIdentifier(leveldir_first, global.autoplay_leveldir); @@ -1186,7 +1199,12 @@ void AutoPlayTape() printf("playing tape ... "); TapeStartGamePlaying(); - TapeStartWarpForward(); + + if (global.autoplay_mode == AUTOPLAY_FFWD) + tape.fast_forward = TRUE; + + if (global.autoplay_mode != AUTOPLAY_PLAY) + TapeStartWarpForward(); return; } @@ -1403,6 +1421,13 @@ static void HandleTapeButtonsExt(int id) break; case TAPE_CTRL_ID_PLAY: + if (tape.recording && tape.pausing) /* PAUSE -> RECORD */ + { + // ("TAPE_IS_EMPTY(tape)" is TRUE here -- probably fix this) + + TapeTogglePause(TAPE_TOGGLE_MANUAL); + } + if (TAPE_IS_EMPTY(tape)) break;