diff options
Diffstat (limited to 'engines/mads/sprites.cpp')
-rw-r--r-- | engines/mads/sprites.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/engines/mads/sprites.cpp b/engines/mads/sprites.cpp index c67c905251..cd358077b5 100644 --- a/engines/mads/sprites.cpp +++ b/engines/mads/sprites.cpp @@ -54,14 +54,14 @@ typedef Common::List<DepthEntry> DepthList; /*------------------------------------------------------------------------*/ -MSprite::MSprite() - : MSurface() { +MSprite::MSprite() : MSurface() { + _transparencyIndex = TRANSPARENT_COLOR_INDEX; } MSprite::MSprite(Common::SeekableReadStream *source, const Common::Array<RGB6> &palette, const Common::Rect &bounds) : MSurface(bounds.width(), bounds.height()), - _offset(Common::Point(bounds.left, bounds.top)), _transparencyIndex(0xFF) { + _offset(Common::Point(bounds.left, bounds.top)), _transparencyIndex(TRANSPARENT_COLOR_INDEX) { // Load the sprite data loadSprite(source, palette); } @@ -133,7 +133,7 @@ void MSprite::loadSprite(Common::SeekableReadStream *source, } byte MSprite::getTransparencyIndex() const { - return TRANSPARENT_COLOR_INDEX; + return _transparencyIndex; } /*------------------------------------------------------------------------*/ @@ -253,15 +253,14 @@ void SpriteSlots::drawBackground() { if (spriteSlot._scale != -1) { // Adjust the drawing position pt.x -= frame->w / 2; - pt.y -= frame->h / 2; + pt.y -= frame->h - 1; } - if (spriteSlot._depth <= 1) { frame->copyTo(&scene._backgroundSurface, pt, frame->getTransparencyIndex()); } else if (scene._depthStyle == 0) { scene._backgroundSurface.copyFrom(frame, pt, spriteSlot._depth, &scene._depthSurface, - 100, frame->getTransparencyIndex()); + -1, false, frame->getTransparencyIndex()); } else { error("Unsupported depth style"); } |