diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp index 3f5548aac7d..bc9ad362abf 100644 --- a/engines/sci/console.cpp +++ b/engines/sci/console.cpp @@ -209,6 +209,8 @@ Console::Console(SciEngine *engine) : GUI::Debugger(), registerCmd("bpe", WRAP_METHOD(Console, cmdBreakpointFunction)); // alias // VM registerCmd("script_steps", WRAP_METHOD(Console, cmdScriptSteps)); + registerCmd("script_strings", WRAP_METHOD(Console, cmdScriptStrings)); + registerCmd("scrs", WRAP_METHOD(Console, cmdScriptStrings)); registerCmd("vm_varlist", WRAP_METHOD(Console, cmdVMVarlist)); registerCmd("vmvarlist", WRAP_METHOD(Console, cmdVMVarlist)); // alias registerCmd("vl", WRAP_METHOD(Console, cmdVMVarlist)); // alias @@ -2828,6 +2830,71 @@ bool Console::cmdScriptSteps(int argc, const char **argv) { return true; } +bool Console::cmdScriptStrings(int argc, const char **argv) { + SegManager *segMan = _engine->_gamestate->_segMan; + int curScriptNr = -1; + SegmentId curSegmentNr; + Common::List segmentNrList; + + SegmentType curSegmentType = SEG_TYPE_INVALID; + SegmentObj *curSegmentObj = NULL; + Script *curScriptObj = NULL; + + if (argc < 2) { + debugPrintf("Shows the strings inside a specified script.\n"); + debugPrintf("Usage: %s