diff options
author | Oliver Schinagl <oliver@schinagl.nl> | 2004-11-15 16:04:27 (GMT) |
---|---|---|
committer | Oliver Schinagl <oliver@schinagl.nl> | 2004-11-15 16:04:27 (GMT) |
commit | aee5707fed8541410816c0a1ce1f0aa17108b462 (patch) | |
tree | f2546786adb04fac0b9d9f3999bc27378fcd751d /Graphic_Equalizer/src/display.hcc | |
parent | 1db17be5a3ba68ffb5b9b23af6ac52a1b29e89ed (diff) | |
download | TASS-aee5707fed8541410816c0a1ce1f0aa17108b462.zip TASS-aee5707fed8541410816c0a1ce1f0aa17108b462.tar.gz TASS-aee5707fed8541410816c0a1ce1f0aa17108b462.tar.bz2 |
Added display of active buttons.
Added equalizer preset storage.
Diffstat (limited to 'Graphic_Equalizer/src/display.hcc')
-rw-r--r-- | Graphic_Equalizer/src/display.hcc | 43 |
1 files changed, 39 insertions, 4 deletions
diff --git a/Graphic_Equalizer/src/display.hcc b/Graphic_Equalizer/src/display.hcc index 79cf4b2..9625506 100644 --- a/Graphic_Equalizer/src/display.hcc +++ b/Graphic_Equalizer/src/display.hcc @@ -42,7 +42,7 @@ chan unsigned 1 maskupdate_notification; -/*! \fn void display_main(equalizer_levels_t *equalizer_levels, events_t *events,
+/*! \fn void display_main(audiodata_t *audiodata, equalizer_levels_t *equalizer_levels, events_t *events,
* mousedata_t *mousedata, ClockRate, RAM_BANK0);
*
* \brief This routine handles all drawing of pixels. It never returns!
@@ -54,7 +54,7 @@ chan unsigned 1 maskupdate_notification; * \return Never Returns.
* \retval void
*/
-macro proc display_main(events, mousedata, CLOCKRATE, VIDEOOUT, RAM_BANK0) {
+macro proc display_main(audiodata, events, mousedata, CLOCKRATE, VIDEOOUT, RAM_BANK0) {
/*
* Setup macro's RAM/Video handles and to coordinate pixel writing.
*/
@@ -80,6 +80,18 @@ macro proc display_main(events, mousedata, CLOCKRATE, VIDEOOUT, RAM_BANK0) { #else
#define PIXEL (pixeldata <- 24)
#endif
+
+ /*
+ *
+ */
+ macro proc draw_button(button) {
+ if (button == pixeldata[31:24]) {
+ PalVideoOutWrite(VIDEOOUT, ~PIXEL);
+ } else {
+ PalVideoOutWrite(VIDEOOUT, PIXEL);
+ }
+ }
+
/*
* Prime Rendering Pipeline to start where the skin starts.
*/
@@ -110,12 +122,35 @@ macro proc display_main(events, mousedata, CLOCKRATE, VIDEOOUT, RAM_BANK0) { PalVideoOutWrite(VIDEOOUT, PIXEL);
}
break;
+
+ case BUTTON_PRESET_1:
+ case BUTTON_PRESET_2:
+ case BUTTON_PRESET_3:
+ case BUTTON_PRESET_4:
+ case BUTTON_PRESET_5:
+ case BUTTON_PRESET_6:
+ draw_button((audiodata.active_preset +BUTTON_PRESET_1) <- 8);
+ break;
+
+ case BUTTON_1:
+ case BUTTON_2:
+ case BUTTON_3:
+ case BUTTON_4:
+ case BUTTON_5:
+ draw_button((0 @ events.equalizer_mode) +BUTTON_1);
+ break;
+
+ case BUTTON_LOG:
+ draw_button((0 @ audiodata.log) +BUTTON_LOG);
+ break;
+
default:
- if ((AREA_EQUALIZER_MIN <= pixeldata[31:24]) && (pixeldata[31:24] <= AREA_EQUALIZER_MAX) && ((SCANY -382) == 0 @ events.equalizer_position[(pixeldata[31:24] -0x80) <- 7])) {
+ if ((AREA_EQUALIZER_MIN <= pixeldata[31:24]) && (pixeldata[31:24] <= AREA_EQUALIZER_MAX) && (SCANY == 0 @ events.equalizer_position[(pixeldata[31:24] -0x80) <- 7])) {
PalVideoOutWrite(VIDEOOUT, PIXEL_EQUALIZER);
} else {
PalVideoOutWrite(VIDEOOUT, PIXEL);
}
+
break;
}
@@ -179,4 +214,4 @@ macro proc display_main(events, mousedata, CLOCKRATE, VIDEOOUT, RAM_BANK0) { }
}
}
-} /* --- display_main() --- */
+} /* --- display_main() --- */
\ No newline at end of file |