diff options
author | Nicola Mettifogo | 2007-08-25 20:34:10 +0000 |
---|---|---|
committer | Nicola Mettifogo | 2007-08-25 20:34:10 +0000 |
commit | 39e4a9b180d37f2fef108391d5f04a3c7e3b2ea0 (patch) | |
tree | bd7bd96adb2d8df6677d1e25b9e4b98e2851bbad /engines/parallaction/graphics.cpp | |
parent | 9f8b0884fa2814b04567a86596cdae7953d8eb1e (diff) | |
download | scummvm-rg350-39e4a9b180d37f2fef108391d5f04a3c7e3b2ea0.tar.gz scummvm-rg350-39e4a9b180d37f2fef108391d5f04a3c7e3b2ea0.tar.bz2 scummvm-rg350-39e4a9b180d37f2fef108391d5f04a3c7e3b2ea0.zip |
Added an abstract base class for representing multiple-frames for animations. Changed user code to rely on the new interface. Cnv has been turned into an implementation of the new interface, and it is now known as a concrete class only to Disk and Font code for Nippon Safes.
svn-id: r28734
Diffstat (limited to 'engines/parallaction/graphics.cpp')
-rw-r--r-- | engines/parallaction/graphics.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/engines/parallaction/graphics.cpp b/engines/parallaction/graphics.cpp index c142779167..1cf5216963 100644 --- a/engines/parallaction/graphics.cpp +++ b/engines/parallaction/graphics.cpp @@ -463,13 +463,16 @@ void jobEraseLabel(void *parm, Job *j) { // // Cnv management // -void Gfx::flatBlitCnv(Cnv *cnv, uint16 frame, int16 x, int16 y, Gfx::Buffers buffer) { +void Gfx::flatBlitCnv(Frames *cnv, uint16 frame, int16 x, int16 y, Gfx::Buffers buffer) { Graphics::Surface scnv; + Common::Rect r; - scnv.w = cnv->_width; - scnv.h = cnv->_height; - scnv.pixels = cnv->getFramePtr(frame); + cnv->getRect(frame, r); + + scnv.w = r.width(); + scnv.h = r.height(); + scnv.pixels = cnv->getData(frame); flatBlitCnv(&scnv, x, y, buffer); } @@ -493,7 +496,9 @@ void Gfx::blitCnv(Graphics::Surface *cnv, int16 x, int16 y, uint16 z, Gfx::Buffe void Gfx::backupDoorBackground(DoorData *data, int16 x, int16 y) { byte *s = (byte*)_buffers[kBit2]->getBasePtr(x, y); - copyRect(data->_cnv->_width, data->_cnv->_height, data->_background, data->_cnv->_width, s,_backgroundWidth); + Common::Rect r; + data->_cnv->getRect(0, r); + copyRect(r.width(), r.height(), data->_background, r.width(), s,_backgroundWidth); return; } |