diff options
author | Eugene Sandulenko | 2005-09-22 22:55:01 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2005-09-22 22:55:01 +0000 |
commit | 81b46b626853516983c9e336f6996c85fbd781d2 (patch) | |
tree | 7fea1b8dc0165f897d0cdaa5f962c5736a6a4a30 | |
parent | 2b1d4ef990c0a822da7838aa3261bbb7f48b2fba (diff) | |
download | scummvm-rg350-81b46b626853516983c9e336f6996c85fbd781d2.tar.gz scummvm-rg350-81b46b626853516983c9e336f6996c85fbd781d2.tar.bz2 scummvm-rg350-81b46b626853516983c9e336f6996c85fbd781d2.zip |
Fix regression introduced when we split engine constructiors into
constructor itself and init() method. debug() and error() are dependent
on _debug object in many engines, so if these methods were called on early
stage, scummvm crashed.
svn-id: r18860
-rw-r--r-- | queen/queen.cpp | 2 | ||||
-rw-r--r-- | scumm/scumm.cpp | 4 | ||||
-rw-r--r-- | simon/simon.cpp | 2 | ||||
-rw-r--r-- | sky/sky.cpp | 2 |
4 files changed, 6 insertions, 4 deletions
diff --git a/queen/queen.cpp b/queen/queen.cpp index 1d34f7f693..a48a036e61 100644 --- a/queen/queen.cpp +++ b/queen/queen.cpp @@ -135,7 +135,7 @@ REGISTER_PLUGIN(QUEEN, "Flight of the Amazon Queen") namespace Queen { QueenEngine::QueenEngine(GameDetector *detector, OSystem *syst) - : Engine(syst) { + : Engine(syst), _debugger(0) { } QueenEngine::~QueenEngine() { diff --git a/scumm/scumm.cpp b/scumm/scumm.cpp index 1787e6b2dd..7914a565cb 100644 --- a/scumm/scumm.cpp +++ b/scumm/scumm.cpp @@ -826,6 +826,8 @@ ScummEngine::ScummEngine(GameDetector *detector, OSystem *syst, const ScummGameS _platform(gs.platform), _substResFileNameIndex(substResFileNameIndex), _substResFileNameIndexBundle(0), + _debugger(0), + _currentScript(0xFF), // Let debug() work on init stage gdi(this), res(this), _pauseDialog(0), _mainMenuDialog(0), _versionDialog(0), @@ -933,7 +935,6 @@ ScummEngine::ScummEngine(GameDetector *detector, OSystem *syst, const ScummGameS _musicEngine = NULL; _verbs = NULL; _objs = NULL; - _debugger = NULL; _debugFlags = 0; _sound = NULL; memset(&vm, 0, sizeof(vm)); @@ -1009,7 +1010,6 @@ ScummEngine::ScummEngine(GameDetector *detector, OSystem *syst, const ScummGameS _scriptOrgPointer = NULL; _opcode = 0; vm.numNestedScripts = 0; - _currentScript = 0; _curExecScript = 0; _lastCodePtr = NULL; _resultVarNumber = 0; diff --git a/simon/simon.cpp b/simon/simon.cpp index 1cabe29182..51fcfbcb0c 100644 --- a/simon/simon.cpp +++ b/simon/simon.cpp @@ -276,6 +276,8 @@ SimonEngine::SimonEngine(GameDetector *detector, OSystem *syst) _vc_get_out_of_code = 0; _gameOffsetsPtr = 0; + _debugger = 0; + const SimonGameSettings *g = simon_settings; while (g->name) { if (!scumm_stricmp(detector->_game.name, g->name)) diff --git a/sky/sky.cpp b/sky/sky.cpp index 6ba394b3db..2a20acbb96 100644 --- a/sky/sky.cpp +++ b/sky/sky.cpp @@ -118,7 +118,7 @@ void *SkyEngine::_itemList[300]; SystemVars SkyEngine::_systemVars = {0, 0, 0, 0, 4316, 0, 0, false, false, false }; SkyEngine::SkyEngine(GameDetector *detector, OSystem *syst) - : Engine(syst), _fastMode(0) { + : Engine(syst), _fastMode(0), _debugger(0) { } SkyEngine::~SkyEngine() { |