From ec06c04faa7a14e3586849a670ff8db71d43a7ca Mon Sep 17 00:00:00 2001 From: angstsmurf Date: Tue, 18 Oct 2016 03:09:19 +0200 Subject: COMPOSER: Use setPixel() and getPixel() methods to read and write to private pixel member --- engines/composer/saveload.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines/composer') 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(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(data._surface.pixels); + data._surface.setPixels(malloc(data._surface.h * data._surface.pitch)); + byte *pix = static_cast(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]); -- cgit v1.2.3