aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorFilippos Karapetis2014-02-20 12:27:32 +0200
committerFilippos Karapetis2014-02-20 12:28:35 +0200
commit35362716334b83e3af61280a1ffa79198c3285e6 (patch)
tree3971aaafaa6b9622ba84d69ed7f268d3120b3a27 /engines
parent4065c795277bbb4cb2db6dbd8fef145b6c5c6c7f (diff)
downloadscummvm-rg350-35362716334b83e3af61280a1ffa79198c3285e6.tar.gz
scummvm-rg350-35362716334b83e3af61280a1ffa79198c3285e6.tar.bz2
scummvm-rg350-35362716334b83e3af61280a1ffa79198c3285e6.zip
NEVERHOOD: Fix an off-by-one error in Klogg's letters
This fixes the buggy Willie letter appearing among the ones from Klogg (bug #6513)
Diffstat (limited to 'engines')
-rw-r--r--engines/neverhood/modules/module1000.cpp6
-rw-r--r--engines/neverhood/modules/module1000.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/engines/neverhood/modules/module1000.cpp b/engines/neverhood/modules/module1000.cpp
index cdeb457df5..a3b5bc67b5 100644
--- a/engines/neverhood/modules/module1000.cpp
+++ b/engines/neverhood/modules/module1000.cpp
@@ -609,7 +609,7 @@ uint32 Scene1005::getTextIndex() {
uint32 textIndex;
textIndex = getTextIndex1();
if (getGlobalVar(V_ENTRANCE_OPEN)) {
- textIndex = getTextIndex2();
+ textIndex = getKloggsTextIndex();
}
if (getGlobalVar(V_TEXT_FLAG1) && getGlobalVar(V_TEXT_INDEX) == textIndex) {
textIndex = getTextIndex3();
@@ -690,9 +690,9 @@ uint32 Scene1005::getTextIndex1() {
return textIndex;
}
-uint32 Scene1005::getTextIndex2() {
+uint32 Scene1005::getKloggsTextIndex() {
uint32 textIndex = getGlobalVar(V_TEXT_COUNTING_INDEX1);
- if (textIndex + 1 >= 10) {
+ if (textIndex + 1 > 10) {
setGlobalVar(V_TEXT_COUNTING_INDEX1, 0);
textIndex = 0;
} else {
diff --git a/engines/neverhood/modules/module1000.h b/engines/neverhood/modules/module1000.h
index d2afaf69ee..58aa92e45f 100644
--- a/engines/neverhood/modules/module1000.h
+++ b/engines/neverhood/modules/module1000.h
@@ -101,7 +101,7 @@ protected:
void drawTextToBackground();
uint32 getTextIndex();
uint32 getTextIndex1();
- uint32 getTextIndex2();
+ uint32 getKloggsTextIndex();
uint32 getTextIndex3();
};