aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMartin Kiewitz2015-05-14 20:41:21 +0200
committerMartin Kiewitz2015-05-14 20:41:21 +0200
commit3183ef0854782fcdc8f7c0f32e4a0de4dc6e1c9a (patch)
tree30368c312557ad8750d515ddbbde50e208840e96 /engines
parentbfab4c4cbe3d857ef6a067440ea17baa8b30ec4d (diff)
downloadscummvm-rg350-3183ef0854782fcdc8f7c0f32e4a0de4dc6e1c9a.tar.gz
scummvm-rg350-3183ef0854782fcdc8f7c0f32e4a0de4dc6e1c9a.tar.bz2
scummvm-rg350-3183ef0854782fcdc8f7c0f32e4a0de4dc6e1c9a.zip
SCI: add said-details to script_said debug cmd
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/console.cpp7
-rw-r--r--engines/sci/engine/script.cpp21
-rw-r--r--engines/sci/engine/script.h5
3 files changed, 6 insertions, 27 deletions
diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp
index c7069709d4..1e95393e4d 100644
--- a/engines/sci/console.cpp
+++ b/engines/sci/console.cpp
@@ -2901,6 +2901,7 @@ bool Console::cmdScriptSaid(int argc, const char **argv) {
void Console::printOffsets(int scriptNr, uint16 showType) {
SegManager *segMan = _engine->_gamestate->_segMan;
+ Vocabulary *vocab = _engine->_vocabulary;
SegmentId curSegmentNr;
Common::List<SegmentId> segmentNrList;
@@ -2935,6 +2936,7 @@ void Console::printOffsets(int scriptNr, uint16 showType) {
reg_t objectPos;
const char *objectNamePtr = NULL;
const byte *stringPtr = NULL;
+ const byte *saidPtr = NULL;
Common::List<SegmentId>::iterator it;
const Common::List<SegmentId>::iterator end = segmentNrList.end();
@@ -2974,8 +2976,11 @@ void Console::printOffsets(int scriptNr, uint16 showType) {
debugN(" %03d:%04x: '%s' (size %d)\n", arrayIterator->id, arrayIterator->offset, stringPtr, arrayIterator->stringSize);
break;
case SCI_SCR_OFFSET_TYPE_SAID:
+ saidPtr = curScriptData + arrayIterator->offset;
debugPrintf(" %03d:%04x:\n", arrayIterator->id, arrayIterator->offset);
- debugN(" %03d:%04x:\n", arrayIterator->id, arrayIterator->offset);
+ debugN(" %03d:%04x: ", arrayIterator->id, arrayIterator->offset);
+ vocab->debugDecipherSaidBlock(saidPtr);
+ debugN("\n");
break;
default:
break;
diff --git a/engines/sci/engine/script.cpp b/engines/sci/engine/script.cpp
index fbf00abf9b..f2d00d90dd 100644
--- a/engines/sci/engine/script.cpp
+++ b/engines/sci/engine/script.cpp
@@ -541,27 +541,6 @@ void Script::identifyOffsets() {
}
}
-void Script::debugPrintStrings(Console *con) {
- offsetLookupArrayType::iterator it;
- const offsetLookupArrayType::iterator end = _offsetLookupArray.end();
- byte *stringPtr;
- int stringCount = 0;
-
- for (it = _offsetLookupArray.begin(); it != end; ++it) {
- if (it->type == SCI_SCR_OFFSET_TYPE_STRING) {
- stringPtr = _buf + it->offset;
- con->debugPrintf(" %03d:%04x: '%s' (size %d)\n", it->id, it->offset, stringPtr, it->stringSize);
- debugN(" %03d:%04x: '%s' (size %d)\n", it->id, it->offset, stringPtr, it->stringSize);
- stringCount++;
- }
- }
-
- if (stringCount == 0) {
- con->debugPrintf(" no strings\n");
- debugN(" no strings\n");
- }
-}
-
const byte *Script::getSci3ObjectsPointer() {
const byte *ptr = 0;
diff --git a/engines/sci/engine/script.h b/engines/sci/engine/script.h
index 3f24bb191b..abe6409b98 100644
--- a/engines/sci/engine/script.h
+++ b/engines/sci/engine/script.h
@@ -271,11 +271,6 @@ public:
*/
const offsetLookupArrayType *getOffsetArray() { return &_offsetLookupArray; };
- /**
- * Print string lookup table (list) to debug console
- */
- void debugPrintStrings(Console *con);
-
private:
/**
* Processes a relocation block within a SCI0-SCI2.1 script