diff options
-rw-r--r-- | backends/dc/dc.h | 1 | ||||
-rw-r--r-- | backends/dc/dcmain.cpp | 1 | ||||
-rw-r--r-- | common/system.h | 14 | ||||
-rw-r--r-- | gui/newgui.cpp | 2 |
4 files changed, 8 insertions, 10 deletions
diff --git a/backends/dc/dc.h b/backends/dc/dc.h index 42994c0012..3b7c0ae31f 100644 --- a/backends/dc/dc.h +++ b/backends/dc/dc.h @@ -133,7 +133,6 @@ 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); diff --git a/backends/dc/dcmain.cpp b/backends/dc/dcmain.cpp index 69a00a19b3..2068e2f51e 100644 --- a/backends/dc/dcmain.cpp +++ b/backends/dc/dcmain.cpp @@ -151,6 +151,7 @@ bool OSystem_Dreamcast::hasFeature(Feature f) switch(f) { case kFeatureAspectRatioCorrection: case kFeatureVirtualKeyboard: + case kFeatureOverlaySupportsAlpha: return true; default: return false; diff --git a/common/system.h b/common/system.h index 94d7bd3e84..ec7c7b40b7 100644 --- a/common/system.h +++ b/common/system.h @@ -110,7 +110,12 @@ public: * Entertainment games. If backend doesn't implement this feature then * engine switches to b/w version of cursors. */ - kFeatureCursorHasPalette + kFeatureCursorHasPalette, + + /** + * Set to true if the overlay pixel format has an alpha channel. + */ + kFeatureOverlaySupportsAlpha }; /** @@ -461,13 +466,6 @@ public: virtual int overlayToScreenY(int y) { return y; } /** - * Return true if the overlay pixel format has an alpha channel. - */ - virtual bool hasAlpha() const { - return false; - } - - /** * Convert the given RGB triplet into an OverlayColor. A OverlayColor can * be 8bit, 16bit or 32bit, depending on the target system. The default * implementation generates a 16 bit color value, in the 565 format diff --git a/gui/newgui.cpp b/gui/newgui.cpp index a9b6070efc..b46039a1fd 100644 --- a/gui/newgui.cpp +++ b/gui/newgui.cpp @@ -365,7 +365,7 @@ void NewGui::blendRect(int x, int y, int w, int h, OverlayColor color, int level if (!rect.isValidRect()) return; - if (_system->hasAlpha()) { + if (_system->hasFeature(OSystem::kFeatureOverlaySupportsAlpha)) { int a, r, g, b; uint8 aa, ar, ag, ab; |