[Scummvm-cvs-logs] CVS: scummvm/scumm gfx.cpp,2.119,2.120
Max Horn
fingolfin at users.sourceforge.net
Tue May 27 16:24:08 CEST 2003
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv27177
Modified Files:
gfx.cpp
Log Message:
Patch #744448: ALL: restoreBG() doesn't always completely remove the mask
Index: gfx.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/gfx.cpp,v
retrieving revision 2.119
retrieving revision 2.120
diff -u -d -r2.119 -r2.120
--- gfx.cpp 26 May 2003 13:14:55 -0000 2.119
+++ gfx.cpp 27 May 2003 23:23:26 -0000 2.120
@@ -844,9 +844,13 @@
blit(backbuff, bgbak, width, height);
if (vs->number == 0 && _charset->_hasMask && height) {
byte *mask;
- int mask_width = (width >> 3);
+ // Note: At first sight it may look as if this could
+ // be optimized to (rect.right - rect.left) >> 3 and
+ // thus to width >> 3, but that's not the case since
+ // we are dealing with integer math here.
+ int mask_width = (rect.right >> 3) - (rect.left >> 3);
- if (width & 0x07)
+ if (rect.right & 0x07)
mask_width++;
mask = getResourceAddress(rtBuffer, 9) + rect.top * gdi._numStrips + (rect.left >> 3) + _screenStartStrip;
More information about the Scummvm-git-logs
mailing list