aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authorMartin Kiewitz2010-07-19 17:27:56 +0000
committerMartin Kiewitz2010-07-19 17:27:56 +0000
commit6240e5353e1b26e78893bf2b7bca182b00fcd379 (patch)
treefa3e3971740c06934ed7052d7f7934c8480c38c8 /engines/sci
parentf4a32793c0d63aba21c960c02f1eec325a1ede94 (diff)
downloadscummvm-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
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/engine/kmovement.cpp9
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);