diff options
author | Martin Kiewitz | 2010-07-15 21:28:48 +0000 |
---|---|---|
committer | Martin Kiewitz | 2010-07-15 21:28:48 +0000 |
commit | 30238347e9b68a597f395dfe6662557de5ac3cfe (patch) | |
tree | 1433f25a0ea04a14e86aeded9db7da7b01c95bb3 /engines/sci/engine | |
parent | d78eba3d187b77b9843c3cc9b583c97ee7697998 (diff) | |
download | scummvm-rg350-30238347e9b68a597f395dfe6662557de5ac3cfe.tar.gz scummvm-rg350-30238347e9b68a597f395dfe6662557de5ac3cfe.tar.bz2 scummvm-rg350-30238347e9b68a597f395dfe6662557de5ac3cfe.zip |
SCI: kDoBresen now returns result of CantBeHere() like sierra sci does it, also adding another comment about r50921
svn-id: r50922
Diffstat (limited to 'engines/sci/engine')
-rw-r--r-- | engines/sci/engine/kmovement.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/engines/sci/engine/kmovement.cpp b/engines/sci/engine/kmovement.cpp index 69932efabc..125d0b208b 100644 --- a/engines/sci/engine/kmovement.cpp +++ b/engines/sci/engine/kmovement.cpp @@ -316,14 +316,21 @@ reg_t kDoBresen(EngineState *s, int argc, reg_t *argv) { debugC(2, kDebugLevelBresen, "New data: (x,y)=(%d,%d), di=%d", x, y, bdi); + bool collision = false; + reg_t cantBeHere = NULL_REG; + if (SELECTOR(cantBeHere) != -1) { invokeSelector(s, client, SELECTOR(cantBeHere), argc, argv); - s->r_acc = make_reg(0, !s->r_acc.offset); + if (!s->r_acc.isNull()) + collision = true; + cantBeHere = s->r_acc; } else { invokeSelector(s, client, SELECTOR(canBeHere), argc, argv); + if (s->r_acc.isNull()) + collision = true; } - if (!s->r_acc.offset) { // Contains the return value + if (collision) { signal = readSelectorValue(segMan, client, SELECTOR(signal)); writeSelectorValue(segMan, client, SELECTOR(x), oldx); @@ -332,12 +339,15 @@ reg_t kDoBresen(EngineState *s, int argc, reg_t *argv) { debugC(2, kDebugLevelBresen, "Finished mover %04x:%04x by collision", PRINT_REG(mover)); // we shall not set completed in this case, sierra sci also doesn't do it + // if we set call .moveDone in those cases qfg1 vga gate at the castle and lsl1 casino door will not work } if ((getSciVersion() >= SCI_VERSION_1_EGA)) if (completed) invokeSelector(s, mover, SELECTOR(moveDone), argc, argv); + if (SELECTOR(cantBeHere) != -1) + return cantBeHere; return make_reg(0, completed); } |