aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2005-05-18 23:57:17 +0000
committerEugene Sandulenko2005-05-18 23:57:17 +0000
commit829c9a1b1a12bcd3ba68e7f83f19e8c3ae3953cf (patch)
treef4ac49e668ee7737742e21e23805267541fff986
parent7fb2eda235ffb4bcfc6770a2b5292c3642929349 (diff)
downloadscummvm-rg350-829c9a1b1a12bcd3ba68e7f83f19e8c3ae3953cf.tar.gz
scummvm-rg350-829c9a1b1a12bcd3ba68e7f83f19e8c3ae3953cf.tar.bz2
scummvm-rg350-829c9a1b1a12bcd3ba68e7f83f19e8c3ae3953cf.zip
Fix yet another actor masking issue
svn-id: r18178
-rw-r--r--scumm/gfx.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/scumm/gfx.cpp b/scumm/gfx.cpp
index db6acc0818..5de165851d 100644
--- a/scumm/gfx.cpp
+++ b/scumm/gfx.cpp
@@ -2116,8 +2116,6 @@ void Gdi::drawStripNES(byte *dst, byte *mask, int dstPitch, int stripnr, int top
}
void Gdi::drawStripNESMask(byte *dst, int stripnr, int top, int height) const {
- if (!_NES.hasmask)
- return;
top /= 8;
height /= 8;
int x = stripnr; // masks, unlike room graphics, should NOT be adjusted
@@ -2129,7 +2127,12 @@ void Gdi::drawStripNESMask(byte *dst, int stripnr, int top, int height) const {
return;
}
for (int y = top; y < top + height; y++) {
- byte c = (((_objectMode ? _NES.masktableObj : _NES.masktable)[y][x >> 3] >> (x & 7)) & 1) ? 0xFF : 0x00;
+ byte c;
+ if (_NES.hasmask)
+ c = (((_objectMode ? _NES.masktableObj : _NES.masktable)[y][x >> 3] >> (x & 7)) & 1) ? 0xFF : 0x00;
+ else
+ c = 0;
+
for (int i = 0; i < 8; i++) {
*dst &= c;
dst += _numStrips;