[Scummvm-git-logs] scummvm master -> 29b32d52fa73de3a93d7bafabe1c58c7720de61c

sev- sev at scummvm.org
Sun Feb 26 00:22:02 CET 2017


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

Summary:
45b41357c1 DIRECTOR: More debug output when loading
29b32d52fa DIRECTOR: Clarified and corrected movie scripts in D2/D3


Commit: 45b41357c14727a635b730a1dace047ba8edf11f
    https://github.com/scummvm/scummvm/commit/45b41357c14727a635b730a1dace047ba8edf11f
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2017-02-26T00:05:10+01:00

Commit Message:
DIRECTOR: More debug output when loading

Changed paths:
    engines/director/resource.cpp


diff --git a/engines/director/resource.cpp b/engines/director/resource.cpp
index cb870d2..9ceb95b 100644
--- a/engines/director/resource.cpp
+++ b/engines/director/resource.cpp
@@ -26,6 +26,7 @@
 
 #include "director/director.h"
 #include "director/archive.h"
+#include "director/util.h"
 #include "director/lingo/lingo.h"
 
 namespace Director {
@@ -261,7 +262,7 @@ void DirectorEngine::loadSharedCastsFrom(Common::String filename) {
 	if (bmp.size() != 0) {
 		debugC(3, kDebugLoading, "Loading %d BITDs", bmp.size());
 		for (Common::Array<uint16>::iterator iterator = bmp.begin(); iterator != bmp.end(); ++iterator) {
-			debugC(3, kDebugLoading, "Shared BITD %d", *iterator);
+			debugC(3, kDebugLoading, "Shared BITD %d (%s)", *iterator, numToCastNum(*iterator - 1024));
 			_sharedBMP->setVal(*iterator, shardcst->getResource(MKTAG('B','I','T','D'), *iterator));
 		}
 	}


Commit: 29b32d52fa73de3a93d7bafabe1c58c7720de61c
    https://github.com/scummvm/scummvm/commit/29b32d52fa73de3a93d7bafabe1c58c7720de61c
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2017-02-26T00:21:16+01:00

Commit Message:
DIRECTOR: Clarified and corrected movie scripts in D2/D3

Changed paths:
    engines/director/score.cpp


diff --git a/engines/director/score.cpp b/engines/director/score.cpp
index b876b77..58d9b4b 100644
--- a/engines/director/score.cpp
+++ b/engines/director/score.cpp
@@ -164,7 +164,9 @@ void Score::loadArchive() {
 	if (_vm->getVersion() <= 3) {
 		Common::Array<uint16> stxt = _movieArchive->getResourceIDList(MKTAG('S','T','X','T'));
 		if (stxt.size() > 0) {
-			loadScriptText(*_movieArchive->getResource(MKTAG('S','T','X','T'), *stxt.begin()));
+			for (Common::Array<uint16>::iterator iterator = stxt.begin(); iterator != stxt.end(); ++iterator) {
+				loadScriptText(*_movieArchive->getResource(MKTAG('S','T','X','T'), *iterator));
+			}
 		}
 	}
 }
@@ -571,11 +573,15 @@ void Score::loadScriptText(Common::SeekableSubReadStreamEndian &stream) {
 		script += ch;
 	}
 
-	if (!script.empty() && ConfMan.getBool("dump_scripts"))
+	// Check if the script has macro. They must start with a comment.
+	// See D2 Interactivity Manual pp.46-47 (Ch.2.11. Using a macro)
+	if (script.empty() || !script.hasPrefix("--"))
+		return;
+
+	if (ConfMan.getBool("dump_scripts"))
 		dumpScript(script.c_str(), kMovieScript, _movieScriptCount);
 
-	if (!script.empty())
-		_lingo->addCode(script.c_str(), kMovieScript, _movieScriptCount);
+	_lingo->addCode(script.c_str(), kMovieScript, _movieScriptCount);
 
 	_movieScriptCount++;
 }





More information about the Scummvm-git-logs mailing list