X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Ftape.c;h=41b328b240d99b30d68619e1f7f534c24eb5a27a;hb=1e196be4c0a2f1edf823b3a0e5a14a146317686e;hp=2cc0b39962eba632c9606af412956264e3a64f64;hpb=7600b7d74df219d2a0956e03cea3af49226903c2;p=rocksndiamonds.git diff --git a/src/tape.c b/src/tape.c index 2cc0b399..41b328b2 100644 --- a/src/tape.c +++ b/src/tape.c @@ -109,16 +109,20 @@ void TapeRecordDelay() void TapeTogglePause() { + unsigned long state; + if (!tape.recording && !tape.playing) return; tape.pausing = !tape.pausing; tape.fast_forward = FALSE; tape.pause_before_death = FALSE; - DrawVideoDisplay((tape.pausing ? - VIDEO_STATE_PAUSE_ON : - VIDEO_STATE_PAUSE_OFF) | VIDEO_STATE_PBEND_OFF, - 0); + + state = (tape.pausing ? VIDEO_STATE_PAUSE_ON : VIDEO_STATE_PAUSE_OFF); + if (tape.playing) + state |= VIDEO_STATE_PBEND_OFF; + + DrawVideoDisplay(state, 0); } void TapeStartPlaying() @@ -199,7 +203,7 @@ boolean TapePlayDelay() DrawVideoDisplay(VIDEO_STATE_PBEND_OFF, VIDEO_DISPLAY_LABEL_ONLY); } - if (level.time-TimeLeft > tape.length_seconds - PAUSE_SECONDS_BEFORE_DEATH) + if (TimePlayed > tape.length_seconds - PAUSE_SECONDS_BEFORE_DEATH) { TapeTogglePause(); return(FALSE);