aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMartin Kiewitz2010-06-25 22:48:55 +0000
committerMartin Kiewitz2010-06-25 22:48:55 +0000
commit56d9acad90588453837710775ab8fbb7649884a5 (patch)
tree197c2d82eb85ddf871dfe659d5a07cb55b4012df /engines
parent56c6907477095d404523303330d4ceff9889a3be (diff)
downloadscummvm-rg350-56d9acad90588453837710775ab8fbb7649884a5.tar.gz
scummvm-rg350-56d9acad90588453837710775ab8fbb7649884a5.tar.bz2
scummvm-rg350-56d9acad90588453837710775ab8fbb7649884a5.zip
SCI: implementing workaround for issue in room 58 sq1 (operation lt, doing comparsion against pointer)
svn-id: r50294
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/engine/vm.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/engines/sci/engine/vm.cpp b/engines/sci/engine/vm.cpp
index f7c38e0e2b..70c4f3d996 100644
--- a/engines/sci/engine/vm.cpp
+++ b/engines/sci/engine/vm.cpp
@@ -1056,6 +1056,12 @@ void run_vm(EngineState *s, bool restoring) {
if (r_temp.segment != s->r_acc.segment)
warning("[VM] Comparing pointers in different segments (%04x:%04x vs. %04x:%04x)", PRINT_REG(r_temp), PRINT_REG(s->r_acc));
s->r_acc = make_reg(0, (r_temp.segment == s->r_acc.segment) && r_temp.offset < s->r_acc.offset);
+ } else if (r_temp.segment && !s->r_acc.segment) {
+ if (s->r_acc.offset >= 1000)
+ error("[VM] op_lt: comparsion between a pointer and number");
+ // Pseudo-WORKAROUND: sierra allows any pointer <-> value comparsion
+ // Happens in SQ1, room 58, when giving id-card to robot
+ s->r_acc = make_reg(0, 1);
} else
s->r_acc = ACC_ARITHMETIC_L(signed_validate_arithmetic(r_temp) < (int16)/*acc*/);
break;