[Scummvm-cvs-logs] CVS: scummvm/scumm script.cpp,1.54,1.55 scummvm.cpp,2.93,2.94 debugger.cpp,1.18,1.19 debugger.h,1.12,1.13 scumm.h,1.163,1.164

Jonathan Gray khalek at users.sourceforge.net
Sat Apr 19 23:56:03 CEST 2003


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

Modified Files:
	script.cpp scummvm.cpp debugger.cpp debugger.h scumm.h 
Log Message:
add script hex dumping option to debugger

Index: script.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script.cpp,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -d -r1.54 -r1.55
--- script.cpp	18 Apr 2003 21:10:32 -0000	1.54
+++ script.cpp	20 Apr 2003 06:55:08 -0000	1.55
@@ -285,6 +285,8 @@
 				_scriptPointer - _scriptOrgPointer,
 				_opcode,
 				getOpcodeDesc(_opcode));
+		if (_hexdumpScripts == true)
+			hexdump(_scriptPointer - 1, 8);
 		executeOpcode(_opcode);
 	}
 	CHECK_HEAP;

Index: scummvm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scummvm.cpp,v
retrieving revision 2.93
retrieving revision 2.94
diff -u -d -r2.93 -r2.94
--- scummvm.cpp	18 Apr 2003 20:16:32 -0000	2.93
+++ scummvm.cpp	20 Apr 2003 06:55:09 -0000	2.94
@@ -202,6 +202,7 @@
 	_expire_counter = 0;
 	_dynamicRoomOffsets = 0;
 	_shakeEnabled = 0;
+	_hexdumpScripts = 0;
 
 	if (_gameId == GID_ZAK256) {	// FmTowns is 320x240
 		_realWidth = 320;

Index: debugger.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/debugger.cpp,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- debugger.cpp	6 Mar 2003 21:45:54 -0000	1.18
+++ debugger.cpp	20 Apr 2003 06:55:09 -0000	1.19
@@ -87,6 +87,9 @@
 
 		DCmd_Register("level", &ScummDebugger::Cmd_DebugLevel);
 		DCmd_Register("help", &ScummDebugger::Cmd_Help);
+
+		DCmd_Register("show", &ScummDebugger::Cmd_Show);
+		DCmd_Register("hide", &ScummDebugger::Cmd_Hide);
 	}
 }
 
@@ -318,6 +321,34 @@
 	} else
 		Debug_Printf("Syntax: savegame <slotnum> <name>\n");
 
+	return true;
+}
+
+bool ScummDebugger::Cmd_Show(int argc, const char **argv) {
+
+	if (argc != 2) {
+		Debug_Printf("Syntax: show <parameter>\n");
+		return true;
+	}
+	
+	if (!strcmp(argv[1], "hex")) {
+		_s->_hexdumpScripts = true;
+		Debug_Printf("Script hex dumping on\n");
+	}
+	return true;
+}
+
+bool ScummDebugger::Cmd_Hide(int argc, const char **argv) {
+
+	if (argc != 2) {
+		Debug_Printf("Syntax: hide <parameter>\n");
+		return true;
+	}
+	
+	if (!strcmp(argv[1], "hex")) {
+		_s->_hexdumpScripts = false;
+		Debug_Printf("Script hex dumping off\n");
+	}
 	return true;
 }
 

Index: debugger.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/debugger.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- debugger.h	6 Mar 2003 21:45:55 -0000	1.12
+++ debugger.h	20 Apr 2003 06:55:09 -0000	1.13
@@ -81,6 +81,9 @@
 	
 	bool Cmd_DebugLevel(int argc, const char **argv);
 	bool Cmd_Help(int argc, const char **argv);
+
+	bool Cmd_Show(int argc, const char **argv);
+	bool Cmd_Hide(int argc, const char **argv);
 	
 	void printBox(int box);
 

Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.h,v
retrieving revision 1.163
retrieving revision 1.164
diff -u -d -r1.163 -r1.164
--- scumm.h	12 Apr 2003 02:09:00 -0000	1.163
+++ scumm.h	20 Apr 2003 06:55:09 -0000	1.164
@@ -420,7 +420,7 @@
 
 	int16 _virtual_mouse_x, _virtual_mouse_y;
 	int _bootParam;
-	bool _dumpScripts;
+	bool _dumpScripts, _hexdumpScripts;
 	uint16 _debugMode, _soundCardType;
 
 	/* Not sure where this stuff goes */





More information about the Scummvm-git-logs mailing list