diff options
author | Johannes Schickel | 2013-08-03 02:38:22 +0200 |
---|---|---|
committer | Johannes Schickel | 2013-08-03 04:02:50 +0200 |
commit | 3fbc497e1c7fddc543aabf5886ccf364a3416efc (patch) | |
tree | cb3c185423427d587483d82441b1799b4b1f43ee /engines | |
parent | c87472110996a1a1ac03692287ac121b572a0753 (diff) | |
download | scummvm-rg350-3fbc497e1c7fddc543aabf5886ccf364a3416efc.tar.gz scummvm-rg350-3fbc497e1c7fddc543aabf5886ccf364a3416efc.tar.bz2 scummvm-rg350-3fbc497e1c7fddc543aabf5886ccf364a3416efc.zip |
COMPOSER: Take advantage of Surface::getPixels.
Diffstat (limited to 'engines')
-rw-r--r-- | engines/composer/graphics.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/engines/composer/graphics.cpp b/engines/composer/graphics.cpp index a751da20a3..caf3ba3a40 100644 --- a/engines/composer/graphics.cpp +++ b/engines/composer/graphics.cpp @@ -39,7 +39,7 @@ bool Sprite::contains(const Common::Point &pos) const { return false; if (adjustedPos.y < 0 || adjustedPos.y >= _surface.h) return false; - const byte *pixels = (const byte *)_surface.getBasePtr(0, 0); + const byte *pixels = (const byte *)_surface.getPixels(); return (pixels[(_surface.h - adjustedPos.y - 1) * _surface.w + adjustedPos.x] != 0); } @@ -794,7 +794,7 @@ bool ComposerEngine::initSprite(Sprite &sprite) { if (width > 0 && height > 0) { sprite._surface.create(width, height, Graphics::PixelFormat::createFormatCLUT8()); - decompressBitmap(type, stream, (byte *)sprite._surface.getBasePtr(0, 0), size, width, height); + decompressBitmap(type, stream, (byte *)sprite._surface.getPixels(), size, width, height); } else { // there are some sprites (e.g. a -998x-998 one in Gregory's title screen) // which have an invalid size, but the original engine doesn't notice for @@ -814,7 +814,7 @@ void ComposerEngine::drawSprite(const Sprite &sprite) { int y = sprite._pos.y; // incoming data is BMP-style (bottom-up), so flip it - byte *pixels = (byte *)_screen.getBasePtr(0, 0); + byte *pixels = (byte *)_screen.getPixels(); for (int j = 0; j < sprite._surface.h; j++) { if (j + y < 0) continue; |