aboutsummaryrefslogtreecommitdiff
path: root/gui/ThemeEngine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gui/ThemeEngine.cpp')
-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,