From 935eaa175bb6df628f0118e70a59b895f65e92a1 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 19 Oct 2011 23:44:34 +0300 Subject: SCI: Move the palette merging checking code inside the GfxPalette class --- engines/sci/sci.cpp | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'engines/sci/sci.cpp') diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp index 6c1b6e4dd6..1d0d63870d 100644 --- a/engines/sci/sci.cpp +++ b/engines/sci/sci.cpp @@ -609,16 +609,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); -- cgit v1.2.3 From ac559b0212c21c7f4a3a10455b8dff211d7ebb87 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 26 Oct 2011 01:48:20 +0300 Subject: SCI: Renamed GfxControls to GfxControls16 --- engines/sci/sci.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'engines/sci/sci.cpp') diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp index 1d0d63870d..2dc8c95fec 100644 --- a/engines/sci/sci.cpp +++ b/engines/sci/sci.cpp @@ -46,7 +46,7 @@ #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/coordadjuster.h" #include "sci/graphics/cursor.h" #include "sci/graphics/maciconbar.h" @@ -152,7 +152,7 @@ SciEngine::~SciEngine() { delete _gfxFrameout; #endif delete _gfxMenu; - delete _gfxControls; + delete _gfxControls16; delete _gfxText16; delete _gfxAnimate; delete _gfxPaint; @@ -588,7 +588,7 @@ void SciEngine::initGraphics() { _gfxAnimate = 0; _gfxCache = 0; _gfxCompare = 0; - _gfxControls = 0; + _gfxControls16 = 0; _gfxCoordAdjuster = 0; _gfxCursor = 0; _gfxMacIconBar = 0; @@ -636,7 +636,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(); -- cgit v1.2.3 From 4ac2940bc59bbb192a5aa0636e590df4e71becad Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 28 Oct 2011 22:19:52 +0300 Subject: SCI: Added skeleton code for kEditText (still not working) --- engines/sci/sci.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'engines/sci/sci.cpp') diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp index 2dc8c95fec..d79ac86741 100644 --- a/engines/sci/sci.cpp +++ b/engines/sci/sci.cpp @@ -47,6 +47,7 @@ #include "sci/graphics/cache.h" #include "sci/graphics/compare.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" @@ -147,6 +148,7 @@ SciEngine::~SciEngine() { DebugMan.clearAllDebugChannels(); #ifdef ENABLE_SCI32 + delete _gfxControls32; delete _gfxText32; delete _robotDecoder; delete _gfxFrameout; @@ -600,6 +602,7 @@ void SciEngine::initGraphics() { _gfxText16 = 0; _gfxTransitions = 0; #ifdef ENABLE_SCI32 + _gfxControls32 = 0; _gfxText32 = 0; _robotDecoder = 0; _gfxFrameout = 0; @@ -622,6 +625,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); _robotDecoder = new RobotDecoder(g_system->getMixer(), getPlatform() == Common::kPlatformMacintosh); _gfxFrameout = new GfxFrameout(_gamestate->_segMan, _resMan, _gfxCoordAdjuster, _gfxCache, _gfxScreen, _gfxPalette, _gfxPaint32); } else { -- cgit v1.2.3 From 4f6996777374c8547d918074a8a8d79a961fcee0 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sat, 29 Oct 2011 18:31:53 +0300 Subject: SCI: Added a new debug flag, "DebugMode" for SCI32 games This is used to enable the embedded debugger in several SCI32 games (PQ4, QFG4, GK1, GK2, KQ7, SQ6 and LSL7) --- engines/sci/sci.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'engines/sci/sci.cpp') diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp index d79ac86741..51b50ebe20 100644 --- a/engines/sci/sci.cpp +++ b/engines/sci/sci.cpp @@ -114,6 +114,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")); -- cgit v1.2.3 From 9caacac724fa8b83b1949389bdeeba1ecb7fec6e Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sun, 30 Oct 2011 12:12:40 +0200 Subject: SCI: More work on kEditText --- engines/sci/sci.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/sci/sci.cpp') diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp index 51b50ebe20..6eeed66e4f 100644 --- a/engines/sci/sci.cpp +++ b/engines/sci/sci.cpp @@ -626,7 +626,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); + _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 { -- cgit v1.2.3 From 0192d2f2de5838ac380b4ec3c6f0a72a93a4bc2b Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Tue, 29 Nov 2011 18:34:25 +0100 Subject: SCI: Fix restarting SCI engine with different SCI version --- engines/sci/sci.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'engines/sci/sci.cpp') diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp index 6eeed66e4f..00731fc1cf 100644 --- a/engines/sci/sci.cpp +++ b/engines/sci/sci.cpp @@ -91,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"); @@ -179,6 +180,9 @@ SciEngine::~SciEngine() { delete _eventMan; delete _gamestate->_segMan; delete _gamestate; + + delete[] _opcode_formats; + delete _resMan; // should be deleted last g_sci = 0; } -- cgit v1.2.3