diff options
author | Dmitry Iskrich | 2016-06-30 20:04:05 +0300 |
---|---|---|
committer | Eugene Sandulenko | 2016-08-03 23:40:36 +0200 |
commit | 0f58203c021512396d8e3a32ada41f49eb0e1880 (patch) | |
tree | 37b1630f696d39d58d10b50bf855ada9efeeb206 /engines/director/score.cpp | |
parent | d70a76f1d6e5fdb5e7dd0a3c45f7c6acf4f8a94f (diff) | |
download | scummvm-rg350-0f58203c021512396d8e3a32ada41f49eb0e1880.tar.gz scummvm-rg350-0f58203c021512396d8e3a32ada41f49eb0e1880.tar.bz2 scummvm-rg350-0f58203c021512396d8e3a32ada41f49eb0e1880.zip |
DIRECTOR: Fix rendering resource, loading shared BMP
Diffstat (limited to 'engines/director/score.cpp')
-rw-r--r-- | engines/director/score.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/engines/director/score.cpp b/engines/director/score.cpp index c51c6cc159..6b9cdb293a 100644 --- a/engines/director/score.cpp +++ b/engines/director/score.cpp @@ -1164,6 +1164,10 @@ void Frame::renderSprites(Graphics::ManagedSurface &surface, bool renderTrail) { Image::ImageDecoder *img = getImageFrom(_sprites[i]->_castId); + if (!img) { + continue; + } + uint32 regX = static_cast<BitmapCast *>(_sprites[i]->_cast)->regX; uint32 regY = static_cast<BitmapCast *>(_sprites[i]->_cast)->regY; uint32 rectLeft = static_cast<BitmapCast *>(_sprites[i]->_cast)->initialRect.left; @@ -1224,7 +1228,11 @@ Image::ImageDecoder *Frame::getImageFrom(uint16 spriteId) { return img; } - //TODO Shared bitmaps + if (_vm->getSharedBMP()->contains(imgId)) { + img = new Image::BitmapDecoder(); + img->loadStream(*_vm->getSharedBMP()->getVal(imgId)); + return img; + } warning("Image %d not found", spriteId); return img; |