[Scummvm-cvs-logs] SF.net SVN: scummvm:[41727] scummvm/trunk/engines/sci
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Sun Jun 21 15:06:08 CEST 2009
Revision: 41727
http://scummvm.svn.sourceforge.net/scummvm/?rev=41727&view=rev
Author: thebluegr
Date: 2009-06-21 13:06:08 +0000 (Sun, 21 Jun 2009)
Log Message:
-----------
Cleanup
Modified Paths:
--------------
scummvm/trunk/engines/sci/console.cpp
scummvm/trunk/engines/sci/console.h
scummvm/trunk/engines/sci/engine/scriptdebug.cpp
Modified: scummvm/trunk/engines/sci/console.cpp
===================================================================
--- scummvm/trunk/engines/sci/console.cpp 2009-06-21 11:53:11 UTC (rev 41726)
+++ scummvm/trunk/engines/sci/console.cpp 2009-06-21 13:06:08 UTC (rev 41727)
@@ -55,15 +55,6 @@
int g_debug_seek_special = 0; // Used for special seeks
int g_debug_seek_level = 0; // Used for seekers that want to check their exec stack depth
-enum DebugSeeking {
- kDebugSeekNothing = 0,
- kDebugSeekCallk = 1, // Step forward until callk is found
- kDebugSeekLevelRet = 2, // Step forward until returned from this level
- kDebugSeekSpecialCallk = 3, // Step forward until a /special/ callk is found
- kDebugSeekSO = 4, // Step forward until specified PC (after the send command) and stack depth
- kDebugSeekGlobal = 5 // Step forward until one specified global variable is modified
-};
-
Console::Console(SciEngine *vm) : GUI::Debugger() {
_vm = vm;
Modified: scummvm/trunk/engines/sci/console.h
===================================================================
--- scummvm/trunk/engines/sci/console.h 2009-06-21 11:53:11 UTC (rev 41726)
+++ scummvm/trunk/engines/sci/console.h 2009-06-21 13:06:08 UTC (rev 41727)
@@ -35,6 +35,15 @@
class SciEngine;
struct List;
+enum DebugSeeking {
+ kDebugSeekNothing = 0,
+ kDebugSeekCallk = 1, // Step forward until callk is found
+ kDebugSeekLevelRet = 2, // Step forward until returned from this level
+ kDebugSeekSpecialCallk = 3, // Step forward until a /special/ callk is found
+ kDebugSeekSO = 4, // Step forward until specified PC (after the send command) and stack depth
+ kDebugSeekGlobal = 5 // Step forward until one specified global variable is modified
+};
+
// Refer to the "addresses" command on how to pass address parameters
int parse_reg_t(EngineState *s, const char *str, reg_t *dest);
int printObject(EngineState *s, reg_t pos);
Modified: scummvm/trunk/engines/sci/engine/scriptdebug.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/scriptdebug.cpp 2009-06-21 11:53:11 UTC (rev 41726)
+++ scummvm/trunk/engines/sci/engine/scriptdebug.cpp 2009-06-21 13:06:08 UTC (rev 41727)
@@ -26,25 +26,10 @@
// Script debugger functionality. Absolutely not threadsafe.
#include "sci/sci.h"
+#include "sci/console.h"
#include "sci/debug.h"
#include "sci/engine/state.h"
-#include "sci/engine/gc.h"
-#include "sci/engine/kernel_types.h"
-#include "sci/engine/kernel.h"
-#include "sci/engine/savegame.h"
-#include "sci/gfx/gfx_widgets.h"
-#include "sci/gfx/gfx_gui.h"
-#include "sci/gfx/gfx_state_internal.h" // required for GfxContainer, GfxPort, GfxVisual
-#include "sci/resource.h"
-#include "sci/vocabulary.h"
-#include "sci/sfx/iterator.h"
-#include "sci/sfx/sci_midi.h"
-#include "common/util.h"
-#include "common/savefile.h"
-
-#include "sound/audiostream.h"
-
namespace Sci {
int g_debugstate_valid = 0; // Set to 1 while script_debug is running
@@ -63,13 +48,13 @@
extern const char *selector_name(EngineState *s, int selector);
-int prop_ofs_to_id(EngineState *s, int prop_ofs, reg_t objp) {
+int propertyOffsetToId(EngineState *s, int prop_ofs, reg_t objp) {
Object *obj = obj_get(s, objp);
byte *selectoroffset;
int selectors;
if (!obj) {
- sciprintf("Applied prop_ofs_to_id on non-object at %04x:%04x\n", PRINT_REG(objp));
+ sciprintf("Applied propertyOffsetToId on non-object at %04x:%04x\n", PRINT_REG(objp));
return -1;
}
@@ -86,7 +71,7 @@
}
if (prop_ofs < 0 || (prop_ofs >> 1) >= selectors) {
- sciprintf("Applied prop_ofs_to_id to invalid property offset %x (property #%d not in [0..%d]) on object at %04x:%04x\n",
+ sciprintf("Applied propertyOffsetToId to invalid property offset %x (property #%d not in [0..%d]) on object at %04x:%04x\n",
prop_ofs, prop_ofs >> 1, selectors - 1, PRINT_REG(objp));
return -1;
}
@@ -257,7 +242,7 @@
if ((opcode == op_pTos) || (opcode == op_sTop) || (opcode == op_pToa) || (opcode == op_aTop) ||
(opcode == op_dpToa) || (opcode == op_ipToa) || (opcode == op_dpTos) || (opcode == op_ipTos)) {
int prop_ofs = scr[pos.offset + 1];
- int prop_id = prop_ofs_to_id(s, prop_ofs, *p_objp);
+ int prop_id = propertyOffsetToId(s, prop_ofs, *p_objp);
sciprintf(" (%s)", selector_name(s, prop_id));
}
@@ -342,8 +327,6 @@
void script_debug(EngineState *s, reg_t *pc, StackPtr *sp, StackPtr *pp, reg_t *objp, int *restadjust,
SegmentId *segids, reg_t **variables, reg_t **variables_base, int *variables_nr, int bp) {
-// TODO: disabled till this is moved in console.cpp
-#if 0
// Do we support a separate console?
int old_debugstate = g_debugstate_valid;
@@ -412,7 +395,6 @@
// OK, found whatever we were looking for
}
}
-#endif
g_debugstate_valid = (g_debug_step_running == 0);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list