From: Holger Schemel Date: Tue, 31 May 2016 09:41:05 +0000 (+0200) Subject: small cleanup for drawing tape recorder labels and symbols only X-Git-Tag: 4.0.0.0-rc3~43 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=bb3edc0e21cf025eff287bbfe64c437e33c6d84c;p=rocksndiamonds.git small cleanup for drawing tape recorder labels and symbols only --- diff --git a/src/tape.c b/src/tape.c index 128c38b0..d2a0b749 100644 --- a/src/tape.c +++ b/src/tape.c @@ -435,6 +435,16 @@ void DrawVideoDisplay(unsigned int state, unsigned int value) DrawVideoDisplay_DateTime(state, value); } +void DrawVideoDisplayLabel(unsigned int state) +{ + DrawVideoDisplay(state, VIDEO_DISPLAY_LABEL_ONLY); +} + +void DrawVideoDisplaySymbol(unsigned int state) +{ + DrawVideoDisplay(state, VIDEO_DISPLAY_SYMBOL_ONLY); +} + void DrawCompleteVideoDisplay() { struct GraphicInfo *g_tape = &graphic_info[IMG_BACKGROUND_TAPE]; @@ -749,7 +759,7 @@ void TapeTogglePause(boolean toggle_manual) if (tape.deactivate_display) TapeDeactivateDisplayOn(); - DrawVideoDisplay(VIDEO_STATE_WARP_ON, VIDEO_DISPLAY_SYMBOL_ONLY); + DrawVideoDisplaySymbol(VIDEO_STATE_WARP_ON); } if (tape.quick_resume) @@ -850,16 +860,16 @@ byte *TapePlayAction() if (update_video_display && !tape.deactivate_display) { if (tape.pause_before_death) - DrawVideoDisplay(update_draw_label_on ? - VIDEO_STATE_PBEND_ON : - VIDEO_STATE_PBEND_OFF, VIDEO_DISPLAY_LABEL_ONLY); + DrawVideoDisplayLabel(update_draw_label_on ? + VIDEO_STATE_PBEND_ON : + VIDEO_STATE_PBEND_OFF); else if (tape.fast_forward) - DrawVideoDisplay(update_draw_label_on ? - VIDEO_STATE_FFWD_ON : - VIDEO_STATE_FFWD_OFF, VIDEO_DISPLAY_LABEL_ONLY); + DrawVideoDisplayLabel(update_draw_label_on ? + VIDEO_STATE_FFWD_ON : + VIDEO_STATE_FFWD_OFF); if (tape.warp_forward) - DrawVideoDisplay(VIDEO_STATE_WARP2_ON, VIDEO_DISPLAY_SYMBOL_ONLY); + DrawVideoDisplaySymbol(VIDEO_STATE_WARP2_ON); } if (tape.counter >= tape.length) /* end of tape reached */ @@ -954,11 +964,11 @@ static void TapeStartWarpForward() TapeDeactivateDisplayOn(); DrawVideoDisplay(VIDEO_STATE_PBEND_ON, 0); - DrawVideoDisplay(VIDEO_STATE_WARP_ON, VIDEO_DISPLAY_SYMBOL_ONLY); + DrawVideoDisplaySymbol(VIDEO_STATE_WARP_ON); } else { - DrawVideoDisplay(VIDEO_STATE_WARP2_ON, VIDEO_DISPLAY_SYMBOL_ONLY); + DrawVideoDisplaySymbol(VIDEO_STATE_WARP2_ON); } } @@ -1475,7 +1485,7 @@ static void HandleTapeButtonsExt(int id) DrawVideoDisplay(VIDEO_STATE_FFWD_OFF | VIDEO_STATE_PBEND_ON, 0); if (tape.warp_forward) - DrawVideoDisplay(VIDEO_STATE_WARP2_ON, VIDEO_DISPLAY_SYMBOL_ONLY); + DrawVideoDisplaySymbol(VIDEO_STATE_WARP2_ON); } else /* AUTO PAUSE -> NORMAL PLAY */ {