aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorMax Horn2009-01-22 04:35:10 +0000
committerMax Horn2009-01-22 04:35:10 +0000
commitabc06ca18e69c336d701707933b4dc490dd86e94 (patch)
treea6dc57ffd954e3e85f7be813fe25d8341180c2ea /gui
parenta2c671da977acda9f9503413fb38490dcceda76d (diff)
downloadscummvm-rg350-abc06ca18e69c336d701707933b4dc490dd86e94.tar.gz
scummvm-rg350-abc06ca18e69c336d701707933b4dc490dd86e94.tar.bz2
scummvm-rg350-abc06ca18e69c336d701707933b4dc490dd86e94.zip
Moved Graphics::PixelFormat into its own header file; turned RGBToColor etc. into methods, and added an operator==
svn-id: r35993
Diffstat (limited to 'gui')
-rw-r--r--gui/ThemeEngine.cpp4
-rw-r--r--gui/widget.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp
index d993e5c52b..dcddce90bd 100644
--- a/gui/ThemeEngine.cpp
+++ b/gui/ThemeEngine.cpp
@@ -1041,7 +1041,7 @@ void ThemeEngine::drawChar(const Common::Rect &r, byte ch, const Graphics::Font
charArea.clip(_screen.w, _screen.h);
Graphics::PixelFormat format = _system->getOverlayFormat();
- uint32 color = Graphics::RGBToColor(_texts[kTextDataDefault]->_color.r, _texts[kTextDataDefault]->_color.g, _texts[kTextDataDefault]->_color.b, format);
+ uint32 color = format.RGBToColor(_texts[kTextDataDefault]->_color.r, _texts[kTextDataDefault]->_color.g, _texts[kTextDataDefault]->_color.b);
restoreBackground(charArea);
font->drawChar(&_screen, ch, charArea.left, charArea.top, color);
@@ -1150,7 +1150,7 @@ bool ThemeEngine::createCursor(const Common::String &filename, int hotspotX, int
for (uint y = 0; y < _cursorHeight; ++y) {
for (uint x = 0; x < _cursorWidth; ++x) {
byte r, g, b;
- Graphics::colorToRGB(src[x], r, g, b, format);
+ format.colorToRGB(src[x], r, g, b);
const int col = (r << 16) | (g << 8) | b;
// Skip transparency (the transparent color actually is 0xFF00FF,
diff --git a/gui/widget.cpp b/gui/widget.cpp
index 7d6a8c939d..412e50f79c 100644
--- a/gui/widget.cpp
+++ b/gui/widget.cpp
@@ -399,7 +399,7 @@ void GraphicsWidget::setGfx(int w, int h, int r, int g, int b) {
OverlayColor *dst = (OverlayColor*)_gfx.pixels;
Graphics::PixelFormat overlayFormat = g_system->getOverlayFormat();
- OverlayColor fillCol = Graphics::RGBToColor(r, g, b, overlayFormat);
+ OverlayColor fillCol = overlayFormat.RGBToColor(r, g, b);
while (h--) {
for (int i = 0; i < w; ++i) {
*dst++ = fillCol;