summaryrefslogtreecommitdiffstats
path: root/Graphic_Equalizer/src/display.hcc
diff options
context:
space:
mode:
authorOliver Schinagl <oliver@schinagl.nl>2004-12-08 11:53:37 (GMT)
committerOliver Schinagl <oliver@schinagl.nl>2004-12-08 11:53:37 (GMT)
commit7971c7b2e385ff61fb4f900064b5b19e0605a566 (patch)
treea686f4c773929cdf461b26b245a6dda8f2bba0cc /Graphic_Equalizer/src/display.hcc
parentd41f7d35da426a8888fa8e4504667b1d40571304 (diff)
downloadTASS-7971c7b2e385ff61fb4f900064b5b19e0605a566.zip
TASS-7971c7b2e385ff61fb4f900064b5b19e0605a566.tar.gz
TASS-7971c7b2e385ff61fb4f900064b5b19e0605a566.tar.bz2
We only use one var to lock the display from wherever.
Fixed some comments. Removed mask only drawing of pixels as we either load with or without SmartMedia.
Diffstat (limited to 'Graphic_Equalizer/src/display.hcc')
-rw-r--r--Graphic_Equalizer/src/display.hcc45
1 files changed, 18 insertions, 27 deletions
diff --git a/Graphic_Equalizer/src/display.hcc b/Graphic_Equalizer/src/display.hcc
index 8aafea4..1aeb9d9 100644
--- a/Graphic_Equalizer/src/display.hcc
+++ b/Graphic_Equalizer/src/display.hcc
@@ -31,6 +31,7 @@
#include "audio.hch"
#include "eventhandler_shared.hch"
#include "mouse_shared.hch"
+#include "smartmedia_shared.hch"
#include "display_shared.hch"
#include "display.hch"
@@ -80,17 +81,7 @@ void display_main(skindata_t *skindata, audiodata_t *audiodata, events_t *events
unsigned 24 visual_graph_color;
unsigned AW address, address_offset;
-/*
- * To draw something usefull when only drawing our mask, we simply draw the
- * mask itself. Thus creating a blueish image to help identify all interesting
- * area's on the screen. Otherwise we only use the last 24 bits, the RGB values
- * to draw on the screen.
- */
-#if (USE_MASK_ONLY && HAVE_SMARTMEDIA)
-#define PIXEL (0 @ pixeldata[31:24])
-#else
-#define PIXEL (pixeldata <- 24)
-#endif
+
/*
* If the passed button_state tells us the button is active, then we
@@ -176,7 +167,7 @@ void display_main(skindata_t *skindata, audiodata_t *audiodata, events_t *events
PalVideoOutWrite(VIDEOOUT, PIXEL);
}
break;
-
+
/*
* Spectrum Analyzer
*/
@@ -212,11 +203,11 @@ void display_main(skindata_t *skindata, audiodata_t *audiodata, events_t *events
draw_button((events->active_preset +BUTTON_PRESET_1) <- 8);
break;
- case BUTTON_CONVEX_FULL: /* fall through */
- case BUTTON_CONVEX_HALF: /* fall through */
case BUTTON_PRECISE: /* fall through */
case BUTTON_CONCAVE_HALF: /* fall through */
- case BUTTON_CONCAVE_FULL:
+ case BUTTON_CONVEX_HALF: /* fall through */
+ case BUTTON_CONCAVE_FULL: /* fall through */
+ case BUTTON_CONVEX_FULL:
/*
* equalizer mode tells us what button
* is currently enabled. By adding the
@@ -224,7 +215,7 @@ void display_main(skindata_t *skindata, audiodata_t *audiodata, events_t *events
* safley check wether it matches our
* mask.
*/
- draw_button((0 @ events->equalizer_mode) +BUTTON_CONVEX_FULL);
+ draw_button((0 @ events->equalizer_mode) +BUTTON_PRECISE);
break;
case BUTTON_LOG:
@@ -246,8 +237,8 @@ void display_main(skindata_t *skindata, audiodata_t *audiodata, events_t *events
*/
default:
/* (pixeldata[31:24] <= AREA_EQUALIZER_MAX) && */
- if (!events->locked_equalizer) {
- if ((AREA_EQUALIZER_MIN <= pixeldata[31:24]) && ((SCANY -(0 @ SCANY <- 1)) == 0 @ events->equalizer_display[(pixeldata[31:24] -AREA_EQUALIZER_MIN) <- 7])) {
+ if ((AREA_EQUALIZER_MIN <= pixeldata[31:24]) && (!events->locked_display)) {
+ if ((SCANY == 0 @ events->equalizer_display[(pixeldata[31:24] -AREA_EQUALIZER_MIN) <- 7]) || ((SCANY +1) == 0 @ events->equalizer_display[(pixeldata[31:24] -AREA_EQUALIZER_MIN) <- 7])) {
PalVideoOutWrite(VIDEOOUT, skindata->color_equalizer);
} else {
PalVideoOutWrite(VIDEOOUT, PIXEL);
@@ -255,7 +246,7 @@ void display_main(skindata_t *skindata, audiodata_t *audiodata, events_t *events
} else {
PalVideoOutWrite(VIDEOOUT, PIXEL);
}
- break;
+ break;
}
}
@@ -286,10 +277,10 @@ void display_main(skindata_t *skindata, audiodata_t *audiodata, events_t *events
* for this area as it is not drawn. We therefor have
* to determin wether we are beyond the visible area of
* the screen, but before the end of the total width of
- * the screen. Our pipeline consists of 4 total stages.
- * Therefor we have to substract 4 pixels.
+ * the screen. Our pipeline consists of 5 total stages.
+ * Therefor we have to substract 5 pixels.
*/
- if ((SCANX > (VISIBLEX - 4)) && (SCANX <= (TOTALX - 4))) {
+ if ((SCANX > (VISIBLEX - 5)) && (SCANX <= (TOTALX - 5))) {
/*
* We are in the blanking area of the screen.
* If we are on the last line, and thus last
@@ -302,9 +293,9 @@ void display_main(skindata_t *skindata, audiodata_t *audiodata, events_t *events
address = 0;
} else {
/*
- * We should not ever get inhere. To
- * keep everything consequent however,
- * we add a delay.
+ * We have reached the end of the
+ * visible line, but not the end of
+ * the screen. Therefore do nothing.
*/
delay;
}
@@ -337,11 +328,11 @@ void display_main(skindata_t *skindata, audiodata_t *audiodata, events_t *events
void reload_equalizer(events_t *events, unsigned 4 *equalizer_levels) {
unsigned 7 equalizer_band;
- events->locked_equalizer = TRUE;
+ events->locked_display = TRUE;
delay;
do {
events->equalizer_display[equalizer_band] = equalizer_table_inv[equalizer_levels[equalizer_band]];
equalizer_band++;
} while (equalizer_band);
- events->locked_equalizer = FALSE;
+ events->locked_display = FALSE;
} /* --- reload_equalizer() --- */