aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorMax Horn2009-01-22 04:35:10 +0000
committerMax Horn2009-01-22 04:35:10 +0000
commitabc06ca18e69c336d701707933b4dc490dd86e94 (patch)
treea6dc57ffd954e3e85f7be813fe25d8341180c2ea /backends
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 'backends')
-rw-r--r--backends/platform/sdl/graphics.cpp12
-rw-r--r--backends/vkeybd/virtual-keyboard-parser.cpp4
2 files changed, 8 insertions, 8 deletions
diff --git a/backends/platform/sdl/graphics.cpp b/backends/platform/sdl/graphics.cpp
index cda14a24ad..2a4e166ab2 100644
--- a/backends/platform/sdl/graphics.cpp
+++ b/backends/platform/sdl/graphics.cpp
@@ -410,12 +410,6 @@ bool OSystem_SDL::loadGFXMode() {
// Create the surface used for the graphics in 16 bit before scaling, and also the overlay
//
- // Distinguish 555 and 565 mode
- if (_hwscreen->format->Rmask == 0x7C00)
- InitScalers(555);
- else
- InitScalers(565);
-
// Need some extra bytes around when using 2xSaI
_tmpscreen = SDL_CreateRGBSurface(SDL_SWSURFACE, _videoMode.screenWidth + 3, _videoMode.screenHeight + 3,
16,
@@ -479,6 +473,12 @@ bool OSystem_SDL::loadGFXMode() {
_km.delay_time = 25;
_km.last_time = 0;
+ // Distinguish 555 and 565 mode
+ if (_hwscreen->format->Rmask == 0x7C00)
+ InitScalers(555);
+ else
+ InitScalers(565);
+
return true;
}
diff --git a/backends/vkeybd/virtual-keyboard-parser.cpp b/backends/vkeybd/virtual-keyboard-parser.cpp
index e643161333..330b9a5d6a 100644
--- a/backends/vkeybd/virtual-keyboard-parser.cpp
+++ b/backends/vkeybd/virtual-keyboard-parser.cpp
@@ -273,7 +273,7 @@ bool VirtualKeyboardParser::parserCallback_layout(ParserNode *node) {
g = 0;
b = 255;
}
- _mode->transparentColor = Graphics::RGBToColor(r, g, b, format);
+ _mode->transparentColor = format.RGBToColor(r, g, b);
if (node->values.contains("display_font_color")) {
if (!parseIntegerKey(node->values["display_font_color"].c_str(), 3, &r, &g, &b))
@@ -281,7 +281,7 @@ bool VirtualKeyboardParser::parserCallback_layout(ParserNode *node) {
} else {
r = g = b = 0; // default to black
}
- _mode->displayFontColor = Graphics::RGBToColor(r, g, b, format);
+ _mode->displayFontColor = format.RGBToColor(r, g, b);
_layoutParsed = true;