mirror of
https://github.com/libretro/scummvm.git
synced 2025-04-02 06:41:51 +00:00
Replace OSystem::hasAlpha with a feature flag
svn-id: r17695
This commit is contained in:
parent
2cfb9322e2
commit
25d56525c8
@ -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);
|
||||
|
@ -151,6 +151,7 @@ bool OSystem_Dreamcast::hasFeature(Feature f)
|
||||
switch(f) {
|
||||
case kFeatureAspectRatioCorrection:
|
||||
case kFeatureVirtualKeyboard:
|
||||
case kFeatureOverlaySupportsAlpha:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
|
@ -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
|
||||
};
|
||||
|
||||
/**
|
||||
@ -460,13 +465,6 @@ public:
|
||||
virtual int overlayToScreenX(int x) { return x; }
|
||||
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
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user