aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2003-11-01 01:17:15 +0000
committerMax Horn2003-11-01 01:17:15 +0000
commit9f33b3abbeb211182e92cebb13c8c6d1175468e9 (patch)
tree2f1a839887d1f0bf356953bec315e92d5581c028
parent4952fb11ac21b25ef2c2e6d8b829ad8d5eed0615 (diff)
downloadscummvm-rg350-9f33b3abbeb211182e92cebb13c8c6d1175468e9.tar.gz
scummvm-rg350-9f33b3abbeb211182e92cebb13c8c6d1175468e9.tar.bz2
scummvm-rg350-9f33b3abbeb211182e92cebb13c8c6d1175468e9.zip
possible fix for bug #833854 - I rechecked the assembly, there actually is a check for box flag 0x20 in there. However, that flag has a differeing meaning in older engine versions, so I put a version check in and updated the comments. Please test.
svn-id: r11019
-rw-r--r--scumm/actor.cpp28
-rw-r--r--scumm/boxes.h1
2 files changed, 8 insertions, 21 deletions
diff --git a/scumm/actor.cpp b/scumm/actor.cpp
index 08b5f3ef4a..0c330a19ed 100644
--- a/scumm/actor.cpp
+++ b/scumm/actor.cpp
@@ -393,7 +393,6 @@ int Actor::actorWalkStep() {
void Actor::setupActorScale() {
- uint16 scale;
if (_vm->_features & GF_NO_SCALING) {
scalex = 0xFF;
@@ -404,26 +403,13 @@ void Actor::setupActorScale() {
if (ignoreBoxes)
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, _pos.x, _pos.y);
+ // For some boxes, we ignore the scaling and use whatever values the
+ // scripts set. This is used e.g. in the Mystery Vortex in Sam&Max.
+ // Older games used the flag 0x20 differently, though.
+ if (_vm->_version >= 6 && (_vm->getBoxFlags(walkbox) & kBoxIgnoreScale))
+ return;
+
+ uint16 scale = _vm->getScale(walkbox, _pos.x, _pos.y);
assert(scale <= 0xFF);
scalex = scaley = (byte)scale;
diff --git a/scumm/boxes.h b/scumm/boxes.h
index c4f23af448..ea95046fde 100644
--- a/scumm/boxes.h
+++ b/scumm/boxes.h
@@ -35,6 +35,7 @@ namespace Scumm {
typedef enum {
kBoxXFlip = 0x08,
kBoxYFlip = 0x10,
+ kBoxIgnoreScale = 0x20,
kBoxPlayerOnly = 0x20,
kBoxLocked = 0x40,
kBoxInvisible = 0x80