diff options
author | Johannes Schickel | 2013-08-03 00:49:23 +0200 |
---|---|---|
committer | Johannes Schickel | 2013-08-03 02:52:33 +0200 |
commit | 5afa6f97f46f2ce22b3c0ae6bca6338acd74bd14 (patch) | |
tree | de960497b9adb862b2feff9c8801e4f6f16852b6 /engines/sword25/gfx/image | |
parent | d91c379f16e6a75f3dac6464630bccc0d4437f40 (diff) | |
download | scummvm-rg350-5afa6f97f46f2ce22b3c0ae6bca6338acd74bd14.tar.gz scummvm-rg350-5afa6f97f46f2ce22b3c0ae6bca6338acd74bd14.tar.bz2 scummvm-rg350-5afa6f97f46f2ce22b3c0ae6bca6338acd74bd14.zip |
SWORD25: Prefer getBasePtr over direct Surface::pixels access.
Diffstat (limited to 'engines/sword25/gfx/image')
-rw-r--r-- | engines/sword25/gfx/image/imgloader.cpp | 2 | ||||
-rw-r--r-- | engines/sword25/gfx/image/renderedimage.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/engines/sword25/gfx/image/imgloader.cpp b/engines/sword25/gfx/image/imgloader.cpp index e103626416..6a458a0ae1 100644 --- a/engines/sword25/gfx/image/imgloader.cpp +++ b/engines/sword25/gfx/image/imgloader.cpp @@ -50,7 +50,7 @@ bool ImgLoader::decodePNGImage(const byte *fileDataPtr, uint fileSize, byte *&un width = pngSurface->w; height = pngSurface->h; uncompressedDataPtr = new byte[pngSurface->pitch * pngSurface->h]; - memcpy(uncompressedDataPtr, (byte *)pngSurface->pixels, pngSurface->pitch * pngSurface->h); + memcpy(uncompressedDataPtr, (byte *)pngSurface->getBasePtr(0, 0), pngSurface->pitch * pngSurface->h); pngSurface->free(); delete pngSurface; diff --git a/engines/sword25/gfx/image/renderedimage.cpp b/engines/sword25/gfx/image/renderedimage.cpp index 9b8cf2266d..f8ed7a00b2 100644 --- a/engines/sword25/gfx/image/renderedimage.cpp +++ b/engines/sword25/gfx/image/renderedimage.cpp @@ -287,7 +287,7 @@ bool RenderedImage::blit(int posX, int posY, int flipping, Common::Rect *pPartRe if ((width != srcImage.w) || (height != srcImage.h)) { // Scale the image img = imgScaled = scale(srcImage, width, height); - savedPixels = (byte *)img->pixels; + savedPixels = (byte *)img->getBasePtr(0, 0); } else { img = &srcImage; } |