aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/sci.cpp
diff options
context:
space:
mode:
authorWillem Jan Palenstijn2009-06-26 22:30:52 +0000
committerWillem Jan Palenstijn2009-06-26 22:30:52 +0000
commit70c9731810b28e910270429b2e5d16e2fe92f604 (patch)
tree66a6e81babf934f43c1d7be17ee8d6c3a9a3e655 /engines/sci/sci.cpp
parent27e50db5d7cdbed498d6a61b1ee1ad5405ce33a2 (diff)
downloadscummvm-rg350-70c9731810b28e910270429b2e5d16e2fe92f604.tar.gz
scummvm-rg350-70c9731810b28e910270429b2e5d16e2fe92f604.tar.bz2
scummvm-rg350-70c9731810b28e910270429b2e5d16e2fe92f604.zip
SCI: starting to restore RGB color functionality
svn-id: r41904
Diffstat (limited to 'engines/sci/sci.cpp')
-rw-r--r--engines/sci/sci.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp
index f58d729bf6..44ad13b93e 100644
--- a/engines/sci/sci.cpp
+++ b/engines/sci/sci.cpp
@@ -102,7 +102,15 @@ SciEngine::~SciEngine() {
}
Common::Error SciEngine::run() {
+ Graphics::PixelFormat gfxmode;
+#ifdef ENABLE_RGB_COLOR
+ gfxmode = _system->getSupportedFormats().front();
+ initGraphics(320, 200, false, gfxmode);
+ // TODO: check if this succeeded? (How?)
+#else
+ gfxmode = Graphics::PixelFormat::createFormatCLUT8();
initGraphics(320, 200, false);
+#endif
// Create debugger console. It requires GFX to be initialized
_console = new Console(this);
@@ -222,7 +230,7 @@ Common::Error SciEngine::run() {
#endif
bool isVGA = _resmgr->_sciVersion >= SCI_VERSION_01_VGA && !(getFlags() & GF_SCI1_EGA);
- if (gfxop_init(_resmgr->_sciVersion, isVGA, &gfx_state, &gfx_options, _resmgr)) {
+ if (gfxop_init(_resmgr->_sciVersion, isVGA, &gfx_state, &gfx_options, _resmgr, gfxmode, 1, 1)) {
warning("Graphics initialization failed. Aborting...");
return Common::kUnknownError;
}