aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scumm/actor.cpp29
-rw-r--r--scumm/actor.h2
-rw-r--r--scumm/script.cpp2
3 files changed, 24 insertions, 9 deletions
diff --git a/scumm/actor.cpp b/scumm/actor.cpp
index a400c8e552..212f46f27b 100644
--- a/scumm/actor.cpp
+++ b/scumm/actor.cpp
@@ -404,16 +404,29 @@ void Actor::setupActorScale() {
if (ignoreBoxes)
return;
- if (_vm->getBoxFlags(walkbox) & kBoxPlayerOnly)
- return;
+ // FIXME: The following two lines we apparenly added to fix bug #551944,
+ // which deals with "Script race in mystery vortex" in Sam&Max.
+ // (this was added in the *old* CVS repository in rev 1.61 of actor.cpp).
+ // The comment on that bug says: "Fixed by initial guesswork from jah.
+ // Turned out we need to check the box locking state."
+ // However:
+ // 1) Contrary to the bug comment, this doesn't check the box locking flag
+ // 2) For all Scumm versions from 1-5 this is definitely wrong
+ // 3) I checked a Sam&Max IDA DB, and found no evidence for this either
+ // 4) From a purely logical point of view (i.e. considering how actors,
+ // scaling etc. work), this makes no sense either.
+ //
+ // Hence, I am hereby commenting out this code. It may cause regressions,
+ // esp. in the Mystery Vortex; it would be very good if people could hence
+ // playtest the Vortex. Should it turn out the Vortex needs this, we could
+ // re-enable it, although it would be preferable to find a proper fix :-)
+// if (_vm->getBoxFlags(walkbox) & kBoxPlayerOnly)
+// return;
scale = _vm->getScale(walkbox, x, y);
- if (scale > 255) {
- warning("Actor %d at %d, scale %d out of range", number, y, scale);
- }
+ assert(scale <= 0xFF);
- scalex = (byte)scale;
- scaley = (byte)scale;
+ scalex = scaley = (byte)scale;
}
void Actor::startAnimActor(int f) {
@@ -1460,6 +1473,8 @@ void Actor::walkActorOld() {
// Can't walk through locked boxes
int flags = _vm->getBoxFlags(next_box);
if (flags & kBoxLocked && !(flags & kBoxPlayerOnly && !isPlayer())) {
+// moving |= MF_LAST_LEG;
+// return;
break;
}
diff --git a/scumm/actor.h b/scumm/actor.h
index 85854b66d8..1e020af494 100644
--- a/scumm/actor.h
+++ b/scumm/actor.h
@@ -148,6 +148,7 @@ public:
void faceToObject(int obj);
void turnToDirection(int newdir);
void walkActor();
+ void walkActorOld();
void drawActorCostume();
void animateCostume();
void setActorCostume(int c);
@@ -163,7 +164,6 @@ public:
void startAnimActor(int frame);
void remapActorPalette(int r_fact, int g_fact, int b_fact, int threshold);
- void walkActorOld();
void animateActor(int anim);
diff --git a/scumm/script.cpp b/scumm/script.cpp
index 6d75bbd151..060bda73af 100644
--- a/scumm/script.cpp
+++ b/scumm/script.cpp
@@ -973,7 +973,7 @@ int Scumm::defineArray(int array, int type, int dim2, int dim1) {
int size;
ArrayHeader *ah;
- if (type != 5 && type != 4)
+ if (type != 4)
type = 5;
nukeArray(array);