From b273726df14e07d02860bc264b8e7150f3b01324 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 6 Dec 2011 17:08:53 +0200 Subject: DREAMWEB: Fixed mouse button checks (thanks wjp) --- engines/dreamweb/stubs.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'engines/dreamweb/stubs.cpp') diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp index 6786ba48a7..313fec62a4 100644 --- a/engines/dreamweb/stubs.cpp +++ b/engines/dreamweb/stubs.cpp @@ -2241,9 +2241,7 @@ void DreamGenContext::zoomOnOff() { data.byte(kCommandtype) = 222; commandOnly(39); } - if (data.word(kMousebutton) == data.word(kOldbutton)) - return; - if ((data.word(kMousebutton) & 1) == 0) + if (!(data.word(kMousebutton) & 1) || (data.word(kMousebutton) == data.word(kOldbutton))) return; data.byte(kZoomon) ^= 1; createPanel(); @@ -3688,7 +3686,7 @@ void DreamGenContext::nextDest() { commandOnly(28); } - if ((data.word(kMousebutton) & 1) || (data.word(kMousebutton) == data.word(kOldbutton))) + if (!(data.word(kMousebutton) & 1) || (data.word(kMousebutton) == data.word(kOldbutton))) return; // nodu do { @@ -3719,7 +3717,7 @@ void DreamGenContext::lastDest() { commandOnly(29); } - if ((data.word(kMousebutton) & 1) || (data.word(kMousebutton) == data.word(kOldbutton))) + if (!(data.word(kMousebutton) & 1) || (data.word(kMousebutton) == data.word(kOldbutton))) return; // nodd do { @@ -3750,7 +3748,7 @@ void DreamGenContext::destSelect() { commandOnly(30); } - if ((data.word(kMousebutton) & 1) || (data.word(kMousebutton) == data.word(kOldbutton))) + if (!(data.word(kMousebutton) & 1) || (data.word(kMousebutton) == data.word(kOldbutton))) return; // notrav getDestInfo(); -- cgit v1.2.3