diff options
author | angstsmurf | 2016-10-18 03:09:19 +0200 |
---|---|---|
committer | angstsmurf | 2016-10-18 03:09:19 +0200 |
commit | ec06c04faa7a14e3586849a670ff8db71d43a7ca (patch) | |
tree | f698b2d46dbb0afd127da8580de12a0ddb90d6f5 | |
parent | c3994cd6ea1a616164869f54659339b462aafc2a (diff) | |
download | scummvm-rg350-ec06c04faa7a14e3586849a670ff8db71d43a7ca.tar.gz scummvm-rg350-ec06c04faa7a14e3586849a670ff8db71d43a7ca.tar.bz2 scummvm-rg350-ec06c04faa7a14e3586849a670ff8db71d43a7ca.zip |
COMPOSER: Use setPixel() and getPixel() methods to read and write to private pixel member
-rw-r--r-- | engines/composer/saveload.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/composer/saveload.cpp b/engines/composer/saveload.cpp index ae55f908a8..ea657a9dd4 100644 --- a/engines/composer/saveload.cpp +++ b/engines/composer/saveload.cpp @@ -256,8 +256,8 @@ void ComposerEngine::sync<Sprite>(Common::Serializer &ser, Sprite &data, Common: ser.syncAsUint16LE(data._surface.pitch); ser.syncAsUint16LE(data._zorder); if (ser.isLoading()) - data._surface.pixels = malloc(data._surface.h * data._surface.pitch); - byte *pix = static_cast<byte *>(data._surface.pixels); + data._surface.setPixels(malloc(data._surface.h * data._surface.pitch)); + byte *pix = static_cast<byte *>(data._surface.getPixels()); for (uint16 y = 0; y < data._surface.h; y++) { for (uint16 x = 0; x < data._surface.w; x++) { ser.syncAsByte(pix[x]); |