From 56d9acad90588453837710775ab8fbb7649884a5 Mon Sep 17 00:00:00 2001 From: Martin Kiewitz Date: Fri, 25 Jun 2010 22:48:55 +0000 Subject: SCI: implementing workaround for issue in room 58 sq1 (operation lt, doing comparsion against pointer) svn-id: r50294 --- engines/sci/engine/vm.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'engines/sci') 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; -- cgit v1.2.3