[Scummvm-git-logs] scummvm master -> 8ca719b2bc0ca0539ceb995067a1bdf7a183eb05

waltervn walter at vanniftrik-it.nl
Mon Feb 20 22:54:33 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:
27c956a255 ADL: Fix hires6 flute opcode
8ca719b2bc ADL: Clean up/comment hires6 string printing


Commit: 27c956a255bd00bde3215c68f1c39c77343f3dc8
    https://github.com/scummvm/scummvm/commit/27c956a255bd00bde3215c68f1c39c77343f3dc8
Author: Walter van Niftrik (walter at scummvm.org)
Date: 2017-02-20T22:53:04+01:00

Commit Message:
ADL: Fix hires6 flute opcode

Changed paths:
    engines/adl/hires6.cpp


diff --git a/engines/adl/hires6.cpp b/engines/adl/hires6.cpp
index 347a4f2..10d8580 100644
--- a/engines/adl/hires6.cpp
+++ b/engines/adl/hires6.cpp
@@ -195,6 +195,8 @@ int HiRes6Engine::o_fluteSound(ScriptEnv &e) {
 
 	playTones(tones, false);
 
+	_linesPrinted = 0;
+
 	return 0;
 }
 


Commit: 8ca719b2bc0ca0539ceb995067a1bdf7a183eb05
    https://github.com/scummvm/scummvm/commit/8ca719b2bc0ca0539ceb995067a1bdf7a183eb05
Author: Walter van Niftrik (walter at scummvm.org)
Date: 2017-02-20T22:53:04+01:00

Commit Message:
ADL: Clean up/comment hires6 string printing

Changed paths:
    engines/adl/hires6.cpp


diff --git a/engines/adl/hires6.cpp b/engines/adl/hires6.cpp
index 10d8580..b3b66f6 100644
--- a/engines/adl/hires6.cpp
+++ b/engines/adl/hires6.cpp
@@ -430,6 +430,8 @@ void HiRes6Engine::printString(const Common::String &str) {
 	Common::String s;
 	uint found = 0;
 
+	// Variable 27 is 1 when Kira is present, 0 otherwise. It's used for choosing
+	// between singular and plural variants of a string.
 	// This does not emulate the corner cases of the original, hence this check
 	if (getVar(27) > 1)
 		error("Invalid value %i encountered for variable 27", getVar(27));
@@ -445,21 +447,24 @@ void HiRes6Engine::printString(const Common::String &str) {
 		}
 	}
 
-	if (getVar(2) != 0xff) {
-		AdlEngine_v5::printString(s);
-	} else {
+	// Variables 2 and 26 are used for controlling the printing of room descriptions
+	if (getVar(2) == 0xff) {
 		if (getVar(26) == 0) {
+			// This checks for special room description string " "
 			if (str.size() != 1 || APPLECHAR(str[0]) != APPLECHAR(' '))
 				return AdlEngine_v5::printString(s);
-			setVar(2, APPLECHAR(' '));
-		} else if (getVar(26) != 0xff) {
-			setVar(2, 'P');
-		} else {
+			setVar(2, 160);
+		} else if (getVar(26) == 0xff) {
+			// Storing the room number in a variable allows for range comparisons
 			setVar(26, _state.room);
 			setVar(2, 1);
+		} else {
+			setVar(2, 80);
 		}
 
 		doAllCommands(_globalCommands, _currVerb, _currNoun);
+	} else {
+		AdlEngine_v5::printString(s);
 	}
 }
 





More information about the Scummvm-git-logs mailing list