aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2008-11-06 14:27:13 +0000
committerMax Horn2008-11-06 14:27:13 +0000
commitf238a12b27ebfa9847814b9972fdb5789e484533 (patch)
treefe14180f721904c41ec9f958198338b3ca55ef68
parent38a4eaa001f89fa201125fbe1b82f6f539ecda12 (diff)
downloadscummvm-rg350-f238a12b27ebfa9847814b9972fdb5789e484533.tar.gz
scummvm-rg350-f238a12b27ebfa9847814b9972fdb5789e484533.tar.bz2
scummvm-rg350-f238a12b27ebfa9847814b9972fdb5789e484533.zip
Got rid of OSystem::ARGBToColor and colorToARGB
svn-id: r34911
-rw-r--r--backends/platform/PalmOS/Src/be_base.h3
-rw-r--r--backends/platform/dc/dc.h9
-rw-r--r--backends/platform/psp/osys_psp.cpp16
-rw-r--r--backends/platform/psp/osys_psp.h2
-rw-r--r--backends/platform/wii/osystem.h3
-rw-r--r--backends/platform/wii/osystem_gfx.cpp10
-rw-r--r--common/system.cpp9
-rw-r--r--common/system.h24
8 files changed, 1 insertions, 75 deletions
diff --git a/backends/platform/PalmOS/Src/be_base.h b/backends/platform/PalmOS/Src/be_base.h
index 8c08c0a2ff..03a9d56fb4 100644
--- a/backends/platform/PalmOS/Src/be_base.h
+++ b/backends/platform/PalmOS/Src/be_base.h
@@ -199,9 +199,6 @@ public:
virtual int16 getOverlayHeight();
virtual int16 getOverlayWidth();
- virtual OverlayColor ARGBToColor(uint8 a, uint8 r, uint8 g, uint8 b);
- virtual void colorToARGB(OverlayColor color, uint8 &a, uint8 &r, uint8 &g, uint8 &b);
-
virtual void setCursorPalette(const byte *colors, uint start, uint num);
virtual void disableCursorPalette(bool disable);
diff --git a/backends/platform/dc/dc.h b/backends/platform/dc/dc.h
index 54cd2e982b..8b99457310 100644
--- a/backends/platform/dc/dc.h
+++ b/backends/platform/dc/dc.h
@@ -155,15 +155,8 @@ class OSystem_Dreamcast : public OSystem, public FilesystemFactory {
void clearOverlay();
void grabOverlay(int16 *buf, int pitch);
void copyRectToOverlay(const int16 *buf, int pitch, int x, int y, int w, int h);
- OverlayColor RGBToColor(uint8 r, uint8 g, uint8 b) { return ARGBToColor(255, r, g, b); }
+ OverlayColor RGBToColor(uint8 r, uint8 g, uint8 b) { return (0xf000|((r&0xf0)<<4)|(g&0xf0)|(b>>4); }
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);
diff --git a/backends/platform/psp/osys_psp.cpp b/backends/platform/psp/osys_psp.cpp
index 52d0913a4b..8670456e55 100644
--- a/backends/platform/psp/osys_psp.cpp
+++ b/backends/platform/psp/osys_psp.cpp
@@ -363,22 +363,6 @@ void OSystem_PSP::colorToRGB(OverlayColor color, uint8 &r, uint8 &g, uint8 &b) {
b = (((color >> 10) & 0x1F) << 3);
}
-OverlayColor OSystem_PSP::ARGBToColor(uint8 a, uint8 r, uint8 g, uint8 b) {
- OverlayColor color = RGBToColor(r, g, b);
-
- if (a == 255)
- color |= 0x8000;
-
- return color;
-}
-
-void OSystem_PSP::colorToARGB(OverlayColor color, uint8 &a, uint8 &r, uint8 &g, uint8 &b) {
- colorToRGB(color, r, g, b);
- if (color & 0x8000)
- a = 255;
- else
- a = 0;
-}
void OSystem_PSP::grabPalette(byte *colors, uint start, uint num) {
uint i;
diff --git a/backends/platform/psp/osys_psp.h b/backends/platform/psp/osys_psp.h
index 6da16c6e3b..783bb87b9c 100644
--- a/backends/platform/psp/osys_psp.h
+++ b/backends/platform/psp/osys_psp.h
@@ -109,8 +109,6 @@ public:
virtual int16 getOverlayWidth();
virtual OverlayColor RGBToColor(uint8 r, uint8 g, uint8 b);
virtual void colorToRGB(OverlayColor color, uint8 &r, uint8 &g, uint8 &b);
- virtual OverlayColor ARGBToColor(uint8 a, uint8 r, uint8 g, uint8 b);
- virtual void colorToARGB(OverlayColor color, uint8 &a, uint8 &r, uint8 &g, uint8 &b);
virtual void grabPalette(byte *colors, uint start, uint num);
virtual Graphics::PixelFormat getOverlayFormat() const { return Graphics::createPixelFormat<1555>(); }
diff --git a/backends/platform/wii/osystem.h b/backends/platform/wii/osystem.h
index 94c0fa76b3..f17644ba1b 100644
--- a/backends/platform/wii/osystem.h
+++ b/backends/platform/wii/osystem.h
@@ -139,9 +139,6 @@ public:
virtual OverlayColor RGBToColor(uint8 r, uint8 g, uint8 b);
virtual void colorToRGB(OverlayColor color, uint8 &r, uint8 &g, uint8 &b);
- virtual OverlayColor ARGBToColor(uint8 a, uint8 r, uint8 g, uint8 b);
- virtual void colorToARGB(OverlayColor color, uint8 &a, uint8 &r,
- uint8 &g, uint8 &b);
virtual bool showMouse(bool visible);
diff --git a/backends/platform/wii/osystem_gfx.cpp b/backends/platform/wii/osystem_gfx.cpp
index faad41d5f0..f6406a88ed 100644
--- a/backends/platform/wii/osystem_gfx.cpp
+++ b/backends/platform/wii/osystem_gfx.cpp
@@ -454,16 +454,6 @@ void OSystem_Wii::colorToRGB(OverlayColor color, uint8 &r, uint8 &g, uint8 &b) {
b = (color & 0x1f) << 3;
}
-OverlayColor OSystem_Wii::ARGBToColor(uint8 a, uint8 r, uint8 g, uint8 b) {
- return RGBToColor(r, g, b);
-}
-
-void OSystem_Wii::colorToARGB(OverlayColor color, uint8 &a, uint8 &r, uint8 &g,
- uint8 &b) {
- a = 0xff;
- colorToRGB(color, r, g, b);
-}
-
bool OSystem_Wii::showMouse(bool visible) {
bool last = _mouseVisible;
_mouseVisible = visible;
diff --git a/common/system.cpp b/common/system.cpp
index dc692b2e9e..1c9f0cd352 100644
--- a/common/system.cpp
+++ b/common/system.cpp
@@ -69,15 +69,6 @@ void OSystem::colorToRGB(OverlayColor color, uint8 &r, uint8 &g, uint8 &b) {
Graphics::colorToRGB<Graphics::ColorMasks<565> >(color, r, g, b);
}
-OverlayColor OSystem::ARGBToColor(uint8 a, uint8 r, uint8 g, uint8 b) {
- return RGBToColor(r, g, b);
-}
-
-void OSystem::colorToARGB(OverlayColor color, uint8 &a, uint8 &r, uint8 &g, uint8 &b) {
- colorToRGB(color, r, g, b);
- a = 255;
-}
-
void OSystem::displayMessageOnOSD(const char *msg) {
// Display the message for 1.5 seconds
GUI::TimedMessageDialog dialog(msg, 1500);
diff --git a/common/system.h b/common/system.h
index 08ca6c5f0d..c24ca2f343 100644
--- a/common/system.h
+++ b/common/system.h
@@ -623,7 +623,6 @@ public:
* implementation generates a 16 bit color value, in the 565 format
* (that is, 5 bits red, 6 bits green, 5 bits blue).
* @see colorToRGB
- * @see ARGBToColor
*/
virtual OverlayColor RGBToColor(uint8 r, uint8 g, uint8 b);
@@ -633,32 +632,9 @@ public:
* implementation takes a 16 bit color value and assumes it to be in 565 format
* (that is, 5 bits red, 6 bits green, 5 bits blue).
* @see RGBToColor
- * @see colorToARGB
*/
virtual void colorToRGB(OverlayColor color, uint8 &r, uint8 &g, uint8 &b);
- /**
- * Convert the given ARGB quadruplet 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
- * (that is, 5 bits red, 6 bits green, 5 bits blue).
- * @note The alpha component, ranges from 0 (transparent) to 255 (opaque).
- * @see colorToRGB
- * @see RGBToColor
- */
- virtual OverlayColor ARGBToColor(uint8 a, uint8 r, uint8 g, uint8 b);
-
- /**
- * Convert the given OverlayColor into an ARGB quadruplet. An OverlayColor can
- * be 8bit, 16bit or 32bit, depending on the target system. The default
- * implementation takes a 16 bit color value and assumes it to be in 565 format
- * (that is, 5 bits red, 6 bits green, 5 bits blue).
- * @note The alpha component, ranges from 0 (transparent) to 255 (opaque).
- * @see ARGBToColor
- * @see colorToRGB
- */
- virtual void colorToARGB(OverlayColor color, uint8 &a, uint8 &r, uint8 &g, uint8 &b);
-
//@}