changed tape recorder logic to separate speed and 'pause before end'
authorHolger Schemel <info@artsoft.org>
Thu, 2 Jun 2016 06:49:00 +0000 (08:49 +0200)
committerHolger Schemel <info@artsoft.org>
Thu, 2 Jun 2016 06:49:00 +0000 (08:49 +0200)
src/tape.c

index 0c13baa662c32516b02d2f677a34a3a30928f7aa..ff6d10f250c8e48d6e440b0bbbb3eb9690944f9e 100644 (file)
@@ -1306,18 +1306,9 @@ static void HandleTapeButtonsExt(int id)
     case TAPE_CTRL_ID_EXTRA:
       if (tape.playing)
       {
-       if (!tape.warp_forward)                 /* PLAY -> WARP FORWARD PLAY */
-       {
-         TapeStartWarpForward();
-       }
-       else if (tape.pausing)                  /* PAUSE -> WARP FORWARD PLAY */
-       {
-         TapeTogglePause(TAPE_TOGGLE_MANUAL);
-       }
-       else                                    /* WARP FORWARD PLAY -> PLAY */
-       {
-         TapeStopWarpForward();
-       }
+       tape.pause_before_end = !tape.pause_before_end;
+
+       DrawVideoDisplayPlayState();
       }
       else if (tape.recording)
        TapeSingleStep();
@@ -1371,36 +1362,30 @@ static void HandleTapeButtonsExt(int id)
 
          TapeTogglePause(TAPE_TOGGLE_MANUAL);
        }
-       else if (tape.warp_forward &&
-                !tape.fast_forward)            /* WARP FORWARD PLAY -> PLAY */
+       else if (!tape.fast_forward)            /* PLAY -> FFWD */
        {
-         TapeStopWarpForward();
+         tape.fast_forward = TRUE;
        }
-       else if (!tape.fast_forward)            /* PLAY -> FAST FORWARD PLAY */
+       else if (!tape.warp_forward)            /* FFWD -> WARP */
        {
-         tape.fast_forward = TRUE;
-
-         DrawVideoDisplay(VIDEO_STATE_FFWD_ON, 0);
+         tape.warp_forward = TRUE;
        }
-       else if (!tape.pause_before_end)        /* FFWD PLAY -> AUTO PAUSE */
+       else if (!tape.deactivate_display)      /* WARP -> WARP BLIND */
        {
-         tape.pause_before_end = TRUE;
+         tape.deactivate_display = TRUE;
 
-         DrawVideoDisplay(VIDEO_STATE_FFWD_OFF | VIDEO_STATE_PBEND_ON, 0);
-
-         if (tape.warp_forward)
-           DrawVideoDisplaySymbol(VIDEO_STATE_WARP2_ON);
+         TapeDeactivateDisplayOn();
        }
-       else                                    /* AUTO PAUSE -> NORMAL PLAY */
+       else                                    /* WARP BLIND -> PLAY */
        {
-         if (tape.warp_forward)
-           TapeStopWarpForward();
-
          tape.fast_forward = FALSE;
-         tape.pause_before_end = FALSE;
+         tape.warp_forward = FALSE;
+         tape.deactivate_display = FALSE;
 
-         DrawVideoDisplay(VIDEO_STATE_PBEND_OFF | VIDEO_STATE_PLAY_ON, 0);
+         TapeDeactivateDisplayOff(game_status == GAME_MODE_PLAYING);
        }
+
+       DrawVideoDisplayPlayState();
       }
       break;