aboutsummaryrefslogtreecommitdiff
path: root/engines/engine.cpp
diff options
context:
space:
mode:
authorJody Northup2009-06-15 09:45:19 +0000
committerJody Northup2009-06-15 09:45:19 +0000
commit8d306ebccfa7e88b2e4f4635bff3987e550f98d3 (patch)
tree937afc4b40b3d38da4a67fcd13cef91c097097cb /engines/engine.cpp
parente6f874ee9508a6631635504808680e50a4f55c7f (diff)
downloadscummvm-rg350-8d306ebccfa7e88b2e4f4635bff3987e550f98d3.tar.gz
scummvm-rg350-8d306ebccfa7e88b2e4f4635bff3987e550f98d3.tar.bz2
scummvm-rg350-8d306ebccfa7e88b2e4f4635bff3987e550f98d3.zip
Added kUnsupportedColorMode error code brought Scumm engine and SDL backend into compliance with API outlined in http://scummvmupthorn09.wordpress.com/2009/06/14/how-this-is-going-to-work/
Provided convenient Graphics::PixelFormat constructors for ColorMode enums, and bitformat integers. Removed last vestiges (I think) of initial cursor hack. svn-id: r41539
Diffstat (limited to 'engines/engine.cpp')
-rw-r--r--engines/engine.cpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/engines/engine.cpp b/engines/engine.cpp
index 7ddc286b0f..213f69e7b1 100644
--- a/engines/engine.cpp
+++ b/engines/engine.cpp
@@ -126,20 +126,17 @@ void initCommonGFX(bool defaultTo1XScaler) {
}
void initGraphics(int width, int height, bool defaultTo1xScaler) {
#ifdef ENABLE_16BIT
- Common::List<Graphics::ColorMode> formatList;
- formatList.push_back(Graphics::kFormatCLUT8);
- initGraphics(width,height,defaultTo1xScaler, formatList);
+ Graphics::PixelFormat format = Graphics::kFormatCLUT8;
+ initGraphics(width,height,defaultTo1xScaler, format);
}
-void initGraphics(int width, int height, bool defaultTo1xScaler, Common::List<Graphics::ColorMode> formatList) {
+void initGraphics(int width, int height, bool defaultTo1xScaler, Graphics::PixelFormat format) {
#endif
g_system->beginGFXTransaction();
initCommonGFX(defaultTo1xScaler);
#ifdef ENABLE_16BIT
- Graphics::ColorMode format = g_system->findCompatibleFormat(formatList);
- debug("%X",format); //TODO: set up the pixelFormat here
- g_system->initFormat(g_system->getPixelFormat(format));
+ g_system->initFormat(format);
#endif
g_system->initSize(width, height);
@@ -161,16 +158,16 @@ void initGraphics(int width, int height, bool defaultTo1xScaler, Common::List<Gr
error("%s", message.c_str());
}
+ // Just show warnings then these occur:
#ifdef ENABLE_16BIT
if (gfxError & OSystem::kTransactionPixelFormatNotSupported) {
Common::String message = "Could not initialize color format.";
- GUIErrorMessage(message);
- error("%s", message.c_str());
+ GUI::MessageDialog dialog(message);
+ dialog.runModal();
}
#endif
- // Just show warnings then these occur:
if (gfxError & OSystem::kTransactionModeSwitchFailed) {
Common::String message = "Could not switch to video mode: '";
message += ConfMan.get("gfx_mode");