aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2002-08-04 02:53:50 +0000
committerMax Horn2002-08-04 02:53:50 +0000
commit8779d00789258b1cf90be703540efd62aa50dd1d (patch)
tree104d552c882d8f2958b83fd4d62466b3353337ea
parent77daed66eae0e1526c1aee7558a2b08250f6bd78 (diff)
downloadscummvm-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.cpp8
-rw-r--r--actor.h2
-rw-r--r--script.cpp10
-rw-r--r--script_v1.cpp11
-rw-r--r--script_v2.cpp6
-rw-r--r--scumm.h1
6 files changed, 19 insertions, 19 deletions
diff --git a/actor.cpp b/actor.cpp
index 657e28bc17..bdcc58aea3 100644
--- a/actor.cpp
+++ b/actor.cpp
@@ -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;
diff --git a/actor.h b/actor.h
index 7ea108a1d5..ae2b6ff9b1 100644
--- a/actor.h
+++ b/actor.h
@@ -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()
diff --git a/scumm.h b/scumm.h
index 6da4edd985..627081652f 100644
--- a/scumm.h
+++ b/scumm.h
@@ -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);