diff options
Diffstat (limited to 'engines/parallaction/graphics.cpp')
-rw-r--r-- | engines/parallaction/graphics.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/engines/parallaction/graphics.cpp b/engines/parallaction/graphics.cpp index e40d954f10..41f818a8a8 100644 --- a/engines/parallaction/graphics.cpp +++ b/engines/parallaction/graphics.cpp @@ -565,14 +565,17 @@ void Gfx::backupDoorBackground(DoorData *data, int16 x, int16 y) { void Gfx::backupGetBackground(GetData *data, int16 x, int16 y) { - byte *t = (byte*)data->_cnv->pixels; + byte *t = (byte*)data->_cnv->getData(0); byte *s = (byte*)_buffers[kBitBack]->getBasePtr(x, y); byte *d = data->_backup; - uint pitch = _backgroundWidth - data->_cnv->w; + Common::Rect r; + data->_cnv->getRect(0, r); + + uint pitch = _backgroundWidth - r.width(); - for (uint16 i = 0; i < data->_cnv->h ; i++) { - for (uint16 j = 0; j < data->_cnv->w ; j++) { + for (uint16 i = 0; i < r.height(); i++) { + for (uint16 j = 0; j < r.width(); j++) { *d = (*t) ? *s : 0; d++; |