mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-14 07:48:58 +00:00
SCI: changes to the op GT workaround
svn-id: r50266
This commit is contained in:
parent
df37aff357
commit
2b43c3a668
@ -1054,10 +1054,11 @@ void run_vm(EngineState *s, bool restoring) {
|
||||
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_gt: comparsion between a pointer and number");
|
||||
// Pseudo-WORKAROUND: sierra allows any pointer <-> value comparsion
|
||||
// Happens in SQ1, room 28, when throwing the water at Orat
|
||||
// WORKAROUND: return false
|
||||
warning("[VM] op_gt_: comparison between a pointer and a number");
|
||||
s->r_acc = NULL_REG;
|
||||
s->r_acc = SIGNAL_REG;
|
||||
} else
|
||||
s->r_acc = ACC_ARITHMETIC_L(signed_validate_arithmetic(r_temp) > (int16)/*acc*/);
|
||||
break;
|
||||
@ -1110,7 +1111,7 @@ void run_vm(EngineState *s, bool restoring) {
|
||||
// It works because in those games, the maximum resource number is 999,
|
||||
// so any parameter value above that threshold must be a pointer.
|
||||
if (r_temp.segment && (s->r_acc == make_reg(0, 1000)))
|
||||
s->r_acc = make_reg(0, 1);
|
||||
s->r_acc = SIGNAL_REG;
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user