aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authorMartin Kiewitz2010-07-19 10:19:13 +0000
committerMartin Kiewitz2010-07-19 10:19:13 +0000
commitb48045662dd4618ec9058bdc05ec50089abf740f (patch)
treea7c82a3c4c674b1db8fa81334370b792255110c0 /engines/sci
parent6bebc0df452c722de8ce0fd1b7458331f3e13a0e (diff)
downloadscummvm-rg350-b48045662dd4618ec9058bdc05ec50089abf740f.tar.gz
scummvm-rg350-b48045662dd4618ec9058bdc05ec50089abf740f.tar.bz2
scummvm-rg350-b48045662dd4618ec9058bdc05ec50089abf740f.zip
SCI: fix ult to work for pq2 japanese
pq2 japanese compares pointers to 2000 to find out if its a resourceid or a pointer svn-id: r51023
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/engine/vm.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/sci/engine/vm.cpp b/engines/sci/engine/vm.cpp
index ba35e024e1..419acd3871 100644
--- a/engines/sci/engine/vm.cpp
+++ b/engines/sci/engine/vm.cpp
@@ -1444,7 +1444,8 @@ void run_vm(EngineState *s, bool restoring) {
r_temp = POP32();
// See above
- if (r_temp.segment && (s->r_acc == make_reg(0, 1000)))
+ // PQ2 japanese compares pointers to 2000 to find out if its a pointer or a resourceid
+ if (r_temp.segment && (s->r_acc == make_reg(0, 1000) || (s->r_acc == make_reg(0, 2000))))
s->r_acc = NULL_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);