aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authormd52011-02-27 16:15:33 +0200
committermd52011-02-27 16:15:33 +0200
commit37d610efd3ab76d7684cf2cc6cf728b561b7bd55 (patch)
tree1c49bb21ba39ed9ecf025b193ca7b8e19cffd4b5 /engines
parentdb89e9a42c2fc5334a10e2efceb0d51d1646e467 (diff)
downloadscummvm-rg350-37d610efd3ab76d7684cf2cc6cf728b561b7bd55.tar.gz
scummvm-rg350-37d610efd3ab76d7684cf2cc6cf728b561b7bd55.tar.bz2
scummvm-rg350-37d610efd3ab76d7684cf2cc6cf728b561b7bd55.zip
SCI: Improved the readability of the kDoBresen code a bit
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/engine/kmovement.cpp16
1 files changed, 11 insertions, 5 deletions
diff --git a/engines/sci/engine/kmovement.cpp b/engines/sci/engine/kmovement.cpp
index 76ad6cec23..53a3a53a8a 100644
--- a/engines/sci/engine/kmovement.cpp
+++ b/engines/sci/engine/kmovement.cpp
@@ -374,18 +374,24 @@ reg_t kDoBresen(EngineState *s, int argc, reg_t *argv) {
writeSelectorValue(segMan, mover, SELECTOR(b_i2), mover_i2);
writeSelectorValue(segMan, mover, SELECTOR(b_di), mover_di);
- if ((getSciVersion() >= SCI_VERSION_1_EGA)) {
- // this calling code here was right before the last return in
+ if (getSciVersion() == SCI_VERSION_1_EGA) {
+ // We need to compare directly in here, complete may have happened during
+ // the current move
+ if ((client_x == mover_x) && (client_y == mover_y))
+ invokeSelector(s, mover, SELECTOR(moveDone), argc, argv);
+ }
+
+ if (getSciVersion() >= SCI_VERSION_1_EARLY) {
+ // This calling code here was right before the last return in
// sci1ega and got changed to this position since sci1early
// this was an uninitialized issue in sierra sci
- if ((handleMoveCount) && (getSciVersion() >= SCI_VERSION_1_EARLY))
+ if (handleMoveCount)
writeSelectorValue(segMan, mover, SELECTOR(b_movCnt), mover_moveCnt);
// We need to compare directly in here, complete may have happened during
// the current move
if ((client_x == mover_x) && (client_y == mover_y))
invokeSelector(s, mover, SELECTOR(moveDone), argc, argv);
- if (getSciVersion() >= SCI_VERSION_1_EARLY)
- return s->r_acc;
+ return s->r_acc;
}
}