diff options
author | Max Horn | 2003-01-01 18:22:41 +0000 |
---|---|---|
committer | Max Horn | 2003-01-01 18:22:41 +0000 |
commit | 535ad0a4cf8fe0325f04a665c4dbf0773f7e66b0 (patch) | |
tree | 2ddde9bb8c58f1059e6df4278d1720738c152e24 /scumm/actor.cpp | |
parent | 53a8fc24fe6b248234a2e2b5036526097f5a7834 (diff) | |
download | scummvm-rg350-535ad0a4cf8fe0325f04a665c4dbf0773f7e66b0.tar.gz scummvm-rg350-535ad0a4cf8fe0325f04a665c4dbf0773f7e66b0.tar.bz2 scummvm-rg350-535ad0a4cf8fe0325f04a665c4dbf0773f7e66b0.zip |
moved Scumm::faceActorToObj to Actor::faceToObject; moved various functions in script.cpp (grouping cutscene/override related stuff)
svn-id: r6317
Diffstat (limited to 'scumm/actor.cpp')
-rw-r--r-- | scumm/actor.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/scumm/actor.cpp b/scumm/actor.cpp index 2442e8fa73..746e26fe81 100644 --- a/scumm/actor.cpp +++ b/scumm/actor.cpp @@ -27,7 +27,7 @@ #include "charset.h" #include "costume.h" #include "resource.h" -#include "scumm/sound.h" +#include "sound.h" #include <math.h> @@ -722,6 +722,20 @@ void Actor::adjustActorPos() } } +void Actor::factToObject(int obj) +{ + int x2, y2, dir; + + if (!isInCurrentRoom()) + return; + + if (_vm->getObjectOrActorXY(obj, x2, y2) == -1) + return; + + dir = (x2 > x) ? 90 : 270; + turnToDirection(dir); +} + void Actor::turnToDirection(int newdir) { if (newdir == -1) |