diff options
author | Lars Skovlund | 2010-01-29 22:17:27 +0000 |
---|---|---|
committer | Lars Skovlund | 2010-01-29 22:17:27 +0000 |
commit | 0e8b8f19624f4586f7b967993bcd8244faadc3a6 (patch) | |
tree | b725d1c27e78dd4c8098a7125d90e1c2dcbdd6c9 | |
parent | 5b9b6b6b7087555723665b0e243de1a9f2d5b018 (diff) | |
download | scummvm-rg350-0e8b8f19624f4586f7b967993bcd8244faadc3a6.tar.gz scummvm-rg350-0e8b8f19624f4586f7b967993bcd8244faadc3a6.tar.bz2 scummvm-rg350-0e8b8f19624f4586f7b967993bcd8244faadc3a6.zip |
SCI: uge? and ult? opcodes now work correctly when comparing pointers with 1000.
svn-id: r47683
-rw-r--r-- | engines/sci/engine/vm.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/engines/sci/engine/vm.cpp b/engines/sci/engine/vm.cpp index 9e61508492..171dfe353b 100644 --- a/engines/sci/engine/vm.cpp +++ b/engines/sci/engine/vm.cpp @@ -896,7 +896,9 @@ void run_vm(EngineState *s, int restoring) { case op_uge_: // 0x14 (20) s->r_prev = s->r_acc; r_temp = POP32(); - if (r_temp.segment && s->r_acc.segment) + if (s->r_acc == make_reg(0, 0x3e8)) + s->r_acc = make_reg(0, r_temp.segment); + else if (r_temp.segment && s->r_acc.segment) s->r_acc = make_reg(0, (r_temp.segment == s->r_acc.segment) && r_temp.offset >= s->r_acc.offset); else s->r_acc = ACC_ARITHMETIC_L(validate_arithmetic(r_temp) >= /*acc*/); @@ -905,7 +907,9 @@ void run_vm(EngineState *s, int restoring) { case op_ult_: // 0x15 (21) s->r_prev = s->r_acc; r_temp = POP32(); - if (r_temp.segment && s->r_acc.segment) + if (s->r_acc == make_reg(0, 0x3e8)) + s->r_acc = make_reg(0, !r_temp.segment); + else if (r_temp.segment && s->r_acc.segment) s->r_acc = make_reg(0, (r_temp.segment == s->r_acc.segment) && r_temp.offset < s->r_acc.offset); else s->r_acc = ACC_ARITHMETIC_L(validate_arithmetic(r_temp) < /*acc*/); |