DIRECTOR: Use bg sprite color for drawBackgndTransSprite()

This commit is contained in:
Eugene Sandulenko 2020-04-22 01:45:40 +02:00
parent 9ee9bc48be
commit bf1fecaa8e
2 changed files with 4 additions and 4 deletions

View File

@ -1074,7 +1074,7 @@ void Frame::inkBasedBlit(Graphics::ManagedSurface &targetSurface, const Graphics
targetSurface.transBlitFrom(spriteSurface, Common::Point(drawRect.left, drawRect.top), _vm->getPaletteColorCount() - 1);
break;
case kInkTypeBackgndTrans:
drawBackgndTransSprite(targetSurface, spriteSurface, drawRect);
drawBackgndTransSprite(targetSurface, spriteSurface, drawRect, spriteId);
break;
case kInkTypeMatte:
drawMatteSprite(targetSurface, spriteSurface, drawRect);
@ -1092,8 +1092,8 @@ void Frame::inkBasedBlit(Graphics::ManagedSurface &targetSurface, const Graphics
}
}
void Frame::drawBackgndTransSprite(Graphics::ManagedSurface &target, const Graphics::Surface &sprite, Common::Rect &drawRect) {
uint8 skipColor = _vm->getPaletteColorCount() - 1; // FIXME is it always white (last entry in pallette) ?
void Frame::drawBackgndTransSprite(Graphics::ManagedSurface &target, const Graphics::Surface &sprite, Common::Rect &drawRect, int spriteId) {
byte skipColor = _sprites[spriteId]->_backColor;
Common::Rect srcRect(sprite.w, sprite.h);
if (!target.clip(srcRect, drawRect))

View File

@ -92,7 +92,7 @@ private:
void readMainChannels(Common::SeekableSubReadStreamEndian &stream, uint16 offset, uint16 size);
Image::ImageDecoder *getImageFrom(uint16 spriteId);
Common::String readTextStream(Common::SeekableSubReadStreamEndian *textStream, TextCast *textCast);
void drawBackgndTransSprite(Graphics::ManagedSurface &target, const Graphics::Surface &sprite, Common::Rect &drawRect);
void drawBackgndTransSprite(Graphics::ManagedSurface &target, const Graphics::Surface &sprite, Common::Rect &drawRect, int spriteId);
void drawMatteSprite(Graphics::ManagedSurface &target, const Graphics::Surface &sprite, Common::Rect &drawRect);
void drawGhostSprite(Graphics::ManagedSurface &target, const Graphics::Surface &sprite, Common::Rect &drawRect);
void drawReverseSprite(Graphics::ManagedSurface &target, const Graphics::Surface &sprite, Common::Rect &drawRect, uint16 spriteId);