diff options
author | Johannes Schickel | 2013-08-03 03:56:08 +0200 |
---|---|---|
committer | Johannes Schickel | 2013-08-03 04:14:08 +0200 |
commit | eb224176391ff3860d4210d7c4fcca09bee3ea31 (patch) | |
tree | df46784f4f872a1dc01f45206a1f5ca550f0c2ad /engines/sword25 | |
parent | d06cbe90435753055724927f57099d437393b0f3 (diff) | |
download | scummvm-rg350-eb224176391ff3860d4210d7c4fcca09bee3ea31.tar.gz scummvm-rg350-eb224176391ff3860d4210d7c4fcca09bee3ea31.tar.bz2 scummvm-rg350-eb224176391ff3860d4210d7c4fcca09bee3ea31.zip |
SWORD25: Do not set Surface::pixels directly anymore.
Diffstat (limited to 'engines/sword25')
-rw-r--r-- | engines/sword25/gfx/image/renderedimage.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/engines/sword25/gfx/image/renderedimage.cpp b/engines/sword25/gfx/image/renderedimage.cpp index c0138c8fd3..346b46f3b4 100644 --- a/engines/sword25/gfx/image/renderedimage.cpp +++ b/engines/sword25/gfx/image/renderedimage.cpp @@ -251,14 +251,10 @@ bool RenderedImage::blit(int posX, int posY, int flipping, Common::Rect *pPartRe // Create an encapsulating surface for the data Graphics::Surface srcImage; // TODO: Is the data really in the screen format? - srcImage.format = g_system->getScreenFormat(); - srcImage.pitch = _width * 4; - srcImage.w = _width; - srcImage.h = _height; - srcImage.pixels = _data; + srcImage.init(_width, _height, _width * 4, _data, g_system->getScreenFormat()); if (pPartRect) { - srcImage.pixels = &_data[pPartRect->top * srcImage.pitch + pPartRect->left * 4]; + srcImage.setPixels(&_data[pPartRect->top * srcImage.pitch + pPartRect->left * 4]); srcImage.w = pPartRect->right - pPartRect->left; srcImage.h = pPartRect->bottom - pPartRect->top; @@ -464,7 +460,7 @@ bool RenderedImage::blit(int posX, int posY, int flipping, Common::Rect *pPartRe } if (imgScaled) { - imgScaled->pixels = savedPixels; + imgScaled->setPixels(savedPixels); imgScaled->free(); delete imgScaled; } |