From abc06ca18e69c336d701707933b4dc490dd86e94 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Thu, 22 Jan 2009 04:35:10 +0000 Subject: Moved Graphics::PixelFormat into its own header file; turned RGBToColor etc. into methods, and added an operator== svn-id: r35993 --- backends/platform/sdl/graphics.cpp | 12 ++++++------ backends/vkeybd/virtual-keyboard-parser.cpp | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'backends') 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; -- cgit v1.2.3