aboutsummaryrefslogtreecommitdiff
path: root/script.cpp
diff options
context:
space:
mode:
authorMax Horn2002-06-04 23:32:53 +0000
committerMax Horn2002-06-04 23:32:53 +0000
commitd35eed21f1cbd769bdad4e3028d16361c7bf9f74 (patch)
tree3d38928c8c0f89bdbc51dd660cdb79da4b5e30c6 /script.cpp
parent31a2efd89cdae6f8722af77177dba2a7763a94a5 (diff)
downloadscummvm-rg350-d35eed21f1cbd769bdad4e3028d16361c7bf9f74.tar.gz
scummvm-rg350-d35eed21f1cbd769bdad4e3028d16361c7bf9f74.tar.bz2
scummvm-rg350-d35eed21f1cbd769bdad4e3028d16361c7bf9f74.zip
more Actor class cleanup; renamed unkRoomFunc4 to palManipulate and added an icky, wrong implementation for it - yes this is complete nonsense but I'll try to replace it with the right thing RSN :-)
svn-id: r4404
Diffstat (limited to 'script.cpp')
-rw-r--r--script.cpp58
1 files changed, 4 insertions, 54 deletions
diff --git a/script.cpp b/script.cpp
index 4bcef00604..45dc2aa916 100644
--- a/script.cpp
+++ b/script.cpp
@@ -889,61 +889,11 @@ void Scumm::faceActorToObj(int act, int obj)
void Scumm::animateActor(int act, int anim)
{
- if (_features & GF_AFTER_V7) {
- int cmd, dir;
- Actor *a;
-
- a = derefActorSafe(act, "animateActor");
-
- if (anim == 0xFF)
- anim = 2000;
-
- cmd = anim / 1000;
- dir = anim % 1000;
-
- switch (cmd) {
- case 2:
- a->stopActorMoving();
- a->startAnimActor(a->standFrame);
- break;
- case 3:
- a->moving &= ~MF_TURN;
- a->setActorDirection(dir);
- break;
- case 4:
- a->turnToDirection(dir);
- break;
- default:
- a->startAnimActor(anim);
- }
-
- } else {
- int dir;
- Actor *a;
-
- a = derefActorSafe(act, "animateActor");
- if (!a)
- return;
-
- dir = anim & 3;
-
- switch (anim >> 2) {
- case 0x3F:
- a->stopActorMoving();
- a->startAnimActor(a->standFrame);
- break;
- case 0x3E:
- a->moving &= ~MF_TURN;
- a->setActorDirection(oldDirToNewDir(dir));
- break;
- case 0x3D:
- a->turnToDirection(oldDirToNewDir(dir));
- break;
- default:
- a->startAnimActor(anim);
- }
+ Actor *a = derefActorSafe(act, "animateActor");
+ if (!a)
+ return;
- }
+ a->animateActor(anim);
}
bool Scumm::isScriptRunning(int script)