aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorMax Horn2003-10-26 19:16:59 +0000
committerMax Horn2003-10-26 19:16:59 +0000
commitd581c99ab5caebc8029eea4a14834af2b989faac (patch)
tree61f48bf8c3a3204b799d59e1f911808f458ed2a2 /scumm
parentb2ea1994bbed76143df1a7669faed946a9d5645c (diff)
downloadscummvm-rg350-d581c99ab5caebc8029eea4a14834af2b989faac.tar.gz
scummvm-rg350-d581c99ab5caebc8029eea4a14834af2b989faac.tar.bz2
scummvm-rg350-d581c99ab5caebc8029eea4a14834af2b989faac.zip
cleanup
svn-id: r10982
Diffstat (limited to 'scumm')
-rw-r--r--scumm/debugger.cpp19
-rw-r--r--scumm/debugger.h3
-rw-r--r--scumm/scumm.h4
-rw-r--r--scumm/scummvm.cpp2
4 files changed, 13 insertions, 15 deletions
diff --git a/scumm/debugger.cpp b/scumm/debugger.cpp
index bd7b1a9ba9..fa8973df8a 100644
--- a/scumm/debugger.cpp
+++ b/scumm/debugger.cpp
@@ -35,7 +35,7 @@
#if USE_CONSOLE
#include "gui/console.h"
- #define Debug_Printf _vm->_debuggerDialog->printf
+ #define Debug_Printf _debuggerDialog->printf
#else
#define Debug_Printf printf
#endif
@@ -56,6 +56,7 @@ ScummDebugger::ScummDebugger(ScummEngine *s) {
_detach_now = false;
_isAttached = false;
_errStr = NULL;
+ _debuggerDialog = NULL;
// Register variables
DVar_Register("debug_countdown", &_frame_countdown, DVAR_INT, 0);
@@ -120,9 +121,9 @@ void ScummDebugger::attach(const char *entry) {
void ScummDebugger::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
@@ -197,8 +198,8 @@ void ScummDebugger::DCmd_Register(const char *cmdname, DebugProc pointer) {
// Main Debugger Loop
void ScummDebugger::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");
@@ -210,9 +211,9 @@ void ScummDebugger::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
diff --git a/scumm/debugger.h b/scumm/debugger.h
index 208871c058..9252f79bb8 100644
--- a/scumm/debugger.h
+++ b/scumm/debugger.h
@@ -21,6 +21,8 @@
#ifndef DEBUG_H
#define DEBUG_H
+class ConsoleDialog;
+
namespace Scumm {
// Choose between text console or ScummConsole
@@ -66,6 +68,7 @@ protected:
bool _detach_now;
bool _isAttached;
char *_errStr;
+ ConsoleDialog *_debuggerDialog;
void enter();
void detach();
diff --git a/scumm/scumm.h b/scumm/scumm.h
index a4aacd9a9b..499b667a57 100644
--- a/scumm/scumm.h
+++ b/scumm/scumm.h
@@ -32,7 +32,6 @@
#include "scumm/gfx.h"
#include "scumm/script.h"
-class ConsoleDialog;
class Dialog;
class GameDetector;
class NewGui;
@@ -349,9 +348,6 @@ protected:
Dialog *_optionsDialog;
Dialog *_saveLoadDialog;
Dialog *_confirmExitDialog;
-public:
- // Debugger access this one, too...
- ConsoleDialog *_debuggerDialog;
protected:
int runDialog(Dialog &dialog);
diff --git a/scumm/scummvm.cpp b/scumm/scummvm.cpp
index 8f9546d49d..ffb733419f 100644
--- a/scumm/scummvm.cpp
+++ b/scumm/scummvm.cpp
@@ -29,7 +29,6 @@
#include "common/config-manager.h"
-#include "gui/console.h"
#include "gui/message.h"
#include "gui/newgui.h"
@@ -299,7 +298,6 @@ ScummEngine::ScummEngine(GameDetector *detector, OSystem *syst)
_optionsDialog = NULL;
_saveLoadDialog = NULL;
_confirmExitDialog = NULL;
- _debuggerDialog = NULL;
_fastMode = 0;
_actors = NULL;
_inventory = NULL;