X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Ftape.c;h=3c39d5abc17c3c9e99ea3726d22c666ac004cc00;hb=9a7426789c04bf396df78eb915522f9e57af985e;hp=73e73a7de5616c496ac0bebfd75d35325adaf3c7;hpb=4e3bc17b6150a17a76cba2da2daa96af65bde5b9;p=rocksndiamonds.git diff --git a/src/tape.c b/src/tape.c index 73e73a7d..3c39d5ab 100644 --- a/src/tape.c +++ b/src/tape.c @@ -35,6 +35,7 @@ /* forward declaration for internal use */ static void HandleTapeButtons(struct GadgetInfo *); +static void TapeStopIndexSearch(); static struct GadgetInfo *tape_gadget[NUM_TAPE_BUTTONS]; @@ -468,13 +469,7 @@ void TapeTogglePause(boolean toggle_manual) if (tape.index_search) { - tape.index_search = FALSE; - - SetDrawDeactivationMask(REDRAW_NONE); - audio.sound_deactivated = FALSE; - - RedrawPlayfield(TRUE, 0,0,0,0); - DrawGameDoorValues(); + TapeStopIndexSearch(); if (tape.quick_resume) { @@ -524,6 +519,9 @@ void TapeStopPlaying() tape.playing = FALSE; tape.pausing = FALSE; + if (tape.index_search) + TapeStopIndexSearch(); + DrawVideoDisplay(VIDEO_STATE_PLAY_OFF, 0); MapTapeEjectButton(); } @@ -603,7 +601,7 @@ unsigned int GetTapeLength() return(tape_length * GAME_FRAME_DELAY / 1000); } -void TapeIndexSearch() +static void TapeStartIndexSearch() { tape.index_search = TRUE; @@ -616,7 +614,18 @@ void TapeIndexSearch() } } -void TapeSingleStep() +static void TapeStopIndexSearch() +{ + tape.index_search = FALSE; + + SetDrawDeactivationMask(REDRAW_NONE); + audio.sound_deactivated = FALSE; + + RedrawPlayfield(TRUE, 0,0,0,0); + DrawGameDoorValues(); +} + +static void TapeSingleStep() { if (options.network) return; @@ -654,7 +663,7 @@ void TapeQuickLoad() if (!TAPE_IS_EMPTY(tape)) { TapeStartGamePlaying(); - TapeIndexSearch(); + TapeStartIndexSearch(); tape.quick_resume = TRUE; } @@ -823,7 +832,7 @@ static void HandleTapeButtons(struct GadgetInfo *gi) case TAPE_CTRL_ID_INDEX: if (tape.playing) - TapeIndexSearch(); + TapeStartIndexSearch(); else if (tape.recording) TapeSingleStep(); break;