diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/engine/kmovement.cpp | 10 | ||||
-rw-r--r-- | engines/sci/engine/script_patches.cpp | 7 |
2 files changed, 9 insertions, 8 deletions
diff --git a/engines/sci/engine/kmovement.cpp b/engines/sci/engine/kmovement.cpp index 9bc93cbeb0..5c23539bf8 100644 --- a/engines/sci/engine/kmovement.cpp +++ b/engines/sci/engine/kmovement.cpp @@ -315,14 +315,8 @@ reg_t kDoBresen(EngineState *s, int argc, reg_t *argv) { ))) { // Whew... in short: If we have reached or passed our target position - // Sanity check: make sure that destx, desty are inside the screen coordinates. - // They can go off screen in some cases, e.g. in SQ5 while scrubbing the floor (bug #3037351) - if (destx <= g_sci->_gfxScreen->getWidth() && desty <= g_sci->_gfxScreen->getHeight()) { - x = destx; - y = desty; - } else { - warning("kDoBresen: destination x, y would be off-screen(%d, %d)", destx, desty); - } + x = destx; + y = desty; completed = 1; debugC(2, kDebugLevelBresen, "Finished mover %04x:%04x", PRINT_REG(mover)); diff --git a/engines/sci/engine/script_patches.cpp b/engines/sci/engine/script_patches.cpp index 60f6c4a826..bb918cc706 100644 --- a/engines/sci/engine/script_patches.cpp +++ b/engines/sci/engine/script_patches.cpp @@ -166,6 +166,13 @@ const SciScriptSignature larry6Signatures[] = { { 0, NULL, 0, 0, NULL, NULL } }; +// It seems to scripts warp ego outside the screen somehow (or maybe kDoBresen?) +// ego::mover is set to 0 and rm119::doit will crash in that case. This here +// fixes part of the problem and actually checks ego::mover to be 0 and skips +// TODO: this should get further investigated by waltervn and maybe properly +// patched. For now ego will shortly disappear and reappear a bit after +// this isn't good, but sierra sci also "crashed" (endless looped) so this +// is at least better than the original code const byte sq5SignatureScrubbing[] = { 19, 0x18, // not |