diff options
author | Torbjörn Andersson | 2014-05-04 22:16:46 +0200 |
---|---|---|
committer | Torbjörn Andersson | 2014-05-04 22:27:47 +0200 |
commit | cfa0c839c33698a18e50ee8a3d126cc8ed7f589d (patch) | |
tree | 392b75e4f1689c96e264841c0fe0442d6529f5e8 /engines | |
parent | b2be5788cf4305d2d9e47a6bd4f14f1a12140834 (diff) | |
download | scummvm-rg350-cfa0c839c33698a18e50ee8a3d126cc8ed7f589d.tar.gz scummvm-rg350-cfa0c839c33698a18e50ee8a3d126cc8ed7f589d.tar.bz2 scummvm-rg350-cfa0c839c33698a18e50ee8a3d126cc8ed7f589d.zip |
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.
Diffstat (limited to 'engines')
-rw-r--r-- | engines/neverhood/modules/module1000.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/engines/neverhood/modules/module1000.cpp b/engines/neverhood/modules/module1000.cpp index b19ba05b32..be57502d08 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; } |