diff options
author | Willem Jan Palenstijn | 2015-07-22 22:37:40 +0200 |
---|---|---|
committer | Willem Jan Palenstijn | 2015-07-22 22:43:42 +0200 |
commit | 6ec9c81b575f13b2c4b30aeac592ebf2557b5890 (patch) | |
tree | 503d50902bad2d800165593039d08d5ccf0c98ab /engines/sci/engine/kmovement.cpp | |
parent | 5ec05f6b647c5ea41418be7ed19ad381f97cabd8 (diff) | |
parent | 4e5c8d35f7e133e2e72a846fdbd54900c91eeb73 (diff) | |
download | scummvm-rg350-6ec9c81b575f13b2c4b30aeac592ebf2557b5890.tar.gz scummvm-rg350-6ec9c81b575f13b2c4b30aeac592ebf2557b5890.tar.bz2 scummvm-rg350-6ec9c81b575f13b2c4b30aeac592ebf2557b5890.zip |
Merge branch 'master' into mm
Conflicts:
engines/access/access.cpp
engines/access/asurface.h
engines/access/bubble_box.cpp
engines/access/bubble_box.h
engines/access/martian/martian_game.cpp
engines/access/player.cpp
engines/access/player.h
engines/access/resources.cpp
engines/access/screen.cpp
engines/access/screen.h
engines/access/sound.cpp
engines/access/sound.h
Diffstat (limited to 'engines/sci/engine/kmovement.cpp')
-rw-r--r-- | engines/sci/engine/kmovement.cpp | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/engines/sci/engine/kmovement.cpp b/engines/sci/engine/kmovement.cpp index 51d49eea9f..9b83dbc52d 100644 --- a/engines/sci/engine/kmovement.cpp +++ b/engines/sci/engine/kmovement.cpp @@ -305,12 +305,23 @@ reg_t kDoBresen(EngineState *s, int argc, reg_t *argv) { for (uint i = 0; i < clientVarNum; ++i) clientBackup[i] = clientObject->getVariable(i); - if (mover_xAxis) { - if (ABS(mover_x - client_x) < ABS(mover_dx)) - completed = true; + if ((getSciVersion() <= SCI_VERSION_1_EGA_ONLY)) { + if (mover_xAxis) { + if (ABS(mover_x - client_x) < ABS(mover_dx)) + completed = true; + } else { + if (ABS(mover_y - client_y) < ABS(mover_dy)) + completed = true; + } } else { - if (ABS(mover_y - client_y) < ABS(mover_dy)) - completed = true; + // SCI1EARLY+ code + if (mover_xAxis) { + if (ABS(mover_x - client_x) <= ABS(mover_dx)) + completed = true; + } else { + if (ABS(mover_y - client_y) <= ABS(mover_dy)) + completed = true; + } } if (completed) { client_x = mover_x; @@ -336,10 +347,10 @@ reg_t kDoBresen(EngineState *s, int argc, reg_t *argv) { bool collision = false; reg_t cantBeHere = NULL_REG; + // adding this here for hoyle 3 to get happy. CantBeHere is a dummy in hoyle 3 and acc is != 0 so we would + // get a collision otherwise. Resetting the result was always done in SSCI + s->r_acc = NULL_REG; if (SELECTOR(cantBeHere) != -1) { - // adding this here for hoyle 3 to get happy. CantBeHere is a dummy in hoyle 3 and acc is != 0 so we would - // get a collision otherwise - s->r_acc = NULL_REG; invokeSelector(s, client, SELECTOR(cantBeHere), argc, argv); if (!s->r_acc.isNull()) collision = true; |