From dbd0ba4e58a87006957d198f4caddc4a55ba5072 Mon Sep 17 00:00:00 2001 From: Oliver Schinagl Date: Thu, 20 Jan 2005 07:59:27 +0000 Subject: Input gain can be colored 'disabled'. We reset the image index to the background when the exit button was pressed. --- Graphic_Equalizer/src/display.hcc | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/Graphic_Equalizer/src/display.hcc b/Graphic_Equalizer/src/display.hcc index 4ce3001..12faad9 100644 --- a/Graphic_Equalizer/src/display.hcc +++ b/Graphic_Equalizer/src/display.hcc @@ -134,7 +134,24 @@ inline void display_main(skindata_t *skindata, audiodata_t *audiodata, events_t PalPL2RAMRead(RAM_BANK0, &pixeldata); PalPL2RAMSetReadAddress(RAM_BANK0, (IMAGE_GRAPH == events->image) ? (images[events->image] +(0 @ (addresses[address_index] \\ 2))) : (images[events->image] +addresses[address_index])); + /* + * Always reset the address_index to the corresponding + * array index containing the address counter of the + * background image, when the default skin should be + * displayed. + */ + if (IMAGE_SKIN == events->image) { + address_index = MASK_AREA_BACKGROUND; + } else { + delay; + } + /* + * When displaying the visual the pixeldata read + * from the RAM-bank needs to be interpreted differntly, + * since the visual-image is not stored as a MRGB value, + * but as a MMMM-value. (M = mask) + */ if (IMAGE_GRAPH == events->image) { par { switch (addresses[MASK_AREA_BACKGROUND] <- 2) { @@ -205,7 +222,7 @@ inline void display_main(skindata_t *skindata, audiodata_t *audiodata, events_t if (SCANY >= 0 @ events->inputgain_position) { PalVideoOutWrite(VIDEOOUT, events->saturated ? skindata->inputgain.color_secondary : skindata->inputgain.color_primary); } else { - PalVideoOutWrite(VIDEOOUT, PIXEL); + PalVideoOutWrite(VIDEOOUT, (events->locked_gain) ? DISABLED : PIXEL); } break; -- cgit v0.12