[Scummvm-cvs-logs] CVS: scummvm/scumm debugger.cpp,1.94,1.95 debugger.h,1.30,1.31 scumm.h,1.316,1.317 scummvm.cpp,2.457,2.458

Max Horn fingolfin at users.sourceforge.net
Sun Oct 26 11:18:04 CET 2003


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv20075/scumm

Modified Files:
	debugger.cpp debugger.h scumm.h scummvm.cpp 
Log Message:
cleanup

Index: debugger.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/debugger.cpp,v
retrieving revision 1.94
retrieving revision 1.95
diff -u -d -r1.94 -r1.95
--- debugger.cpp	12 Oct 2003 19:10:16 -0000	1.94
+++ debugger.cpp	26 Oct 2003 19:16:58 -0000	1.95
@@ -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 @@
 	_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::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 @@
 // 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 @@
 		_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

Index: debugger.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/debugger.h,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- debugger.h	26 Oct 2003 17:50:45 -0000	1.30
+++ debugger.h	26 Oct 2003 19:16:58 -0000	1.31
@@ -21,6 +21,8 @@
 #ifndef DEBUG_H
 #define DEBUG_H
 
+class ConsoleDialog;
+
 namespace Scumm {
 
 // Choose between text console or ScummConsole
@@ -66,6 +68,7 @@
 	bool _detach_now;
 	bool _isAttached;
 	char *_errStr;
+	ConsoleDialog *_debuggerDialog;
 
 	void enter();
 	void detach();

Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.h,v
retrieving revision 1.316
retrieving revision 1.317
diff -u -d -r1.316 -r1.317
--- scumm.h	17 Oct 2003 16:28:29 -0000	1.316
+++ scumm.h	26 Oct 2003 19:16:58 -0000	1.317
@@ -32,7 +32,6 @@
 #include "scumm/gfx.h"
 #include "scumm/script.h"
 
-class ConsoleDialog;
 class Dialog;
 class GameDetector;
 class NewGui;
@@ -349,9 +348,6 @@
 	Dialog *_optionsDialog;
 	Dialog *_saveLoadDialog;
 	Dialog *_confirmExitDialog;
-public:
-	// Debugger access this one, too...
-	ConsoleDialog *_debuggerDialog;
 
 protected:
 	int runDialog(Dialog &dialog);

Index: scummvm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scummvm.cpp,v
retrieving revision 2.457
retrieving revision 2.458
diff -u -d -r2.457 -r2.458
--- scummvm.cpp	20 Oct 2003 12:24:12 -0000	2.457
+++ scummvm.cpp	26 Oct 2003 19:16:58 -0000	2.458
@@ -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 @@
 	_optionsDialog = NULL;
 	_saveLoadDialog = NULL;
 	_confirmExitDialog = NULL;
-	_debuggerDialog = NULL;
 	_fastMode = 0;
 	_actors = NULL;
 	_inventory = NULL;





More information about the Scummvm-git-logs mailing list