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
This commit is contained in:
Max Horn 2002-06-04 23:32:53 +00:00
parent 31a2efd89c
commit d35eed21f1
9 changed files with 171 additions and 131 deletions

View file

@ -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;
Actor *a = derefActorSafe(act, "animateActor");
if (!a)
return;
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);
}
}
a->animateActor(anim);
}
bool Scumm::isScriptRunning(int script)