[Scummvm-cvs-logs] scummvm master -> 9f4c221a2222d33323549b137767c0bbd68df29d

eriktorbjorn eriktorbjorn at telia.com
Sun May 4 22:28:37 CEST 2014


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:
cfa0c839c3 NEVERHOOD: Fixed one of the issues in #6513
9f4c221a22 NEVERHOOD: Fixed off-by-one error in getTextIndex3()


Commit: cfa0c839c33698a18e50ee8a3d126cc8ed7f589d
    https://github.com/scummvm/scummvm/commit/cfa0c839c33698a18e50ee8a3d126cc8ed7f589d
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2014-05-04T22:27:47+02:00

Commit Message:
NEVERHOOD: Fixed one of the issues in #6513

The getKloggsTextIndex() function would return 40 twice in a row
when wrapping around. This caused one of Willie's nonsense letters
to appear instead, since they're supposed to trigger when
getTextIndex1() returns the same result more than once.

The same bug also appeared (and has been fixed) in getTextIndex3(),
but there it just caused the same nonsense letter to appear twice.

Changed paths:
    engines/neverhood/modules/module1000.cpp



diff --git a/engines/neverhood/modules/module1000.cpp b/engines/neverhood/modules/module1000.cpp
index b19ba05..be57502 100644
--- a/engines/neverhood/modules/module1000.cpp
+++ b/engines/neverhood/modules/module1000.cpp
@@ -693,22 +693,18 @@ uint32 Scene1005::getTextIndex1() {
 uint32 Scene1005::getKloggsTextIndex() {
 	uint32 textIndex = getGlobalVar(V_TEXT_COUNTING_INDEX1);
 	if (textIndex + 1 > 10) {
-		setGlobalVar(V_TEXT_COUNTING_INDEX1, 0);
 		textIndex = 0;
-	} else {
-		setGlobalVar(V_TEXT_COUNTING_INDEX1, textIndex + 1);
 	}
+	setGlobalVar(V_TEXT_COUNTING_INDEX1, textIndex + 1);
 	return textIndex + 40;
 }
 
 uint32 Scene1005::getTextIndex3() {
 	uint32 textIndex = getGlobalVar(V_TEXT_COUNTING_INDEX2);
 	if (textIndex + 1 >= 10) {
-		setGlobalVar(V_TEXT_COUNTING_INDEX2, 0);
 		textIndex = 0;
-	} else {
-		setGlobalVar(V_TEXT_COUNTING_INDEX2, textIndex + 1);
 	}
+	setGlobalVar(V_TEXT_COUNTING_INDEX2, textIndex + 1);
 	return textIndex + 30;
 }
 


Commit: 9f4c221a2222d33323549b137767c0bbd68df29d
    https://github.com/scummvm/scummvm/commit/9f4c221a2222d33323549b137767c0bbd68df29d
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2014-05-04T22:27:48+02:00

Commit Message:
NEVERHOOD: Fixed off-by-one error in getTextIndex3()

This is the same fix that was applied to getKloggsTextIndex() some
time ago. It restores a missing Willie nonsense letter. While I
haven't actually verified for myself that this letter appears in
the original game, it is referenced in Wikipedia's article about
Absalom.

Changed paths:
    engines/neverhood/modules/module1000.cpp



diff --git a/engines/neverhood/modules/module1000.cpp b/engines/neverhood/modules/module1000.cpp
index be57502..5e4d67d 100644
--- a/engines/neverhood/modules/module1000.cpp
+++ b/engines/neverhood/modules/module1000.cpp
@@ -701,7 +701,7 @@ uint32 Scene1005::getKloggsTextIndex() {
 
 uint32 Scene1005::getTextIndex3() {
 	uint32 textIndex = getGlobalVar(V_TEXT_COUNTING_INDEX2);
-	if (textIndex + 1 >= 10) {
+	if (textIndex + 1 > 10) {
 		textIndex = 0;
 	}
 	setGlobalVar(V_TEXT_COUNTING_INDEX2, textIndex + 1);






More information about the Scummvm-git-logs mailing list