aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorJames Brown2004-01-14 10:02:33 +0000
committerJames Brown2004-01-14 10:02:33 +0000
commit8cc0b7163cd6b5beb08568aef7caf02836b4b317 (patch)
treed8e610d62a9663b3284dcfbbb00106638c882dfa /scumm
parent7bd3a5004988e10ff9e44ba09083a3cd8d82bfe9 (diff)
downloadscummvm-rg350-8cc0b7163cd6b5beb08568aef7caf02836b4b317.tar.gz
scummvm-rg350-8cc0b7163cd6b5beb08568aef7caf02836b4b317.tar.bz2
scummvm-rg350-8cc0b7163cd6b5beb08568aef7caf02836b4b317.zip
Move SCUMM debugger init later on. With this _numVariables is set, so theoretically the Debugger's scumm_vars[] array should work again. Although it
doesn't, for some reason I have yet to look into. svn-id: r12377
Diffstat (limited to 'scumm')
-rw-r--r--scumm/debugger.cpp2
-rw-r--r--scumm/scummvm.cpp8
2 files changed, 6 insertions, 4 deletions
diff --git a/scumm/debugger.cpp b/scumm/debugger.cpp
index 17fffe8f84..065474be20 100644
--- a/scumm/debugger.cpp
+++ b/scumm/debugger.cpp
@@ -70,7 +70,7 @@ ScummDebugger::ScummDebugger(ScummEngine *s)
DVar_Register("scumm_room", &_vm->_currentRoom, DVAR_INT, 0);
DVar_Register("scumm_roomresource", &_vm->_roomResource, DVAR_INT, 0);
DVar_Register("scumm_vars", &_vm->_scummVars, DVAR_INTARRAY, _vm->_numVariables);
-
+ printf("Registered debugger\n");
DVar_Register("scumm_gamename", &_vm->_targetName, DVAR_STRING, 0);
DVar_Register("scumm_exename", &_vm->_gameName, DVAR_STRING, 0);
DVar_Register("scumm_gameid", &_vm->_gameId, DVAR_INT, 0);
diff --git a/scumm/scummvm.cpp b/scumm/scummvm.cpp
index d4dc2c25cc..c1966c9794 100644
--- a/scumm/scummvm.cpp
+++ b/scumm/scummvm.cpp
@@ -709,9 +709,6 @@ ScummEngine::ScummEngine(GameDetector *detector, OSystem *syst, const ScummGameS
// Setup GDI object
gdi._numStrips = _screenWidth / 8;
- // Create debugger
- _debugger = new ScummDebugger(this);
-
_sound = new Sound(this);
#ifndef __GP32__ //ph0x FIXME, "quick dirty hack"
@@ -981,6 +978,11 @@ void ScummEngine::launch() {
}
_sound->setupSound();
+ // Create debugger
+ if (!_debugger)
+ _debugger = new ScummDebugger(this);
+
+
// If requested, load a save game instead of running the boot script
if (_saveLoadFlag != 2 || !loadState(_saveLoadSlot, _saveLoadCompatible)) {
if (_gameId == GID_MANIAC && _version == 1 && _demoMode)