diff options
Diffstat (limited to 'engines/sci/sci.cpp')
-rw-r--r-- | engines/sci/sci.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp index 6c1b6e4dd6..00731fc1cf 100644 --- a/engines/sci/sci.cpp +++ b/engines/sci/sci.cpp @@ -46,7 +46,8 @@ #include "sci/graphics/animate.h" #include "sci/graphics/cache.h" #include "sci/graphics/compare.h" -#include "sci/graphics/controls.h" +#include "sci/graphics/controls16.h" +#include "sci/graphics/controls32.h" #include "sci/graphics/coordadjuster.h" #include "sci/graphics/cursor.h" #include "sci/graphics/maciconbar.h" @@ -90,6 +91,7 @@ SciEngine::SciEngine(OSystem *syst, const ADGameDescription *desc, SciGameId gam _vocabularyLanguage = 1; // we load english vocabulary on startup _eventMan = 0; _console = 0; + _opcode_formats = 0; // Set up the engine specific debug levels DebugMan.addDebugChannel(kDebugLevelError, "Error", "Script error debugging"); @@ -113,6 +115,7 @@ SciEngine::SciEngine(OSystem *syst, const ADGameDescription *desc, SciGameId gam DebugMan.addDebugChannel(kDebugLevelGC, "GC", "Garbage Collector debugging"); DebugMan.addDebugChannel(kDebugLevelResMan, "ResMan", "Resource manager debugging"); DebugMan.addDebugChannel(kDebugLevelOnStartup, "OnStartup", "Enter debugger at start of game"); + DebugMan.addDebugChannel(kDebugLevelDebugMode, "DebugMode", "Enable game debug mode at start of game"); const Common::FSNode gameDataDir(ConfMan.get("path")); @@ -147,12 +150,13 @@ SciEngine::~SciEngine() { DebugMan.clearAllDebugChannels(); #ifdef ENABLE_SCI32 + delete _gfxControls32; delete _gfxText32; delete _robotDecoder; delete _gfxFrameout; #endif delete _gfxMenu; - delete _gfxControls; + delete _gfxControls16; delete _gfxText16; delete _gfxAnimate; delete _gfxPaint; @@ -176,6 +180,9 @@ SciEngine::~SciEngine() { delete _eventMan; delete _gamestate->_segMan; delete _gamestate; + + delete[] _opcode_formats; + delete _resMan; // should be deleted last g_sci = 0; } @@ -588,7 +595,7 @@ void SciEngine::initGraphics() { _gfxAnimate = 0; _gfxCache = 0; _gfxCompare = 0; - _gfxControls = 0; + _gfxControls16 = 0; _gfxCoordAdjuster = 0; _gfxCursor = 0; _gfxMacIconBar = 0; @@ -600,6 +607,7 @@ void SciEngine::initGraphics() { _gfxText16 = 0; _gfxTransitions = 0; #ifdef ENABLE_SCI32 + _gfxControls32 = 0; _gfxText32 = 0; _robotDecoder = 0; _gfxFrameout = 0; @@ -609,16 +617,7 @@ void SciEngine::initGraphics() { if (hasMacIconBar()) _gfxMacIconBar = new GfxMacIconBar(); - bool paletteMerging = true; - if (getSciVersion() >= SCI_VERSION_1_1) { - // there are some games that use inbetween SCI1.1 interpreter, so we have to detect if it's merging or copying - if (getSciVersion() == SCI_VERSION_1_1) - paletteMerging = _resMan->detectForPaletteMergingForSci11(); - else - paletteMerging = false; - } - - _gfxPalette = new GfxPalette(_resMan, _gfxScreen, paletteMerging); + _gfxPalette = new GfxPalette(_resMan, _gfxScreen); _gfxCache = new GfxCache(_resMan, _gfxScreen, _gfxPalette); _gfxCursor = new GfxCursor(_resMan, _gfxPalette, _gfxScreen); @@ -631,6 +630,7 @@ void SciEngine::initGraphics() { _gfxPaint32 = new GfxPaint32(_resMan, _gamestate->_segMan, _kernel, _gfxCoordAdjuster, _gfxCache, _gfxScreen, _gfxPalette); _gfxPaint = _gfxPaint32; _gfxText32 = new GfxText32(_gamestate->_segMan, _gfxCache, _gfxScreen); + _gfxControls32 = new GfxControls32(_gamestate->_segMan, _gfxCache, _gfxScreen, _gfxText32); _robotDecoder = new RobotDecoder(g_system->getMixer(), getPlatform() == Common::kPlatformMacintosh); _gfxFrameout = new GfxFrameout(_gamestate->_segMan, _resMan, _gfxCoordAdjuster, _gfxCache, _gfxScreen, _gfxPalette, _gfxPaint32); } else { @@ -645,7 +645,7 @@ void SciEngine::initGraphics() { _gfxPaint = _gfxPaint16; _gfxAnimate = new GfxAnimate(_gamestate, _gfxCache, _gfxPorts, _gfxPaint16, _gfxScreen, _gfxPalette, _gfxCursor, _gfxTransitions); _gfxText16 = new GfxText16(_resMan, _gfxCache, _gfxPorts, _gfxPaint16, _gfxScreen); - _gfxControls = new GfxControls(_gamestate->_segMan, _gfxPorts, _gfxPaint16, _gfxText16, _gfxScreen); + _gfxControls16 = new GfxControls16(_gamestate->_segMan, _gfxPorts, _gfxPaint16, _gfxText16, _gfxScreen); _gfxMenu = new GfxMenu(_eventMan, _gamestate->_segMan, _gfxPorts, _gfxPaint16, _gfxText16, _gfxScreen, _gfxCursor); _gfxMenu->reset(); |