aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMartin Kiewitz2010-08-07 13:56:31 +0000
committerMartin Kiewitz2010-08-07 13:56:31 +0000
commitd2d22de9115fe803870d7ca1d06ece1ab5f77f45 (patch)
treee7183a787ba0b31dc946c53be7bfb59a81924643 /engines
parent1c1eff9ec56147a94aab5148994a39d72cb67e53 (diff)
downloadscummvm-rg350-d2d22de9115fe803870d7ca1d06ece1ab5f77f45.tar.gz
scummvm-rg350-d2d22de9115fe803870d7ca1d06ece1ab5f77f45.tar.bz2
scummvm-rg350-d2d22de9115fe803870d7ca1d06ece1ab5f77f45.zip
SCI: removing kDoBresen hack for sq5
adding detailed comment about sq5 scrubbing issue not 100% fixed (waltervn should look into it), but at least it works now svn-id: r51833
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/engine/kmovement.cpp10
-rw-r--r--engines/sci/engine/script_patches.cpp7
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