ALL: restoreBG() doesn't always completely remove the mask
|Reported by:||eriktorbjorn||Owned by:||fingolfin|
|Cc:||Game:||Sam and Max|
There are cases where restoreBG() doesn't completely remove the mask. One noticeable case is in Sam & Max where Max says "Your main attraction was a block of ice?". In this case
rect.left = 12 rect.right = 234 width = 222
With the current method mask_width will be 28. The result is that part of the "f" (the last character on the first line) still masks the Kushman brothers. With the patch it will be 29, and all of the mask is removed.
A simpler case to verify by hand:
rect.left = 7 rect.right = 17 width = 10
Note that while pixel 17 is not considered to be inside the rectangle it still spans over three bytes of mask buffer. But we calculate the mask_width to 2.
I'm a bit too tired right now to feel confident enough to apply this change myself, but I *think* I got it right.
Ticket imported from: #744448. Ticket imported from: patches/341.