if (tape.single_step && toggle_manual)
tape.single_step = FALSE;
- state |= (tape.pausing ? VIDEO_STATE_PAUSE_ON : VIDEO_STATE_PAUSE_OFF);
+ state |= VIDEO_STATE_PAUSE(tape.pausing);
if (tape.pause_before_death)
- state |= (tape.pausing ? VIDEO_STATE_PBEND_OFF : VIDEO_STATE_PBEND_ON);
+ state |= VIDEO_STATE_PBEND(!tape.pausing);
else if (tape.fast_forward)
- state |= (tape.pausing ? VIDEO_STATE_FFWD_OFF : VIDEO_STATE_FFWD_ON);
+ state |= VIDEO_STATE_FFWD(!tape.pausing);
if (tape.playing)
state |= VIDEO_STATE_PLAY_ON;
else
- state |= (tape.single_step ? VIDEO_STATE_1STEP_ON : VIDEO_STATE_1STEP_OFF);
+ state |= VIDEO_STATE_1STEP(tape.single_step);
DrawVideoDisplay(state, 0);
if (update_video_display && !tape.deactivate_display)
{
if (tape.pause_before_death)
- DrawVideoDisplayLabel(update_draw_label_on ?
- VIDEO_STATE_PBEND_ON :
- VIDEO_STATE_PBEND_OFF);
+ DrawVideoDisplayLabel(VIDEO_STATE_PBEND(update_draw_label_on));
else if (tape.fast_forward)
- DrawVideoDisplayLabel(update_draw_label_on ?
- VIDEO_STATE_FFWD_ON :
- VIDEO_STATE_FFWD_OFF);
+ DrawVideoDisplayLabel(VIDEO_STATE_FFWD(update_draw_label_on));
if (tape.warp_forward)
DrawVideoDisplaySymbol(VIDEO_STATE_WARP2_ON);
static void TapeStopWarpForward()
{
- int state = (tape.pausing ? VIDEO_STATE_PAUSE_ON : VIDEO_STATE_PAUSE_OFF);
+ int state = VIDEO_STATE_PAUSE(tape.pausing);
if (tape.deactivate_display)
tape.pause_before_death = FALSE;
TapeDeactivateDisplayOff(game_status == GAME_MODE_PLAYING);
- if (tape.pause_before_death)
- state |= VIDEO_STATE_WARP_OFF | VIDEO_STATE_PBEND_ON;
- else if (tape.fast_forward)
- state |= VIDEO_STATE_WARP_OFF | VIDEO_STATE_FFWD_ON;
- else
- state |= VIDEO_STATE_WARP_OFF | VIDEO_STATE_PLAY_ON;
+ state |= VIDEO_STATE_WARP_OFF;
+ state |= (tape.pause_before_death ? VIDEO_STATE_PBEND_ON :
+ tape.fast_forward ? VIDEO_STATE_FFWD_ON :
+ VIDEO_STATE_PLAY_ON);
DrawVideoDisplay(state, 0);
}
tape.single_step = !tape.single_step;
- DrawVideoDisplay((tape.single_step ? VIDEO_STATE_1STEP_ON :
- VIDEO_STATE_1STEP_OFF), 0);
+ DrawVideoDisplay(VIDEO_STATE_1STEP(tape.single_step), 0);
}
void TapeQuickSave()
/* values for video tape control */
#define VIDEO_STATE_PLAY_OFF (1 << 0)
#define VIDEO_STATE_PLAY_ON (1 << 1)
-#define VIDEO_STATE_PLAY (VIDEO_STATE_PLAY_OFF | VIDEO_STATE_PLAY_ON)
#define VIDEO_STATE_REC_OFF (1 << 2)
#define VIDEO_STATE_REC_ON (1 << 3)
-#define VIDEO_STATE_REC (VIDEO_STATE_REC_OFF | VIDEO_STATE_REC_ON)
#define VIDEO_STATE_PAUSE_OFF (1 << 4)
#define VIDEO_STATE_PAUSE_ON (1 << 5)
-#define VIDEO_STATE_PAUSE (VIDEO_STATE_PAUSE_OFF | VIDEO_STATE_PAUSE_ON)
#define VIDEO_STATE_DATE_OFF (1 << 6)
#define VIDEO_STATE_DATE_ON (1 << 7)
-#define VIDEO_STATE_DATE (VIDEO_STATE_DATE_OFF | VIDEO_STATE_DATE_ON)
#define VIDEO_STATE_TIME_OFF (1 << 8)
#define VIDEO_STATE_TIME_ON (1 << 9)
-#define VIDEO_STATE_TIME (VIDEO_STATE_TIME_OFF | VIDEO_STATE_TIME_ON)
#define VIDEO_STATE_FRAME_OFF (1 << 10)
#define VIDEO_STATE_FRAME_ON (1 << 11)
-#define VIDEO_STATE_FRAME (VIDEO_STATE_FRAME_OFF | VIDEO_STATE_FRAME_ON)
-
#define VIDEO_STATE_FFWD_OFF (1 << 12)
#define VIDEO_STATE_FFWD_ON (1 << 13)
-#define VIDEO_STATE_FFWD (VIDEO_STATE_FFWD_OFF | VIDEO_STATE_FFWD_ON)
#define VIDEO_STATE_PBEND_OFF (1 << 14)
#define VIDEO_STATE_PBEND_ON (1 << 15)
-#define VIDEO_STATE_PBEND (VIDEO_STATE_PBEND_OFF | VIDEO_STATE_PBEND_ON)
#define VIDEO_STATE_WARP_OFF (1 << 16)
#define VIDEO_STATE_WARP_ON (1 << 17)
-#define VIDEO_STATE_WARP (VIDEO_STATE_WARP_OFF | VIDEO_STATE_WARP_ON)
#define VIDEO_STATE_WARP2_OFF (1 << 18)
#define VIDEO_STATE_WARP2_ON (1 << 19)
-#define VIDEO_STATE_WARP2 (VIDEO_STATE_WARP2_OFF | VIDEO_STATE_WARP2_ON)
#define VIDEO_STATE_1STEP_OFF (1 << 20)
#define VIDEO_STATE_1STEP_ON (1 << 21)
-#define VIDEO_STATE_1STEP (VIDEO_STATE_1STEP_OFF | VIDEO_STATE_1STEP_ON)
-
#define VIDEO_PRESS_PLAY_ON (1 << 22)
#define VIDEO_PRESS_PLAY_OFF (1 << 23)
-#define VIDEO_PRESS_PLAY (VIDEO_PRESS_PLAY_OFF | VIDEO_PRESS_PLAY_ON)
#define VIDEO_PRESS_REC_ON (1 << 24)
#define VIDEO_PRESS_REC_OFF (1 << 25)
-#define VIDEO_PRESS_REC (VIDEO_PRESS_REC_OFF | VIDEO_PRESS_REC_ON)
#define VIDEO_PRESS_PAUSE_ON (1 << 26)
#define VIDEO_PRESS_PAUSE_OFF (1 << 27)
-#define VIDEO_PRESS_PAUSE (VIDEO_PRESS_PAUSE_OFF | VIDEO_PRESS_PAUSE_ON)
#define VIDEO_PRESS_STOP_ON (1 << 28)
#define VIDEO_PRESS_STOP_OFF (1 << 29)
-#define VIDEO_PRESS_STOP (VIDEO_PRESS_STOP_OFF | VIDEO_PRESS_STOP_ON)
#define VIDEO_PRESS_EJECT_ON (1 << 30)
#define VIDEO_PRESS_EJECT_OFF (1 << 31)
-#define VIDEO_PRESS_EJECT (VIDEO_PRESS_EJECT_OFF | VIDEO_PRESS_EJECT_ON)
+
+#define VIDEO_STATE_PLAY(x) ((x) ? VIDEO_STATE_PLAY_ON : VIDEO_STATE_PLAY_OFF)
+#define VIDEO_STATE_REC(x) ((x) ? VIDEO_STATE_REC_ON : VIDEO_STATE_REC_OFF)
+#define VIDEO_STATE_PAUSE(x) ((x) ? VIDEO_STATE_PAUSE_ON: VIDEO_STATE_PAUSE_OFF)
+#define VIDEO_STATE_DATE(x) ((x) ? VIDEO_STATE_DATE_ON : VIDEO_STATE_DATE_OFF)
+#define VIDEO_STATE_TIME(x) ((x) ? VIDEO_STATE_TIME_ON : VIDEO_STATE_TIME_OFF)
+#define VIDEO_STATE_FRAME(x) ((x) ? VIDEO_STATE_FRAME_ON: VIDEO_STATE_FRAME_OFF)
+#define VIDEO_STATE_FFWD(x) ((x) ? VIDEO_STATE_FFWD_ON : VIDEO_STATE_FFWD_OFF)
+#define VIDEO_STATE_PBEND(x) ((x) ? VIDEO_STATE_PBEND_ON: VIDEO_STATE_PBEND_OFF)
+#define VIDEO_STATE_WARP(x) ((x) ? VIDEO_STATE_WARP_ON : VIDEO_STATE_WARP_OFF)
+#define VIDEO_STATE_WARP2(x) ((x) ? VIDEO_STATE_WARP2_ON: VIDEO_STATE_WARP2_OFF)
+#define VIDEO_STATE_1STEP(x) ((x) ? VIDEO_STATE_1STEP_ON: VIDEO_STATE_1STEP_OFF)
+#define VIDEO_PRESS_PLAY(x) ((x) ? VIDEO_PRESS_PLAY_ON : VIDEO_PRESS_PLAY_OFF)
+#define VIDEO_PRESS_REC(x) ((x) ? VIDEO_PRESS_REC_ON : VIDEO_PRESS_REC_OFF)
+#define VIDEO_PRESS_PAUSE(x) ((x) ? VIDEO_PRESS_PAUSE_ON: VIDEO_PRESS_PAUSE_OFF)
+#define VIDEO_PRESS_STOP(x) ((x) ? VIDEO_PRESS_STOP_ON : VIDEO_PRESS_STOP_OFF)
+#define VIDEO_PRESS_EJECT(x) ((x) ? VIDEO_PRESS_EJECT_ON: VIDEO_PRESS_EJECT_OFF)
/* tags to draw video display labels or symbols only */
/* (negative values to prevent misinterpretation in DrawVideoDisplay(), where