[Scummvm-cvs-logs] SF.net SVN: scummvm: [24104] scummvm/trunk/engines/scumm

eriktorbjorn at users.sourceforge.net eriktorbjorn at users.sourceforge.net
Wed Oct 4 07:12:04 CEST 2006


Revision: 24104
          http://svn.sourceforge.net/scummvm/?rev=24104&view=rev
Author:   eriktorbjorn
Date:     2006-10-03 22:11:58 -0700 (Tue, 03 Oct 2006)

Log Message:
-----------
Change masking condition for codec1_genericDecode(), proc3() and proc3_ami() so
that X coordinates outside the designated area are explicitly masked. While the
functions are written to terminate when X moves outside, bug #1508942 ("FOA:
Glitch dring balloon flight") demonstrates that X may *start* outside. That's
the case we want to mask.

Note that proc3_ami() already masked these pixels (in a different way), so
there the change is purely cosmetical.

Modified Paths:
--------------
    scummvm/trunk/engines/scumm/akos.cpp
    scummvm/trunk/engines/scumm/costume.cpp

Modified: scummvm/trunk/engines/scumm/akos.cpp
===================================================================
--- scummvm/trunk/engines/scumm/akos.cpp	2006-10-04 03:29:14 UTC (rev 24103)
+++ scummvm/trunk/engines/scumm/akos.cpp	2006-10-04 05:11:58 UTC (rev 24104)
@@ -564,7 +564,7 @@
 						return;
 					}
 				} else {
-					masked = (y < v1.boundsRect.top || y >= v1.boundsRect.bottom) || (*mask & maskbit);
+					masked = (y < v1.boundsRect.top || y >= v1.boundsRect.bottom) || (v1.x < 0 || v1.x >= v1.boundsRect.right) || (*mask & maskbit);
 
 					if (color && !masked && !skip_column) {
 						pcolor = palette[color];

Modified: scummvm/trunk/engines/scumm/costume.cpp
===================================================================
--- scummvm/trunk/engines/scumm/costume.cpp	2006-10-04 03:29:14 UTC (rev 24103)
+++ scummvm/trunk/engines/scumm/costume.cpp	2006-10-04 05:11:58 UTC (rev 24104)
@@ -443,7 +443,7 @@
 
 		do {
 			if (_scaleY == 255 || v1.scaletable[scaleIndexY++] < _scaleY) {
-				masked = (y < 0 || y >= _out.h) || (v1.mask_ptr && (mask[0] & maskbit));
+				masked = (y < 0 || y >= _out.h) || (v1.x < 0 || v1.x >= _out.w) || (v1.mask_ptr && (mask[0] & maskbit));
 				
 				if (color && !masked) {
 					if (_shadow_mode & 0x20) {
@@ -510,9 +510,9 @@
 			len = *src++;
 		do {
 			if (_scaleY == 255 || v1.scaletable[_scaleIndexY] < _scaleY) {
-				masked = (y < 0 || y >= _out.h) || (v1.mask_ptr && (mask[0] & maskbit));
+				masked = (y < 0 || y >= _out.h) || (v1.x < 0 || v1.x >= _out.w) || (v1.mask_ptr && (mask[0] & maskbit));
 				
-				if (color && v1.x >= 0 && v1.x < _out.w && !masked) {
+				if (color && !masked) {
 					*dst = _palette[color];
 				}
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list