From 6240e5353e1b26e78893bf2b7bca182b00fcd379 Mon Sep 17 00:00:00 2001 From: Martin Kiewitz Date: Mon, 19 Jul 2010 17:27:56 +0000 Subject: SCI: kDoBresen - check xLast/yLast selectors fixed mixed-up fairy tales demo svn-id: r51035 --- engines/sci/engine/kmovement.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'engines/sci/engine') 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); -- cgit v1.2.3