diff options
author | Max Horn | 2003-10-26 19:16:59 +0000 |
---|---|---|
committer | Max Horn | 2003-10-26 19:16:59 +0000 |
commit | d581c99ab5caebc8029eea4a14834af2b989faac (patch) | |
tree | 61f48bf8c3a3204b799d59e1f911808f458ed2a2 /sword2/console.cpp | |
parent | b2ea1994bbed76143df1a7669faed946a9d5645c (diff) | |
download | scummvm-rg350-d581c99ab5caebc8029eea4a14834af2b989faac.tar.gz scummvm-rg350-d581c99ab5caebc8029eea4a14834af2b989faac.tar.bz2 scummvm-rg350-d581c99ab5caebc8029eea4a14834af2b989faac.zip |
cleanup
svn-id: r10982
Diffstat (limited to 'sword2/console.cpp')
-rw-r--r-- | sword2/console.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/sword2/console.cpp b/sword2/console.cpp index 4f5068ade1..f75b2e628f 100644 --- a/sword2/console.cpp +++ b/sword2/console.cpp @@ -59,6 +59,7 @@ Debugger::Debugger(Sword2Engine *s) { _detach_now = false; _isAttached = false; _errStr = NULL; + _debuggerDialog = NULL; // Register commands @@ -129,9 +130,9 @@ void Debugger::attach(const char *entry) { void Debugger::detach() { #if USE_CONSOLE - if (_vm->_debuggerDialog) { - _vm->_debuggerDialog->setInputeCallback(0, 0); - _vm->_debuggerDialog->setCompletionCallback(0, 0); + if (_debuggerDialog) { + _debuggerDialog->setInputCallback(0, 0); + _debuggerDialog->setCompletionCallback(0, 0); } #endif @@ -203,8 +204,8 @@ void Debugger::DCmd_Register(const char *cmdname, DebugProc pointer) { // Main Debugger Loop void Debugger::enter() { #if USE_CONSOLE - if (!_vm->_debuggerDialog) { - _vm->_debuggerDialog = new ConsoleDialog(_vm->_newgui, 1.0, 0.67F); + if (!_debuggerDialog) { + _debuggerDialog = new ConsoleDialog(_vm->_newgui, 1.0, 0.67F); Debug_Printf("Debugger started, type 'exit' to return to the game.\n"); Debug_Printf("Type 'help' to see a little list of commands and variables.\n"); @@ -216,9 +217,9 @@ void Debugger::enter() { _errStr = NULL; } - _vm->_debuggerDialog->setInputeCallback(debuggerInputCallback, this); - _vm->_debuggerDialog->setCompletionCallback(debuggerCompletionCallback, this); - _vm->_debuggerDialog->runModal(); + _debuggerDialog->setInputCallback(debuggerInputCallback, this); + _debuggerDialog->setCompletionCallback(debuggerCompletionCallback, this); + _debuggerDialog->runModal(); #else // TODO: compared to the console input, this here is very bare bone. // For example, no support for tab completion and no history. At least |