X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Ftape.c;h=6d90ca96e093b9a3b9c5cfd3a8edcd9a2f2ddc76;hp=8087860ba5b33d4a7fd2f7ec4396a3f6a7910e06;hb=65dcb102effc9b2dd3b45df14fc35b3f224b79c6;hpb=33dadce98a8fe9edfacf51d4e33e7b608883f855 diff --git a/src/tape.c b/src/tape.c index 8087860b..6d90ca96 100644 --- a/src/tape.c +++ b/src/tape.c @@ -889,15 +889,16 @@ unsigned int GetTapeLengthSeconds() return (GetTapeLengthFrames() * GAME_FRAME_DELAY / 1000); } -static void TapeStartWarpForward() +static void TapeStartWarpForward(int mode) { - tape.fast_forward = TRUE; - tape.warp_forward = TRUE; - tape.deactivate_display = TRUE; + tape.fast_forward = (mode & AUTOPLAY_FFWD); + tape.warp_forward = (mode & AUTOPLAY_WARP); + tape.deactivate_display = (mode & AUTOPLAY_WARP_NO_DISPLAY); tape.pausing = FALSE; - TapeDeactivateDisplayOn(); + if (tape.deactivate_display) + TapeDeactivateDisplayOn(); DrawVideoDisplayCurrentState(); } @@ -1005,7 +1006,7 @@ void TapeQuickLoad() if (!TAPE_IS_EMPTY(tape)) { TapeStartGamePlaying(); - TapeStartWarpForward(); + TapeStartWarpForward(AUTOPLAY_MODE_WARP_NO_DISPLAY); tape.quick_resume = TRUE; } @@ -1135,12 +1136,7 @@ void AutoPlayTape() printf("playing tape ... "); TapeStartGamePlaying(); - - if (global.autoplay_mode == AUTOPLAY_FFWD) - tape.fast_forward = TRUE; - - if (global.autoplay_mode != AUTOPLAY_PLAY) - TapeStartWarpForward(); + TapeStartWarpForward(global.autoplay_mode); return; }