diff options
author | Martin Kiewitz | 2010-07-19 17:27:56 +0000 |
---|---|---|
committer | Martin Kiewitz | 2010-07-19 17:27:56 +0000 |
commit | 6240e5353e1b26e78893bf2b7bca182b00fcd379 (patch) | |
tree | fa3e3971740c06934ed7052d7f7934c8480c38c8 | |
parent | f4a32793c0d63aba21c960c02f1eec325a1ede94 (diff) | |
download | scummvm-rg350-6240e5353e1b26e78893bf2b7bca182b00fcd379.tar.gz scummvm-rg350-6240e5353e1b26e78893bf2b7bca182b00fcd379.tar.bz2 scummvm-rg350-6240e5353e1b26e78893bf2b7bca182b00fcd379.zip |
SCI: kDoBresen - check xLast/yLast selectors
fixed mixed-up fairy tales demo
svn-id: r51035
-rw-r--r-- | engines/sci/engine/kmovement.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/engines/sci/engine/kmovement.cpp b/engines/sci/engine/kmovement.cpp index f94750110c..f6e6790e66 100644 --- a/engines/sci/engine/kmovement.cpp +++ b/engines/sci/engine/kmovement.cpp @@ -268,9 +268,12 @@ reg_t kDoBresen(EngineState *s, int argc, reg_t *argv) { axis = (int16)readSelectorValue(segMan, mover, SELECTOR(b_xAxis)); if ((getSciVersion() >= SCI_VERSION_1_LATE)) { - // save last position into mover - writeSelectorValue(segMan, mover, SELECTOR(xLast), x); - writeSelectorValue(segMan, mover, SELECTOR(yLast), y); + // Mixed-Up Fairy Tales has no xLast/yLast selectors + if (SELECTOR(xLast) != -1) { + // save last position into mover + writeSelectorValue(segMan, mover, SELECTOR(xLast), x); + writeSelectorValue(segMan, mover, SELECTOR(yLast), y); + } } //printf("movecnt %d, move speed %d\n", movcnt, max_movcnt); |