diff options
author | Nicola Mettifogo | 2008-08-15 08:44:41 +0000 |
---|---|---|
committer | Nicola Mettifogo | 2008-08-15 08:44:41 +0000 |
commit | 22eaffcb343c688defbcd53445ad111390edb71d (patch) | |
tree | 3b0cb32a54def2af1e6e2deb00fda2dbbcf4de7c /engines/parallaction/objects.cpp | |
parent | 0606fef24e03580d2d2f3c34f9fd254f361d7623 (diff) | |
download | scummvm-rg350-22eaffcb343c688defbcd53445ad111390edb71d.tar.gz scummvm-rg350-22eaffcb343c688defbcd53445ad111390edb71d.tar.bz2 scummvm-rg350-22eaffcb343c688defbcd53445ad111390edb71d.zip |
Updated layer calculation: animations are now hidden properly by background elements (but not items yet).
svn-id: r33894
Diffstat (limited to 'engines/parallaction/objects.cpp')
-rw-r--r-- | engines/parallaction/objects.cpp | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/engines/parallaction/objects.cpp b/engines/parallaction/objects.cpp index 6aeae3a92f..d2332643ed 100644 --- a/engines/parallaction/objects.cpp +++ b/engines/parallaction/objects.cpp @@ -71,6 +71,20 @@ uint16 Animation::height() const { return r.height(); } +int16 Animation::getFrameX() const { + if (!gfxobj) return _left; + Common::Rect r; + gfxobj->getRect(_frame, r); + return r.left + _left; +} + +int16 Animation::getFrameY() const { + if (!gfxobj) return _top; + Common::Rect r; + gfxobj->getRect(_frame, r); + return r.top + _top; +} + uint16 Animation::getFrameNum() const { if (!gfxobj) return 0; return gfxobj->getNum(); @@ -198,13 +212,6 @@ Zone::~Zone() { free(_linkedName); } -void Zone::getRect(Common::Rect& r) const { - r.left = _left; - r.right = _right; - r.top = _top; - r.bottom = _bottom; -} - void Zone::translate(int16 x, int16 y) { _left += x; _right += x; |