[Scummvm-cvs-logs] scummvm master -> 07f13be0fa610320b8daf57f65c7910080ca7fcc
eriktorbjorn
eriktorbjorn at telia.com
Sun May 31 16:09:09 CEST 2015
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
07f13be0fa SHERLOCK: Fix regression in conversations
Commit: 07f13be0fa610320b8daf57f65c7910080ca7fcc
https://github.com/scummvm/scummvm/commit/07f13be0fa610320b8daf57f65c7910080ca7fcc
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2015-05-31T16:05:31+02:00
Commit Message:
SHERLOCK: Fix regression in conversations
This causes replies to once again be shown in their entirety,
instead of one line at a time.
There were two errors: First of all, _wait was always set to 1,
because one of the conditions was "|| _opcodes[OP_IF_STATEMENT]"
instead of "|| v == _opcodes[OP_IF_STATEMENT]".
Secondly, judging by the older version, this part of the code
should only be allowed to set _wait to 1, never to 0, because we
may have already set it to 1 for other reasons.
Changed paths:
engines/sherlock/talk.cpp
diff --git a/engines/sherlock/talk.cpp b/engines/sherlock/talk.cpp
index 96e4d0d..59897e2 100644
--- a/engines/sherlock/talk.cpp
+++ b/engines/sherlock/talk.cpp
@@ -1270,9 +1270,12 @@ void Talk::doScript(const Common::String &script) {
}
byte v = (str >= _scriptEnd ? 0 : str[0]);
- _wait = v == _opcodes[OP_SWITCH_SPEAKER] || v == _opcodes[OP_ASSIGN_PORTRAIT_LOCATION] ||
- v == _opcodes[OP_BANISH_WINDOW] || _opcodes[OP_IF_STATEMENT] || v == _opcodes[OP_ELSE_STATEMENT] ||
- v == _opcodes[OP_END_IF_STATEMENT] || v == _opcodes[OP_GOTO_SCENE] || v == _opcodes[OP_CALL_TALK_FILE];
+ if (v == _opcodes[OP_SWITCH_SPEAKER] || v == _opcodes[OP_ASSIGN_PORTRAIT_LOCATION] ||
+ v == _opcodes[OP_BANISH_WINDOW] || v == _opcodes[OP_IF_STATEMENT] ||
+ v == _opcodes[OP_ELSE_STATEMENT] || v == _opcodes[OP_END_IF_STATEMENT] ||
+ v == _opcodes[OP_GOTO_SCENE] || v == _opcodes[OP_CALL_TALK_FILE]) {
+ _wait = 1;
+ }
}
// Open window if it wasn't already open, and text has already been printed
More information about the Scummvm-git-logs
mailing list