aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/engine/kmovement.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/engines/sci/engine/kmovement.cpp b/engines/sci/engine/kmovement.cpp
index 71f9632ef3..82a232f6b4 100644
--- a/engines/sci/engine/kmovement.cpp
+++ b/engines/sci/engine/kmovement.cpp
@@ -267,10 +267,12 @@ reg_t kDoBresen(EngineState *s, int argc, reg_t *argv) {
bdelta = (int16)readSelectorValue(segMan, mover, SELECTOR(b_incr));
axis = (int16)readSelectorValue(segMan, mover, SELECTOR(b_xAxis));
- if (SELECTOR(xLast) != -1) {
- // Introduced SCI1MIDDLE (it seems) - save last position into mover
- writeSelectorValue(segMan, mover, SELECTOR(xLast), x);
- writeSelectorValue(segMan, mover, SELECTOR(yLast), y);
+ if ((getSciVersion() >= SCI_VERSION_1_MIDDLE)) {
+ if (SELECTOR(xLast) != -1) {
+ // Introduced SCI1MIDDLE (it seems) - 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);