aboutsummaryrefslogtreecommitdiff
path: root/engines/parallaction/objects.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/parallaction/objects.cpp')
-rw-r--r--engines/parallaction/objects.cpp21
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;