[Scummvm-cvs-logs] scummvm master -> 666a4f3a57361e711a2854a4aa4fb5df19bc5569

bluegr bluegr at gmail.com
Tue Feb 3 11:36:26 CET 2015


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:
6c07f918c6 ZVISION: Fix for script bug #6783 (no sound in the ZNem fist puzzle)
666a4f3a57 SCUMM: Adapt wording for the fix in commit f1c64c2afe


Commit: 6c07f918c698ff23a917857434200e51179bc111
    https://github.com/scummvm/scummvm/commit/6c07f918c698ff23a917857434200e51179bc111
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2015-02-03T12:31:58+02:00

Commit Message:
ZVISION: Fix for script bug #6783 (no sound in the ZNem fist puzzle)

This is a bug in the original game script of the Zork Nemesis fist
puzzle, which we now patch so that the sound checks are correct for the
left fist animation

Changed paths:
    engines/zvision/scripting/scr_file_handling.cpp
    engines/zvision/scripting/script_manager.h



diff --git a/engines/zvision/scripting/scr_file_handling.cpp b/engines/zvision/scripting/scr_file_handling.cpp
index b047c14..a9f3a55 100644
--- a/engines/zvision/scripting/scr_file_handling.cpp
+++ b/engines/zvision/scripting/scr_file_handling.cpp
@@ -83,7 +83,7 @@ void ScriptManager::parsePuzzle(Puzzle *puzzle, Common::SeekableReadStream &stre
 
 	while (!stream.eos() && !line.contains('}')) {
 		if (line.matchString("criteria {", true)) {
-			parseCriteria(stream, puzzle->criteriaList);
+			parseCriteria(stream, puzzle->criteriaList, puzzle->key);
 		} else if (line.matchString("results {", true)) {
 			parseResults(stream, puzzle->resultActions);
 		} else if (line.matchString("flags {", true)) {
@@ -97,7 +97,7 @@ void ScriptManager::parsePuzzle(Puzzle *puzzle, Common::SeekableReadStream &stre
 	puzzle->addedBySetState = false;
 }
 
-bool ScriptManager::parseCriteria(Common::SeekableReadStream &stream, Common::List<Common::List<Puzzle::CriteriaEntry> > &criteriaList) const {
+bool ScriptManager::parseCriteria(Common::SeekableReadStream &stream, Common::List<Common::List<Puzzle::CriteriaEntry> > &criteriaList, uint32 key) const {
 	// Loop until we find the closing brace
 	Common::String line = stream.readLine();
 	trimCommentsAndWhiteSpace(&line);
@@ -117,6 +117,21 @@ bool ScriptManager::parseCriteria(Common::SeekableReadStream &stream, Common::Li
 	// Create a new List to hold the CriteriaEntries
 	criteriaList.push_back(Common::List<Puzzle::CriteriaEntry>());
 
+	// WORKAROUND for a script bug in Zork: Nemesis, room td9e (fist puzzle)
+	// Since we patch the script that triggers when manipulating the left fist
+	// (below), we add an additional check for the left fist sound, so that it
+	// doesn't get killed immediately when the left fist animation starts.
+	// Together with the workaround below, it fixes bug #6783.
+	if (_engine->getGameId() == GID_NEMESIS && key == 3594) {
+		Puzzle::CriteriaEntry entry;
+		entry.key = 567;
+		entry.criteriaOperator = Puzzle::NOT_EQUAL_TO;
+		entry.argumentIsAKey = false;
+		entry.argument = 1;
+
+		criteriaList.back().push_back(entry);
+	}
+
 	while (!stream.eos() && !line.contains('}')) {
 		Puzzle::CriteriaEntry entry;
 
@@ -128,6 +143,13 @@ bool ScriptManager::parseCriteria(Common::SeekableReadStream &stream, Common::Li
 		token = tokenizer.nextToken();
 		sscanf(token.c_str(), "[%u]", &(entry.key));
 
+		// WORKAROUND for a script bug in Zork: Nemesis, room td9e (fist puzzle)
+		// Check for the state of animation 567 (left fist) when manipulating
+		// the fingers of the left fist (puzzle slots 3582, 3583).
+		// Together with the workaround above, it fixes bug #6783.
+		if (_engine->getGameId() == GID_NEMESIS && (key == 3582 || key == 3583) && entry.key == 568)
+			entry.key = 567;
+
 		// Parse the operator out of the second token
 		token = tokenizer.nextToken();
 		if (token.c_str()[0] == '=')
diff --git a/engines/zvision/scripting/script_manager.h b/engines/zvision/scripting/script_manager.h
index 6d025bf..d8e3721 100644
--- a/engines/zvision/scripting/script_manager.h
+++ b/engines/zvision/scripting/script_manager.h
@@ -312,9 +312,10 @@ private:
 	 *
 	 * @param criteria    Pointer to the Criteria object to fill
 	 * @param stream      Scr file stream
+	 * @param key         Puzzle key (for workarounds)
 	 * @return            Whether any criteria were read
 	 */
-	bool parseCriteria(Common::SeekableReadStream &stream, Common::List<Common::List<Puzzle::CriteriaEntry> > &criteriaList) const;
+	bool parseCriteria(Common::SeekableReadStream &stream, Common::List<Common::List<Puzzle::CriteriaEntry> > &criteriaList, uint32 key) const;
 
 	/**
 	 * Parses the stream into a ResultAction objects


Commit: 666a4f3a57361e711a2854a4aa4fb5df19bc5569
    https://github.com/scummvm/scummvm/commit/666a4f3a57361e711a2854a4aa4fb5df19bc5569
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2015-02-03T12:35:17+02:00

Commit Message:
SCUMM: Adapt wording for the fix in commit f1c64c2afe

Changed paths:
    engines/scumm/smush/smush_player.cpp



diff --git a/engines/scumm/smush/smush_player.cpp b/engines/scumm/smush/smush_player.cpp
index 2014462..05c7ff2 100644
--- a/engines/scumm/smush/smush_player.cpp
+++ b/engines/scumm/smush/smush_player.cpp
@@ -115,7 +115,8 @@ public:
 				if (data_end[-2] == '\r' && data_end[-1] == '\n' && data_end[0] == '\r' && data_end[1] == '\n') {
 					break;
 				}
-				// In Steam mac version LF is used instead of CR-LF
+				// In the Steam Mac version of The Dig, LF-LF is used
+				// instead of CR-LF
 				if (data_end[-2] == '\n' && data_end[-1] == '\n') {
 					break;
 				}






More information about the Scummvm-git-logs mailing list