diff options
author | Filippos Karapetis | 2011-12-17 16:21:32 +0200 |
---|---|---|
committer | Filippos Karapetis | 2011-12-17 16:21:32 +0200 |
commit | 400bda78d2ad98c7671c384e58cb6d74ba7579fd (patch) | |
tree | 2df9bf9f808765d3cf129f27669c24611c1e3623 | |
parent | 956abddc5ce30bf29bb7df84f3eb3f74076d57e0 (diff) | |
download | scummvm-rg350-400bda78d2ad98c7671c384e58cb6d74ba7579fd.tar.gz scummvm-rg350-400bda78d2ad98c7671c384e58cb6d74ba7579fd.tar.bz2 scummvm-rg350-400bda78d2ad98c7671c384e58cb6d74ba7579fd.zip |
DREAMWEB: Fix another regression in selectOb() (thanks wjp)
-rw-r--r-- | engines/dreamweb/object.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/engines/dreamweb/object.cpp b/engines/dreamweb/object.cpp index 3cea2a5c2f..dbae7e2ba5 100644 --- a/engines/dreamweb/object.cpp +++ b/engines/dreamweb/object.cpp @@ -401,8 +401,19 @@ void DreamGenContext::selectOb() { data.byte(kWithobject) = objectId & 0x00FF; data.byte(kWithtype) = objectId >> 8; - if (objectId == data.word(kOldsubject) && data.byte(kCommandtype) != 221) - data.byte(kCommandtype) = 221; + if (objectId == data.word(kOldsubject)) { + if (data.byte(kCommandtype) == 221) { + // Object already selected + if (data.word(kMousebutton) != data.word(kOldbutton) && (data.word(kMousebutton) & 1)) { + delPointer(); + data.byte(kInvopen) = 0; + useRoutine(); + } + return; + } else { + data.byte(kCommandtype) = 221; + } + } data.word(kOldsubject) = objectId; commandWithOb(0, data.byte(kWithtype), data.byte(kWithobject)); |