diff options
author | Paul Gilbert | 2014-03-14 22:21:52 -0400 |
---|---|---|
committer | Paul Gilbert | 2014-03-14 22:21:52 -0400 |
commit | 37bb5150d0d2c901b9bb88ec009a348f1de3d5b0 (patch) | |
tree | 34c88c053b49d59a99494d83a653e9c58f3e0caa /engines | |
parent | 12b79e817833fe17da717b88999da96e9bb1ec76 (diff) | |
download | scummvm-rg350-37bb5150d0d2c901b9bb88ec009a348f1de3d5b0.tar.gz scummvm-rg350-37bb5150d0d2c901b9bb88ec009a348f1de3d5b0.tar.bz2 scummvm-rg350-37bb5150d0d2c901b9bb88ec009a348f1de3d5b0.zip |
MADS: Fixes for handling sprite transparency
Diffstat (limited to 'engines')
-rw-r--r-- | engines/mads/sprites.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/engines/mads/sprites.cpp b/engines/mads/sprites.cpp index ff953ac21c..2d318c5ae2 100644 --- a/engines/mads/sprites.cpp +++ b/engines/mads/sprites.cpp @@ -70,15 +70,15 @@ MSprite::MSprite(Common::SeekableReadStream *source, const Common::Point &offset MSprite::~MSprite() { } -// TODO: The sprite outlines (pixel value 0xFD) are not shown void MSprite::loadSprite(Common::SeekableReadStream *source) { byte *outp, *lineStart; bool newLine = false; outp = getData(); lineStart = getData(); + Common::fill(outp, outp + this->w * this->h, getTransparencyIndex()); - while (1) { + for (;;) { byte cmd1, cmd2, count, pixel; if (newLine) { @@ -101,7 +101,7 @@ void MSprite::loadSprite(Common::SeekableReadStream *source) { } else { pixel = source->readByte(); while (count--) - *outp++ = (pixel == 0xFD) ? 0 : pixel; + *outp++ = (pixel == 0xFD) ? getTransparencyIndex() : pixel; } } } else { @@ -113,9 +113,9 @@ void MSprite::loadSprite(Common::SeekableReadStream *source) { count = source->readByte(); pixel = source->readByte(); while (count--) - *outp++ = (pixel == 0xFD) ? 0 : pixel; + *outp++ = (pixel == 0xFD) ? getTransparencyIndex() : pixel; } else { - *outp++ = (cmd2 == 0xFD) ? 0 : cmd2; + *outp++ = (cmd2 == 0xFD) ? getTransparencyIndex() : cmd2; } } } |