[Scummvm-cvs-logs] scummvm master -> 3183ef0854782fcdc8f7c0f32e4a0de4dc6e1c9a

m-kiewitz m_kiewitz at users.sourceforge.net
Thu May 14 20:40:49 CEST 2015


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
3183ef0854 SCI: add said-details to script_said debug cmd


Commit: 3183ef0854782fcdc8f7c0f32e4a0de4dc6e1c9a
    https://github.com/scummvm/scummvm/commit/3183ef0854782fcdc8f7c0f32e4a0de4dc6e1c9a
Author: Martin Kiewitz (m_kiewitz at users.sourceforge.net)
Date: 2015-05-14T20:41:21+02:00

Commit Message:
SCI: add said-details to script_said debug cmd

Changed paths:
    engines/sci/console.cpp
    engines/sci/engine/script.cpp
    engines/sci/engine/script.h



diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp
index c706970..1e95393 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 fbf00ab..f2d00d9 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 3f24bb1..abe6409 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






More information about the Scummvm-git-logs mailing list