rnd-19990107-1
[rocksndiamonds.git] / src / tape.c
index 2cc0b39962eba632c9606af412956264e3a64f64..41b328b240d99b30d68619e1f7f534c24eb5a27a 100644 (file)
@@ -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);