diff options
author | Johannes Schickel | 2013-08-03 02:14:51 +0200 |
---|---|---|
committer | Johannes Schickel | 2013-08-03 04:02:49 +0200 |
commit | dbef9fef3b65cfd74a25ecb8767e1ba396f5b3b1 (patch) | |
tree | 8adba23b7b98b364ee400678f0b6290b1750f57b /graphics/decoders/pcx.cpp | |
parent | 6fce92b0ea2fce78c375ade0bc6c2ac4231b96bd (diff) | |
download | scummvm-rg350-dbef9fef3b65cfd74a25ecb8767e1ba396f5b3b1.tar.gz scummvm-rg350-dbef9fef3b65cfd74a25ecb8767e1ba396f5b3b1.tar.bz2 scummvm-rg350-dbef9fef3b65cfd74a25ecb8767e1ba396f5b3b1.zip |
GRAPHICS: Prefer getBasePtr over direct Surface::pixels access.
Diffstat (limited to 'graphics/decoders/pcx.cpp')
-rw-r--r-- | graphics/decoders/pcx.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/graphics/decoders/pcx.cpp b/graphics/decoders/pcx.cpp index 1250398c73..5815633545 100644 --- a/graphics/decoders/pcx.cpp +++ b/graphics/decoders/pcx.cpp @@ -117,7 +117,7 @@ bool PCXDecoder::loadStream(Common::SeekableReadStream &stream) { if (nPlanes == 3 && bitsPerPixel == 8) { // 24bpp Graphics::PixelFormat format = Graphics::PixelFormat(4, 8, 8, 8, 8, 24, 16, 8, 0); _surface->create(width, height, format); - dst = (byte *)_surface->pixels; + dst = (byte *)_surface->getBasePtr(0, 0); _paletteColorCount = 0; for (y = 0; y < height; y++) { @@ -135,7 +135,7 @@ bool PCXDecoder::loadStream(Common::SeekableReadStream &stream) { } } else if (nPlanes == 1 && bitsPerPixel == 8) { // 8bpp indexed _surface->create(width, height, Graphics::PixelFormat::createFormatCLUT8()); - dst = (byte *)_surface->pixels; + dst = (byte *)_surface->getBasePtr(0, 0); _paletteColorCount = 16; for (y = 0; y < height; y++, dst += _surface->pitch) { @@ -163,7 +163,7 @@ bool PCXDecoder::loadStream(Common::SeekableReadStream &stream) { } } else if ((nPlanes == 2 || nPlanes == 3 || nPlanes == 4) && bitsPerPixel == 1) { // planar, 4, 8 or 16 colors _surface->create(width, height, Graphics::PixelFormat::createFormatCLUT8()); - dst = (byte *)_surface->pixels; + dst = (byte *)_surface->getBasePtr(0, 0); _paletteColorCount = 16; for (y = 0; y < height; y++, dst += _surface->pitch) { |