diff options
Diffstat (limited to 'graphics/decoders/bmp.cpp')
-rw-r--r-- | graphics/decoders/bmp.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/graphics/decoders/bmp.cpp b/graphics/decoders/bmp.cpp index bcfd0abbda..51e43075a5 100644 --- a/graphics/decoders/bmp.cpp +++ b/graphics/decoders/bmp.cpp @@ -130,14 +130,14 @@ bool BitmapDecoder::loadStream(Common::SeekableReadStream &stream) { const int extraDataLength = (srcPitch % 4) ? 4 - (srcPitch % 4) : 0; if (bitsPerPixel == 8) { - byte *dst = (byte *)_surface->pixels; + byte *dst = (byte *)_surface->getBasePtr(0, 0); for (int32 i = 0; i < height; i++) { stream.read(dst + (height - i - 1) * width, width); stream.skip(extraDataLength); } } else if (bitsPerPixel == 24) { - byte *dst = (byte *)_surface->pixels + (height - 1) * _surface->pitch; + byte *dst = (byte *)_surface->getBasePtr(0, height - 1); for (int32 i = 0; i < height; i++) { for (uint32 j = 0; j < width; j++) { @@ -154,7 +154,7 @@ bool BitmapDecoder::loadStream(Common::SeekableReadStream &stream) { dst -= _surface->pitch * 2; } } else { // 32 bpp - byte *dst = (byte *)_surface->pixels + (height - 1) * _surface->pitch; + byte *dst = (byte *)_surface->getBasePtr(0, height - 1); for (int32 i = 0; i < height; i++) { for (uint32 j = 0; j < width; j++) { |