diff options
author | Filippos Karapetis | 2009-05-30 10:22:53 +0000 |
---|---|---|
committer | Filippos Karapetis | 2009-05-30 10:22:53 +0000 |
commit | 56c0a41b71256118eda1ffa08f2317aba673faf9 (patch) | |
tree | 90a119557e31581489fe4b368ff3cc8883959287 /engines/sci/engine/scriptdebug.cpp | |
parent | 4960b64b484d3e80258feedea3f711704d7e0743 (diff) | |
download | scummvm-rg350-56c0a41b71256118eda1ffa08f2317aba673faf9.tar.gz scummvm-rg350-56c0a41b71256118eda1ffa08f2317aba673faf9.tar.bz2 scummvm-rg350-56c0a41b71256118eda1ffa08f2317aba673faf9.zip |
SCI: Moved the rest of the console code out of sciconsole.cpp and into console.cpp. "list" and "hexgrep" have been added to the console commands. parse_reg_t() has been moved to kmovement.cpp (as it's the only code using it). Note that the debug commands in scriptdebug.cpp have not been converted yet, so they don't work at the moment
svn-id: r41024
Diffstat (limited to 'engines/sci/engine/scriptdebug.cpp')
-rw-r--r-- | engines/sci/engine/scriptdebug.cpp | 32 |
1 files changed, 28 insertions, 4 deletions
diff --git a/engines/sci/engine/scriptdebug.cpp b/engines/sci/engine/scriptdebug.cpp index f066dcbe2c..2ddac786c9 100644 --- a/engines/sci/engine/scriptdebug.cpp +++ b/engines/sci/engine/scriptdebug.cpp @@ -32,7 +32,6 @@ #include "sci/engine/kernel_types.h" #include "sci/engine/kernel.h" #include "sci/engine/savegame.h" -#include "sci/engine/sciconsole.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 @@ -82,6 +81,24 @@ int _kdebug_cheap_soundcue_hack = -1; char inputbuf[256] = ""; +union cmd_param_t { + int32 val; + const char *str; + reg_t reg; +}; + +typedef int (*ConCommand)(EngineState *s, const Common::Array<cmd_param_t> &cmdParams); + +struct cmd_mm_entry_t { + const char *name; + const char *description; +}; // All later structures must "extend" this + +struct cmd_command_t : public cmd_mm_entry_t { + ConCommand command; + const char *param; +}; + #if 0 // Unused #define LOOKUP_SPECIES(species) (\ @@ -89,6 +106,12 @@ char inputbuf[256] = ""; + s->_classtable[species].class_offset) #endif +// Dummy function, so that it compiles +int con_hook_command(ConCommand command, const char *name, const char *param, const char *description) { + + return 0; +} + static const char *_debug_get_input() { char newinpbuf[256]; @@ -3200,7 +3223,7 @@ void script_debug(EngineState *s, reg_t *pc, StackPtr *sp, StackPtr *pp, reg_t * " gc-list-freeable.1, gc-list-reachable.1,\n" " gc.1, gc-normalise.1"); - +/* con_hook_int(&script_debug_flag, "script_debug_flag", "Set != 0 to enable debugger\n"); con_hook_int(&script_checkloads_flag, "script_checkloads_flag", "Set != 0 to display information\n" " when scripts are loaded or unloaded"); @@ -3213,6 +3236,7 @@ void script_debug(EngineState *s, reg_t *pc, StackPtr *sp, StackPtr *pp, reg_t * con_hook_int(&script_gc_interval, "gc-interval", "Number of kernel calls in between gcs"); con_hook_int(&debug_sleeptime_factor, "sleep-factor", "Factor to multiply with wait times\n Set to 0 to speed up games"); +*/ } // If commands were not hooked up } @@ -3232,8 +3256,8 @@ void script_debug(EngineState *s, reg_t *pc, StackPtr *sp, StackPtr *pp, reg_t * if (commandstring && (commandstring[0] == '.' || commandstring[0] == ':')) skipfirst = 1; - if (commandstring && commandstring[0] != ':') - con_parse(s, commandstring + skipfirst); + //if (commandstring && commandstring[0] != ':') + // con_parse(s, commandstring + skipfirst); sciprintf("\n"); // Resume music playing |