From 919c0a2833273d3ae92d0eb3635a479c34e1ced9 Mon Sep 17 00:00:00 2001 From: Nicola Mettifogo Date: Thu, 22 Nov 2007 21:51:33 +0000 Subject: * added adapter from Graphics::Surface to Frames * changed all Disk routines to return Frames* instead of Graphics::Surface* * changed displayItemComment to use new gfx routines * merged code for Examine zones into displayComment svn-id: r29615 --- engines/parallaction/graphics.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'engines/parallaction/graphics.cpp') 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++; -- cgit v1.2.3