From 84b910f7559aac2af505a9ff8761fa9e31cb9bf7 Mon Sep 17 00:00:00 2001 From: Martin Kiewitz Date: Tue, 8 Dec 2009 21:22:22 +0000 Subject: SCI: new USE_OLDGFX for switching to oldgui, fixes loading of savedgames under oldgui, oldgui doesn't like calling of setPortPic during loading svn-id: r46294 --- engines/sci/engine/savegame.cpp | 6 ++++-- engines/sci/sci.cpp | 8 +++++--- engines/sci/sci.h | 2 ++ 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp index f6ce7da4b7..0f88f3f9aa 100644 --- a/engines/sci/engine/savegame.cpp +++ b/engines/sci/engine/savegame.cpp @@ -351,8 +351,10 @@ void EngineState::saveLoadWithSerializer(Common::Serializer &s) { s.syncAsSint16LE(picPortTop); s.syncAsSint16LE(picPortLeft); - if (s.isLoading()) - _gui->setPortPic(picPortRect, picPortTop, picPortLeft, true); + #ifndef USE_OLDGFX + if (s.isLoading()) + _gui->setPortPic(picPortRect, picPortTop, picPortLeft, true); + #endif } sync_SegManagerPtr(s, resMan, _segMan); diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp index 0bd1f0cf81..f2f2c6e218 100644 --- a/engines/sci/sci.cpp +++ b/engines/sci/sci.cpp @@ -145,9 +145,11 @@ Common::Error SciEngine::run() { return Common::kUnknownError; #ifdef INCLUDE_OLDGFX - // Gui change - _gamestate->_gui = new SciGui(_gamestate, screen, palette, cursor); // new - //_gamestate->_gui = new SciGui32(_gamestate, screen, palette, cursor); // old + #ifndef USE_OLDGFX + _gamestate->_gui = new SciGui(_gamestate, screen, palette, cursor); // new + #else + _gamestate->_gui = new SciGui32(_gamestate, screen, palette, cursor); // old + #endif #else _gamestate->_gui = new SciGui(_gamestate, screen, palette, cursor); #endif diff --git a/engines/sci/sci.h b/engines/sci/sci.h index addf193f7c..320bb91171 100644 --- a/engines/sci/sci.h +++ b/engines/sci/sci.h @@ -42,6 +42,8 @@ struct ADGameDescription; namespace Sci { #define INCLUDE_OLDGFX +// Please uncomment this if you want to use oldgui +//#define USE_OLDGFX class Console; struct EngineState; -- cgit v1.2.3