COMPOSER: Use setPixel() and getPixel() methods to read and write to private pixel member
This commit is contained in:
parent
c3994cd6ea
commit
ec06c04faa
1 changed files with 2 additions and 2 deletions
|
@ -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]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue