diff options
author | Bertrand Augereau | 2011-09-01 01:27:59 +0200 |
---|---|---|
committer | Bertrand Augereau | 2011-09-01 01:27:59 +0200 |
commit | 6c0b7b6deb994b0d57d8dc858ee10a71cebfc4cb (patch) | |
tree | f9ce54b5bbd07b3cb97e60a202cfb03f693745b2 /engines/dreamweb | |
parent | d9c7b9dd39ced4c2954aca9f1537d667d576eafb (diff) | |
download | scummvm-rg350-6c0b7b6deb994b0d57d8dc858ee10a71cebfc4cb.tar.gz scummvm-rg350-6c0b7b6deb994b0d57d8dc858ee10a71cebfc4cb.tar.bz2 scummvm-rg350-6c0b7b6deb994b0d57d8dc858ee10a71cebfc4cb.zip |
DREAMWEB: Fix of the bug when you are in the inventory and drag the gun agains the upper border of the screen
Diffstat (limited to 'engines/dreamweb')
-rw-r--r-- | engines/dreamweb/stubs.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp index 3a01872542..89df661974 100644 --- a/engines/dreamweb/stubs.cpp +++ b/engines/dreamweb/stubs.cpp @@ -1611,9 +1611,11 @@ void DreamGenContext::showpointer() { height = 12; data.byte(kPointerxs) = width; data.byte(kPointerys) = height; - data.word(kOldpointerx) -= width / 2; - data.word(kOldpointery) -= height / 2; - multiget(segRef(data.word(kBuffers)).ptr(kPointerback, 0), x - width / 2, y - height / 2, width, height); + uint16 xMin = (x >= width / 2) ? x - width / 2 : 0; + uint16 yMin = (y >= height / 2) ? y - height / 2 : 0; + data.word(kOldpointerx) = xMin; + data.word(kOldpointery) = yMin; + multiget(segRef(data.word(kBuffers)).ptr(kPointerback, 0), xMin, yMin, width, height); showframe(frames, x, y, 3 * data.byte(kItemframe) + 1, 128); showframe(icons1, x, y, 3, 128); } else { |