aboutsummaryrefslogtreecommitdiff
path: root/backends/dc/dc.h
diff options
context:
space:
mode:
Diffstat (limited to 'backends/dc/dc.h')
-rw-r--r--backends/dc/dc.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/backends/dc/dc.h b/backends/dc/dc.h
index 10f2c6c33b..42994c0012 100644
--- a/backends/dc/dc.h
+++ b/backends/dc/dc.h
@@ -133,6 +133,20 @@ class OSystem_Dreamcast : public OSystem {
void clearOverlay();
void grabOverlay(int16 *buf, int pitch);
void copyRectToOverlay(const int16 *buf, int pitch, int x, int y, int w, int h);
+ bool hasAlpha() const { return true; }
+ OverlayColor RGBToColor(uint8 r, uint8 g, uint8 b) { return ARGBToColor(255, r, g, b); }
+ void colorToRGB(OverlayColor color, uint8 &r, uint8 &g, uint8 &b) {
+ uint8 tmp; colorToARGB(color, tmp, r, g, b);
+ }
+ OverlayColor ARGBToColor(uint8 a, uint8 r, uint8 g, uint8 b) {
+ return ((a&0xf0)<<8)|((r&0xf0)<<4)|(g&0xf0)|(b>>4);
+ }
+ void colorToARGB(OverlayColor color, uint8 &a, uint8 &r, uint8 &g, uint8 &b) {
+ a = ((color>>8)&0xf0)|((color>>12)&0x0f);
+ r = ((color>>4)&0xf0)|((color>>8)&0x0f);
+ g = (color&0xf0)|((color>>4)&0x0f);
+ b = ((color<<4)&0xf0)|(color&0x0f);
+ }
// Add a callback timer
void setTimerCallback(TimerProc callback, int timer);