aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTorbjörn Andersson2006-10-04 05:11:58 +0000
committerTorbjörn Andersson2006-10-04 05:11:58 +0000
commit863bed3fd034ab9e7a93d5426aab5c00297f4340 (patch)
tree601a18a48e4e1df5b60449717b36b2dddfc329c2
parentbaac2939118a3cb6ca0d8f8ddd0d7b8edfe64109 (diff)
downloadscummvm-rg350-863bed3fd034ab9e7a93d5426aab5c00297f4340.tar.gz
scummvm-rg350-863bed3fd034ab9e7a93d5426aab5c00297f4340.tar.bz2
scummvm-rg350-863bed3fd034ab9e7a93d5426aab5c00297f4340.zip
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. svn-id: r24104
-rw-r--r--engines/scumm/akos.cpp2
-rw-r--r--engines/scumm/costume.cpp6
2 files changed, 4 insertions, 4 deletions
diff --git a/engines/scumm/akos.cpp b/engines/scumm/akos.cpp
index 2dfe3f03f1..148c3c0af2 100644
--- a/engines/scumm/akos.cpp
+++ b/engines/scumm/akos.cpp
@@ -564,7 +564,7 @@ void AkosRenderer::codec1_genericDecode(Codec1 &v1) {
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];
diff --git a/engines/scumm/costume.cpp b/engines/scumm/costume.cpp
index 5d81cdc441..82201a6017 100644
--- a/engines/scumm/costume.cpp
+++ b/engines/scumm/costume.cpp
@@ -443,7 +443,7 @@ void ClassicCostumeRenderer::proc3(Codec1 &v1) {
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 @@ void ClassicCostumeRenderer::proc3_ami(Codec1 &v1) {
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];
}