diff options
author | Johannes Schickel | 2015-12-14 03:50:45 +0100 |
---|---|---|
committer | Johannes Schickel | 2015-12-14 05:08:05 +0100 |
commit | 74321fcd22e6bb6598abfefc9a52de87a422ee7a (patch) | |
tree | 181bada4e7766a5edbc39910604a59c5d1d8f6c9 /engines/sword25/gfx/image/renderedimage.cpp | |
parent | f7683083e2f47d9608f7ef3c4babfa56cb55bae0 (diff) | |
download | scummvm-rg350-74321fcd22e6bb6598abfefc9a52de87a422ee7a.tar.gz scummvm-rg350-74321fcd22e6bb6598abfefc9a52de87a422ee7a.tar.bz2 scummvm-rg350-74321fcd22e6bb6598abfefc9a52de87a422ee7a.zip |
SWORD25: Let ImgLoader write into Graphics::Surface.
Diffstat (limited to 'engines/sword25/gfx/image/renderedimage.cpp')
-rw-r--r-- | engines/sword25/gfx/image/renderedimage.cpp | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/engines/sword25/gfx/image/renderedimage.cpp b/engines/sword25/gfx/image/renderedimage.cpp index 8c6369a790..0225787fde 100644 --- a/engines/sword25/gfx/image/renderedimage.cpp +++ b/engines/sword25/gfx/image/renderedimage.cpp @@ -126,19 +126,10 @@ RenderedImage::RenderedImage(const Common::String &filename, bool &result) : } // Uncompress the image - int pitch; - byte *dst; - int w, h; if (isPNG) - result = ImgLoader::decodePNGImage(pFileData, fileSize, dst, w, h, pitch); + result = ImgLoader::decodePNGImage(pFileData, fileSize, &_surface); else - result = ImgLoader::decodeThumbnailImage(pFileData, fileSize, dst, w, h, pitch); - - _surface.w = w; - _surface.h = h; - _surface.pitch = w * 4; - _surface.setPixels(dst); - _surface.format = Graphics::PixelFormat(4, 8, 8, 8, 8, 24, 16, 8, 0); + result = ImgLoader::decodeThumbnailImage(pFileData, fileSize, &_surface); if (!result) { error("Could not decode image."); |