Skip to content

Commit

Permalink
COMPOSER: Use setPixel() and getPixel() methods to read and write to …
Browse files Browse the repository at this point in the history
…private pixel member
  • Loading branch information
angstsmurf committed Oct 18, 2016
1 parent c3994cd commit ec06c04
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions engines/composer/saveload.cpp
Expand Up @@ -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]);
Expand Down

0 comments on commit ec06c04

Please sign in to comment.