diff options
author | Strangerke | 2013-10-02 23:39:18 +0200 |
---|---|---|
committer | Strangerke | 2013-10-02 23:39:18 +0200 |
commit | efe6236e7ba901571123e11d4a2c9d36ba0a9069 (patch) | |
tree | 72781e4cce11282befe7d899705526727fbeb52a /engines/avalanche/background.cpp | |
parent | 9093b2c258c9f39a594265fa856af1a62a2a283a (diff) | |
download | scummvm-rg350-efe6236e7ba901571123e11d4a2c9d36ba0a9069.tar.gz scummvm-rg350-efe6236e7ba901571123e11d4a2c9d36ba0a9069.tar.bz2 scummvm-rg350-efe6236e7ba901571123e11d4a2c9d36ba0a9069.zip |
AVALANCHE: Make _surface private
Diffstat (limited to 'engines/avalanche/background.cpp')
-rw-r--r-- | engines/avalanche/background.cpp | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/engines/avalanche/background.cpp b/engines/avalanche/background.cpp index e72e4a4cca..99bb446d3f 100644 --- a/engines/avalanche/background.cpp +++ b/engines/avalanche/background.cpp @@ -294,16 +294,9 @@ void Background::load(byte number) { _sprites[i]._yl = sprite._yl; _sprites[i]._type = sprite._type; - if (natural) { - _sprites[i]._type = kNaturalImage; // We simply read from the screen and later, in drawSprite() we draw it right back. - _sprites[i]._size = _sprites[i]._xl * 8 * _sprites[i]._yl + 1; - _sprites[i]._picture.create(_sprites[i]._xl * 8, _sprites[i]._yl + 1, Graphics::PixelFormat::createFormatCLUT8()); - - for (uint16 y = 0; y < _sprites[i]._yl + 1; y++) { - for (uint16 x = 0; x < _sprites[i]._xl * 8; x++) - *(byte *)_sprites[i]._picture.getBasePtr(x, y) = *(byte *)_vm->_graphics->_surface.getBasePtr(_sprites[i]._x * 8 + x, _sprites[i]._y + y); - } - } else { + if (natural) + _vm->_graphics->getNaturalPicture(_sprites[i]); + else { _sprites[i]._size = sprite._size; _sprites[i]._picture = _vm->_graphics->loadPictureRow(f, _sprites[i]._xl * 8, _sprites[i]._yl + 1); } |