mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-03 01:15:58 +00:00
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.
This commit is contained in:
parent
b2be5788cf
commit
cfa0c839c3
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user