diff options
author | Max Horn | 2002-08-04 02:53:50 +0000 |
---|---|---|
committer | Max Horn | 2002-08-04 02:53:50 +0000 |
commit | 8779d00789258b1cf90be703540efd62aa50dd1d (patch) | |
tree | 104d552c882d8f2958b83fd4d62466b3353337ea | |
parent | 77daed66eae0e1526c1aee7558a2b08250f6bd78 (diff) | |
download | scummvm-rg350-8779d00789258b1cf90be703540efd62aa50dd1d.tar.gz scummvm-rg350-8779d00789258b1cf90be703540efd62aa50dd1d.tar.bz2 scummvm-rg350-8779d00789258b1cf90be703540efd62aa50dd1d.zip |
workaround for bug #558236; renamed actorAnimate to animateCostume (to distinguish it a bit from animateActor); removed Scumm::animateActor
svn-id: r4695
-rw-r--r-- | actor.cpp | 8 | ||||
-rw-r--r-- | actor.h | 2 | ||||
-rw-r--r-- | script.cpp | 10 | ||||
-rw-r--r-- | script_v1.cpp | 11 | ||||
-rw-r--r-- | script_v2.cpp | 6 | ||||
-rw-r--r-- | scumm.h | 1 |
6 files changed, 19 insertions, 19 deletions
@@ -682,6 +682,10 @@ void Actor::turnToDirection(int newdir) if (newdir != facing) { moving = MF_TURN; newDirection = newdir; + + // FIXME - workaround for bug #558236 + if (_vm->_gameId == GID_INDY4 && room == 39 && x == 617 && y == 125 && newdir == 180) + startAnimActor(standFrame); } } @@ -831,7 +835,7 @@ void Scumm::processActors() if (a->costume) { CHECK_HEAP getMaskFromBox(a->walkbox); a->drawActorCostume(); - CHECK_HEAP a->actorAnimate(); + CHECK_HEAP a->animateCostume(); } } } @@ -921,7 +925,7 @@ void Actor::drawActorCostume() } } -void Actor::actorAnimate() +void Actor::animateCostume() { if (costume == 0) return; @@ -146,7 +146,7 @@ public: void turnToDirection(int newdir); void walkActor(); void drawActorCostume(); - void actorAnimate(); + void animateCostume(); void setActorCostume(int c); byte *getActorName(); void startWalkActor(int x, int y, int dir); diff --git a/script.cpp b/script.cpp index 51ca883e27..f46bd4bb24 100644 --- a/script.cpp +++ b/script.cpp @@ -899,15 +899,6 @@ void Scumm::faceActorToObj(int act, int obj) derefActorSafe(act, "faceActorToObj")->turnToDirection(dir); } -void Scumm::animateActor(int act, int anim) -{ - Actor *a = derefActorSafe(act, "animateActor"); - if (!a) - return; - - a->animateActor(anim); -} - bool Scumm::isScriptRunning(int script) { int i; @@ -930,7 +921,6 @@ bool Scumm::isRoomScriptRunning(int script) } - void Scumm::beginOverride() { int idx; diff --git a/script_v1.cpp b/script_v1.cpp index 9bf325a9b7..ecba63dc4c 100644 --- a/script_v1.cpp +++ b/script_v1.cpp @@ -876,11 +876,14 @@ void Scumm::o5_and() void Scumm::o5_animateActor() { - int act, anim; + int act = getVarOrDirectByte(0x80); + int anim = getVarOrDirectByte(0x40); - act = getVarOrDirectByte(0x80); - anim = getVarOrDirectByte(0x40); - animateActor(act, anim); + Actor *a = derefActorSafe(act, "o5_animateActor"); + if (!a) + return; + + a->animateActor(anim); } void Scumm::o5_badOpcode() diff --git a/script_v2.cpp b/script_v2.cpp index aad9a1b8d9..8e3f487da7 100644 --- a/script_v2.cpp +++ b/script_v2.cpp @@ -1429,7 +1429,11 @@ void Scumm::o6_animateActor() int anim = pop(); int act = pop(); - animateActor(act, anim); + Actor *a = derefActorSafe(act, "o6_animateActor"); + if (!a) + return; + + a->animateActor(anim); } void Scumm::o6_doSentence() @@ -799,7 +799,6 @@ public: void processActors(); int getActorFromPos(int x, int y); void faceActorToObj(int act, int obj); - void animateActor(int act, int anim); void actorFollowCamera(int act); bool isCostumeInUse(int i); |