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/objects.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/objects.cpp')
-rw-r--r-- | engines/parallaction/objects.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/engines/parallaction/objects.cpp b/engines/parallaction/objects.cpp index add2f87b5e..195d814265 100644 --- a/engines/parallaction/objects.cpp +++ b/engines/parallaction/objects.cpp @@ -62,22 +62,26 @@ Animation::~Animation() { uint16 Animation::width() const { if (!_cnv) return 0; - return _cnv->_width; + Common::Rect r; + _cnv->getRect(0, r); + return r.width(); } uint16 Animation::height() const { if (!_cnv) return 0; - return _cnv->_height; + Common::Rect r; + _cnv->getRect(0, r); + return r.height(); } uint16 Animation::getFrameNum() const { if (!_cnv) return 0; - return _cnv->_count; + return _cnv->getNum(); } byte* Animation::getFrameData(uint32 index) const { if (!_cnv) return NULL; - return _cnv->getFramePtr(index); + return _cnv->getData(index); } |