aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorMax Horn2008-11-06 15:02:50 +0000
committerMax Horn2008-11-06 15:02:50 +0000
commitedf9f249260b1fd4364f6727fa622991e81e8cf3 (patch)
tree2b034d5daf7b69212957d8d51ab839974f51f2c5 /gui
parentf238a12b27ebfa9847814b9972fdb5789e484533 (diff)
downloadscummvm-rg350-edf9f249260b1fd4364f6727fa622991e81e8cf3.tar.gz
scummvm-rg350-edf9f249260b1fd4364f6727fa622991e81e8cf3.tar.bz2
scummvm-rg350-edf9f249260b1fd4364f6727fa622991e81e8cf3.zip
Got rid of OSystem::colorToRGB and RGBToColor; added implementations for OSystem::getOverlayFormat to several ports (pending testing by the porters)
svn-id: r34912
Diffstat (limited to 'gui')
-rw-r--r--gui/ThemeEngine.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp
index cbcd32fd4c..20638b827d 100644
--- a/gui/ThemeEngine.cpp
+++ b/gui/ThemeEngine.cpp
@@ -290,7 +290,7 @@ void ThemeEngine::clearAll() {
return;
_system->clearOverlay();
- _system->grabOverlay((OverlayColor*)_screen->pixels, _screen->w);
+ _system->grabOverlay((OverlayColor *)_screen->pixels, _screen->w);
}
void ThemeEngine::refresh() {
@@ -941,7 +941,8 @@ void ThemeEngine::drawChar(const Common::Rect &r, byte ch, const Graphics::Font
Common::Rect charArea = r;
charArea.clip(_screen->w, _screen->h);
- uint32 color = _system->RGBToColor(_texts[kTextDataDefault]->_color.r, _texts[kTextDataDefault]->_color.g, _texts[kTextDataDefault]->_color.b);
+ Graphics::PixelFormat format = _system->getOverlayFormat();
+ uint32 color = Graphics::RGBToColor(_texts[kTextDataDefault]->_color.r, _texts[kTextDataDefault]->_color.g, _texts[kTextDataDefault]->_color.b, format);
restoreBackground(charArea);
font->drawChar(_screen, ch, charArea.left, charArea.top, color);
@@ -1053,10 +1054,11 @@ bool ThemeEngine::createCursor(const Common::String &filename, int hotspotX, int
uint colorsFound = 0;
Common::HashMap<int, int> colorToIndex;
const OverlayColor *src = (const OverlayColor*)cursor->pixels;
+ Graphics::PixelFormat format = _system->getOverlayFormat();
for (uint y = 0; y < _cursorHeight; ++y) {
for (uint x = 0; x < _cursorWidth; ++x) {
byte r, g, b;
- _system->colorToRGB(src[x], r, g, b);
+ Graphics::colorToRGB(src[x], r, g, b, format);
const int col = (r << 16) | (g << 8) | b;
// Skip transparency (the transparent color actually is 0xFF00FF,