aboutsummaryrefslogtreecommitdiff
path: root/engines/parallaction/objects.cpp
diff options
context:
space:
mode:
authorNicola Mettifogo2009-02-24 08:42:46 +0000
committerNicola Mettifogo2009-02-24 08:42:46 +0000
commit659c9fb901bcbc3db1252ed0c9a7eb49c09853b4 (patch)
tree10f839dd9044d8edbfdb633fad65d19c0a853f4a /engines/parallaction/objects.cpp
parentd19ba951e825ce8ee4ae7c1c058ba517c678eb68 (diff)
downloadscummvm-rg350-659c9fb901bcbc3db1252ed0c9a7eb49c09853b4.tar.gz
scummvm-rg350-659c9fb901bcbc3db1252ed0c9a7eb49c09853b4.tar.bz2
scummvm-rg350-659c9fb901bcbc3db1252ed0c9a7eb49c09853b4.zip
Changed interface to walk code, to better handle the differences between games. Moreover:
* merged PathBuilder_BR into PathWalker_BR * implemented checkTrap routine for BRA svn-id: r38836
Diffstat (limited to 'engines/parallaction/objects.cpp')
-rw-r--r--engines/parallaction/objects.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/engines/parallaction/objects.cpp b/engines/parallaction/objects.cpp
index d132da4dcc..4dc3922207 100644
--- a/engines/parallaction/objects.cpp
+++ b/engines/parallaction/objects.cpp
@@ -112,6 +112,21 @@ void Animation::forceXYZF(int16 x, int16 y, int16 z, int16 f) {
_frame = f;
}
+void Animation::getFoot(Common::Point &foot) {
+ Common::Rect rect;
+ gfxobj->getRect(_frame, rect);
+ foot.x = getX() + (rect.left + rect.width() / 2);
+ foot.y = getY() + (rect.top + rect.height());
+}
+
+void Animation::setFoot(const Common::Point &foot) {
+ Common::Rect rect;
+ gfxobj->getRect(_frame, rect);
+
+ setX(foot.x - (rect.left + rect.width() / 2));
+ setY(foot.y - (rect.top + rect.height()));
+}
+
#define NUM_LOCALS 10
char _localNames[NUM_LOCALS][10];